Remove unnecessary scroll logic to component buttons on Win32 (#2235)

* Remove janky scroll logic for win32 component button

* Change files

* Remove calls to waitForButtonDisplayed in windows specs

* Remove unnecessary calls to scrollToComponentbutton

* Remove win32 and macos switch cases in scroll method

* Remove scroll call in experimental link spec

* Refactor platform enum to separate mobile+native

* Remove unused code from previous scroll method

* Refactor scroll + platform enum in uwp e2etests

Co-authored-by: Lawrence Win <winlarry@microsoft.com>
This commit is contained in:
Lawrence Win 2022-10-18 16:36:02 -07:00 коммит произвёл GitHub
Родитель 5ecc998996
Коммит 97f1d758ae
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
53 изменённых файлов: 70 добавлений и 245 удалений

Просмотреть файл

@ -1,7 +1,7 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import ActivityIndicatorPageObject from '../pages/ActivityIndicatorPageObject';
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
import { Platform } from '../../common/BasePage';
import { MobilePlatform } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('Activity Indicator Testing Initialization', function () {
@ -11,7 +11,7 @@ describe('Activity Indicator Testing Initialization', function () {
});
it('Click and navigate to Activity Indicator test page', async () => {
await ActivityIndicatorPageObject.scrollToComponentButton(Platform.iOS);
await ActivityIndicatorPageObject.mobileScrollToComponentButton(MobilePlatform.iOS);
await ActivityIndicatorPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */

Просмотреть файл

@ -1,7 +1,6 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import ActivityIndicatorPageObject from '../pages/ActivityIndicatorPageObject';
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
import { Platform } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('Activity Indicator Testing Initialization', function () {
@ -11,9 +10,6 @@ describe('Activity Indicator Testing Initialization', function () {
});
it('Click and navigate to Activity Indicator test page', async () => {
await ActivityIndicatorPageObject.scrollToComponentButton(Platform.Win32);
await ActivityIndicatorPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */
await NavigateAppPage.clickAndGoToActivityIndicatorPage();
await ActivityIndicatorPageObject.waitForPageDisplayed(PAGE_TIMEOUT);

Просмотреть файл

@ -1,7 +1,7 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import AvatarPageObject from '../pages/AvatarPageObject';
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
import { Platform } from '../../common/BasePage';
import { MobilePlatform } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('Avatar Testing Initialization', function () {
@ -11,7 +11,7 @@ describe('Avatar Testing Initialization', function () {
});
it('Click and navigate to Avatar test page', async () => {
await AvatarPageObject.scrollToComponentButton(Platform.iOS);
await AvatarPageObject.mobileScrollToComponentButton(MobilePlatform.iOS);
await AvatarPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */

Просмотреть файл

@ -11,7 +11,6 @@ import {
ACCESSIBILITY_ROLE_IMAGE,
ACCESSIBILITY_ROLE_LINK,
} from '../../../TestComponents/Avatar/consts';
import { Platform } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('Avatar Testing Initialization', function () {
@ -21,10 +20,6 @@ describe('Avatar Testing Initialization', function () {
});
it('Click and navigate to Avatar test page', async () => {
/* Scroll to component test page button in scrollview if not already visible*/
await AvatarPageObject.scrollToComponentButton(Platform.Win32);
await AvatarPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */
await NavigateAppPage.clickAndGoToAvatarPage();
await AvatarPageObject.waitForPageDisplayed(PAGE_TIMEOUT);

Просмотреть файл

@ -1,7 +1,7 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import BasicBadgePageObject from '../pages/BasicBadgePageObject';
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
import { Platform } from '../../common/BasePage';
import { MobilePlatform } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('Badge Testing Initialization', function () {
@ -11,7 +11,7 @@ describe('Badge Testing Initialization', function () {
});
it('Click and navigate to Badge test page', async () => {
await BasicBadgePageObject.scrollToComponentButton(Platform.iOS);
await BasicBadgePageObject.mobileScrollToComponentButton(MobilePlatform.iOS);
await BasicBadgePageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */

Просмотреть файл

@ -1,7 +1,6 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import BasicBadgePageObject from '../pages/BasicBadgePageObject';
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
import { Platform } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('Badge Testing Initialization', function () {
@ -11,10 +10,6 @@ describe('Badge Testing Initialization', function () {
});
it('Click and navigate to Badge test page', async () => {
/* Scroll to component test page button in scrollview if not already visible*/
await BasicBadgePageObject.scrollToComponentButton(Platform.Win32);
await BasicBadgePageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */
await NavigateAppPage.clickAndGoToBadgePage();
await BasicBadgePageObject.waitForPageDisplayed(PAGE_TIMEOUT);

Просмотреть файл

@ -1,7 +1,7 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import ButtonPageObject from '../pages/ButtonPageObject';
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
import { Platform } from '../../common/BasePage';
import { MobilePlatform } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('Button Testing Initialization', function () {
@ -11,7 +11,7 @@ describe('Button Testing Initialization', function () {
});
it('Click and navigate to Button test page', async () => {
await ButtonPageObject.scrollToComponentButton(Platform.iOS);
await ButtonPageObject.mobileScrollToComponentButton(MobilePlatform.iOS);
await ButtonPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */

Просмотреть файл

@ -1,6 +1,6 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import ButtonPageObject, { ButtonSelector } from '../pages/ButtonPageObject';
import { ComponentSelector, Platform } from '../../common/BasePage';
import { ComponentSelector } from '../../common/BasePage';
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT, BUTTON_A11Y_ROLE, Keys } from '../../common/consts';
import { BUTTON_ACCESSIBILITY_LABEL_DEPRECATED, BUTTON_TEST_COMPONENT_LABEL_DEPRECATED } from '../../../TestComponents/Button/consts';
@ -12,10 +12,6 @@ describe('Button Testing Initialization', function () {
});
it('Click and navigate to Button test page', async () => {
/* Scroll to component test page button in scrollview if not already visible*/
await ButtonPageObject.scrollToComponentButton(Platform.Win32);
await ButtonPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */
await NavigateAppPage.clickAndGoToButtonPage();
await ButtonPageObject.waitForPageDisplayed(PAGE_TIMEOUT);

Просмотреть файл

@ -1,6 +1,6 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import ButtonExperimentalPageObject, { ButtonSelector } from '../pages/ButtonExperimentalPageObject';
import { ComponentSelector, Platform } from '../../common/BasePage';
import { ComponentSelector } from '../../common/BasePage';
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT, BUTTON_A11Y_ROLE, Keys } from '../../common/consts';
import { BUTTON_ACCESSIBILITY_LABEL, BUTTON_TEST_COMPONENT_LABEL } from '../../../TestComponents/Button/consts';
@ -12,10 +12,6 @@ describe('Experimental Button Testing Initialization', function () {
});
it('Click and navigate to Button test page', async () => {
/* Scroll to component test page button in scrollview if not already visible*/
await ButtonExperimentalPageObject.scrollToComponentButton(Platform.Win32);
await ButtonExperimentalPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */
await NavigateAppPage.clickAndGoToButtonPage();
await ButtonExperimentalPageObject.waitForPageDisplayed(PAGE_TIMEOUT);

Просмотреть файл

@ -1,7 +1,6 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import CalloutPageObject from '../pages/CalloutPageObject.win';
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
import { Platform } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('Callout Testing Initialization', function () {
@ -11,10 +10,6 @@ describe('Callout Testing Initialization', function () {
});
it('Click and navigate to Callout test page', async () => {
/* Scroll to component test page button in scrollview if not already visible*/
await CalloutPageObject.scrollToComponentButton(Platform.Win32);
await CalloutPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */
await NavigateAppPage.clickAndGoToCalloutPage();
await CalloutPageObject.waitForPageDisplayed(PAGE_TIMEOUT);

Просмотреть файл

@ -1,7 +1,7 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import CheckboxPageObject from '../pages/CheckboxPageObject';
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
import { Platform } from '../../common/BasePage';
import { MobilePlatform } from '../../common/BasePage';
describe('Checkbox Testing Initialization', () => {
it('Wait for app load', async () => {
@ -10,7 +10,7 @@ describe('Checkbox Testing Initialization', () => {
});
it('Click and navigate to Checkbox test page', async () => {
await CheckboxPageObject.scrollToComponentButton(Platform.iOS);
await CheckboxPageObject.mobileScrollToComponentButton(MobilePlatform.iOS);
await CheckboxPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */

Просмотреть файл

@ -1,6 +1,6 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import CheckboxPageObject, { CheckboxSelector } from '../pages/CheckboxPageObject';
import { ComponentSelector, Platform } from '../../common/BasePage';
import { ComponentSelector } from '../../common/BasePage';
import { CHECKBOX_TEST_COMPONENT_LABEL, CHECKBOX_ACCESSIBILITY_LABEL } from '../../../TestComponents/Checkbox/consts';
import { CHECKBOX_A11Y_ROLE, PAGE_TIMEOUT, BOOT_APP_TIMEOUT, Keys } from '../../common/consts';
@ -11,10 +11,6 @@ describe('Checkbox Testing Initialization', () => {
});
it('Click and navigate to Checkbox test page', async () => {
/* Scroll to component test page button in scrollview if not already visible*/
await CheckboxPageObject.scrollToComponentButton(Platform.Win32);
await CheckboxPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */
await NavigateAppPage.clickAndGoToCheckboxPage();
await CheckboxPageObject.waitForPageDisplayed(PAGE_TIMEOUT);

Просмотреть файл

@ -1,6 +1,6 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import CheckboxPageObject from '../pages/CheckboxPageObject';
import { ComponentSelector, Platform } from '../../common/BasePage';
import { ComponentSelector } from '../../common/BasePage';
import { CHECKBOX_TEST_COMPONENT_LABEL, CHECKBOX_ACCESSIBILITY_LABEL } from '../../../TestComponents/Checkbox/consts';
import { CHECKBOX_A11Y_ROLE, PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
@ -11,10 +11,6 @@ describe('Checkbox Testing Initialization', () => {
});
it('Click and navigate to Checkbox test page', async () => {
/* Scroll to component test page button in scrollview if not already visible*/
await CheckboxPageObject.scrollToComponentButton(Platform.Win32);
await CheckboxPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */
await NavigateAppPage.clickAndGoToCheckboxPage();
await CheckboxPageObject.waitForPageDisplayed(PAGE_TIMEOUT);

Просмотреть файл

@ -1,7 +1,7 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import ExperimentalCheckboxPageObject from '../pages/ExperimentalCheckboxPageObject';
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
import { Platform } from '../../common/BasePage';
import { MobilePlatform } from '../../common/BasePage';
describe('Experimental Checkbox Testing Initialization', () => {
it('Wait for app load', async () => {
@ -10,7 +10,7 @@ describe('Experimental Checkbox Testing Initialization', () => {
});
it('Click and navigate to Experimental Checkbox test page', async () => {
await ExperimentalCheckboxPageObject.scrollToComponentButton(Platform.iOS);
await ExperimentalCheckboxPageObject.mobileScrollToComponentButton(MobilePlatform.iOS);
await ExperimentalCheckboxPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */

Просмотреть файл

@ -1,6 +1,6 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import ExperimentalCheckboxPageObject, { ExperimentalCheckboxSelector } from '../pages/ExperimentalCheckboxPageObject';
import { ComponentSelector, Platform } from '../../common/BasePage';
import { ComponentSelector } from '../../common/BasePage';
import {
EXPERIMENTAL_CHECKBOX_TEST_COMPONENT_LABEL,
EXPERIMENTAL_CHECKBOX_ACCESSIBILITY_LABEL,
@ -14,10 +14,6 @@ describe('Experimental Checkbox Testing Initialization', () => {
});
it('Click and navigate to Experimental Checkbox test page', async () => {
/* Scroll to component test page button in scrollview if not already visible*/
await ExperimentalCheckboxPageObject.scrollToComponentButton(Platform.Win32);
await ExperimentalCheckboxPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */
await NavigateAppPage.clickAndGoToCheckboxExperimentalPage();
await ExperimentalCheckboxPageObject.waitForPageDisplayed(PAGE_TIMEOUT);

Просмотреть файл

@ -1,7 +1,6 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import ContextualMenuPageObjectObject, { ContextualMenuSelector } from '../pages/ContextualMenuPageObject.win';
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT, Keys } from '../../common/consts';
import { Platform } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('ContextualMenu Testing Initialization', function () {
@ -11,10 +10,6 @@ describe('ContextualMenu Testing Initialization', function () {
});
it('Click and navigate to ContextualMenu test page', async () => {
/* Scroll to component test page button in scrollview if not already visible*/
await ContextualMenuPageObjectObject.scrollToComponentButton(Platform.Win32);
await ContextualMenuPageObjectObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */
await NavigateAppPage.clickAndGoToContextualMenuPage();
await ContextualMenuPageObjectObject.waitForPageDisplayed(PAGE_TIMEOUT);

Просмотреть файл

@ -1,7 +1,6 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import FocusTrapZonePageObject from '../pages/FocusTrapZonePageObject.win';
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
import { Platform } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('FocusTrapZone Testing Initialization', function () {
@ -11,10 +10,6 @@ describe('FocusTrapZone Testing Initialization', function () {
});
it('Click and navigate to FocusTrapZone test page', async () => {
/* Scroll to component test page button in scrollview if not already visible*/
await FocusTrapZonePageObject.scrollToComponentButton(Platform.Win32);
await FocusTrapZonePageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */
await NavigateAppPage.clickAndGoToFocusTrapZonePage();
await FocusTrapZonePageObject.waitForPageDisplayed(PAGE_TIMEOUT);

Просмотреть файл

@ -1,7 +1,6 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import FocusZonePageObject, { GridButtonSelector, GridFocusZoneOption } from '../pages/FocusZonePageObject';
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT, Keys } from '../../common/consts';
import { Platform } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('FocusZone Testing Initialization', function () {
@ -11,10 +10,6 @@ describe('FocusZone Testing Initialization', function () {
});
it('Click and navigate to FocusZone test page', async () => {
/* Scroll to component test page button in scrollview if not already visible*/
await FocusZonePageObject.scrollToComponentButton(Platform.Win32);
await FocusZonePageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */
await NavigateAppPage.clickAndGoToFocusZonePage();
await FocusZonePageObject.waitForPageDisplayed(PAGE_TIMEOUT);

Просмотреть файл

@ -1,7 +1,7 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import IconPageObject from '../pages/IconPageObject';
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
import { Platform } from '../../common/BasePage';
import { MobilePlatform } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('Icon Testing Initialization', function () {
@ -11,7 +11,7 @@ describe('Icon Testing Initialization', function () {
});
it('Click and navigate to Icon test page', async () => {
await IconPageObject.scrollToComponentButton(Platform.iOS);
await IconPageObject.mobileScrollToComponentButton(MobilePlatform.iOS);
await IconPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */

Просмотреть файл

@ -1,7 +1,6 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import IconPageObject from '../pages/IconPageObject';
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
import { Platform } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('Icon Testing Initialization', function () {
@ -11,10 +10,6 @@ describe('Icon Testing Initialization', function () {
});
it('Click and navigate to Icon test page', async () => {
/* Scroll to component test page button in scrollview if not already visible*/
await IconPageObject.scrollToComponentButton(Platform.Win32);
await IconPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */
await NavigateAppPage.clickAndGoToIconPage();
await IconPageObject.waitForPageDisplayed(PAGE_TIMEOUT);

Просмотреть файл

@ -1,7 +1,7 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import LinkPageObject from '../pages/LinkPageObject';
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
import { Platform } from '../../common/BasePage';
import { MobilePlatform } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('Link Testing Initialization', function () {
@ -11,7 +11,7 @@ describe('Link Testing Initialization', function () {
});
it('Click and navigate to Link test page', async () => {
await LinkPageObject.scrollToComponentButton(Platform.iOS);
await LinkPageObject.mobileScrollToComponentButton(MobilePlatform.iOS);
await LinkPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */

Просмотреть файл

@ -1,6 +1,6 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import LinkPageObject from '../pages/LinkPageObject';
import { ComponentSelector, Platform } from '../../common/BasePage';
import { ComponentSelector } from '../../common/BasePage';
import { LINK_ACCESSIBILITY_LABEL } from '../../../TestComponents/Link/consts';
import { LINK_A11Y_ROLE, PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
@ -12,10 +12,6 @@ describe('Link Testing Initialization', function () {
});
it('Click and navigate to Link test page', async () => {
/* Scroll to component test page button in scrollview if not already visible*/
await LinkPageObject.scrollToComponentButton(Platform.Win32);
await LinkPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */
await NavigateAppPage.clickAndGoToLinkPage();
await LinkPageObject.waitForPageDisplayed(PAGE_TIMEOUT);

Просмотреть файл

@ -1,6 +1,6 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import ExperimentalLinkPageObject from '../pages/LinkPageObject';
import { ComponentSelector, Platform } from '../../common/BasePage';
import { ComponentSelector } from '../../common/BasePage';
import { EXPERIMENTAL_LINK_ACCESSIBILITY_LABEL } from '../../../TestComponents/LinkExperimental/consts';
import { LINK_A11Y_ROLE, PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
@ -12,10 +12,6 @@ describe('Link Testing Initialization', function () {
});
it('Click and navigate to Link test page', async () => {
/* Scroll to component test page button in scrollview if not already visible*/
await ExperimentalLinkPageObject.scrollToComponentButton(Platform.Win32);
await ExperimentalLinkPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */
await NavigateAppPage.clickAndGoToLinkExperimentalPage();
await ExperimentalLinkPageObject.waitForPageDisplayed(PAGE_TIMEOUT);

Просмотреть файл

@ -2,7 +2,6 @@ import NavigateAppPage from '../../common/NavigateAppPage';
import MenuPageObject, { MenuComponentSelector } from '../pages/MenuPageObject';
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT, Keys, MENUITEM_A11Y_ROLE, ExpandCollapseState } from '../../common/consts';
import { MENUITEM_TEST_LABEL } from '../../../TestComponents/Menu/consts';
import { Platform } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('Menu Testing Initialization', function () {
@ -12,10 +11,6 @@ describe('Menu Testing Initialization', function () {
});
it('Click and navigate to Menu test page', async () => {
/* Scroll to component test page button in scrollview if not already visible*/
await MenuPageObject.scrollToComponentButton(Platform.Win32);
await MenuPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */
await NavigateAppPage.clickAndGoToMenuPage();
await MenuPageObject.waitForPageDisplayed(PAGE_TIMEOUT);

Просмотреть файл

@ -2,7 +2,7 @@ import NavigateAppPage from '../../common/NavigateAppPage';
import MenuButtonPageObject, { MenuButtonSelector } from '../pages/MenuButtonPageObject.win';
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT, MENUBUTTON_A11Y_ROLE, Keys } from '../../common/consts';
import { MENU_BUTTON_ACCESSIBILITY_LABEL, MENU_BUTTON_TEST_COMPONENT_LABEL } from '../../../TestComponents/MenuButton/consts';
import { ComponentSelector, Platform } from '../../common/BasePage';
import { ComponentSelector } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('MenuButton Testing Initialization', function () {
@ -12,10 +12,6 @@ describe('MenuButton Testing Initialization', function () {
});
it('Click and navigate to MenuButton test page', async () => {
/* Scroll to component test page button in scrollview if not already visible*/
await MenuButtonPageObject.scrollToComponentButton(Platform.Win32);
await MenuButtonPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */
await NavigateAppPage.clickAndGoToMenuButtonPage();
await MenuButtonPageObject.waitForPageDisplayed(PAGE_TIMEOUT);

Просмотреть файл

@ -5,7 +5,7 @@ import {
EXPERIMENTAL_MENU_BUTTON_ACCESSIBILITY_LABEL,
EXPERIMENTAL_MENU_BUTTON_TEST_COMPONENT_LABEL,
} from '../../../TestComponents/MenuButtonExperimental/consts';
import { ComponentSelector, Platform } from '../../common/BasePage';
import { ComponentSelector } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('Experimental MenuButton Testing Initialization', function () {
@ -15,10 +15,6 @@ describe('Experimental MenuButton Testing Initialization', function () {
});
it('Click and navigate to Experimental MenuButton test page', async () => {
/* Scroll to component test page button in scrollview if not already visible*/
await ExperimentalMenuButtonPageObject.scrollToComponentButton(Platform.Win32);
await ExperimentalMenuButtonPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */
await NavigateAppPage.clickAndGoToExperimentalMenuButtonPage();
await ExperimentalMenuButtonPageObject.waitForPageDisplayed(PAGE_TIMEOUT);

Просмотреть файл

@ -1,7 +1,7 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import PersonaPageObject from '../pages/PersonaPageObject';
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
import { Platform } from '../../common/BasePage';
import { MobilePlatform } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('Persona Testing Initialization', function () {
@ -11,7 +11,7 @@ describe('Persona Testing Initialization', function () {
});
it('Click and navigate to Persona test page', async () => {
await PersonaPageObject.scrollToComponentButton(Platform.iOS);
await PersonaPageObject.mobileScrollToComponentButton(MobilePlatform.iOS);
await PersonaPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */

Просмотреть файл

@ -1,7 +1,6 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import PersonaPageObject from '../pages/PersonaPageObject';
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
import { Platform } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('Persona Testing Initialization', function () {
@ -11,10 +10,6 @@ describe('Persona Testing Initialization', function () {
});
it('Click and navigate to Persona test page', async () => {
/* Scroll to component test page button in scrollview if not already visible*/
await PersonaPageObject.scrollToComponentButton(Platform.Win32);
await PersonaPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */
await NavigateAppPage.clickAndGoToPersonaPage();
await PersonaPageObject.waitForPageDisplayed(PAGE_TIMEOUT);

Просмотреть файл

@ -1,7 +1,7 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import PersonaCoinPageObject from '../pages/PersonaCoinPageObject';
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
import { Platform } from '../../common/BasePage';
import { MobilePlatform } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('PersonaCoin Testing Initialization', function () {
@ -11,7 +11,7 @@ describe('PersonaCoin Testing Initialization', function () {
});
it('Click and navigate to PersonaCoin test page', async () => {
await PersonaCoinPageObject.scrollToComponentButton(Platform.iOS);
await PersonaCoinPageObject.mobileScrollToComponentButton(MobilePlatform.iOS);
await PersonaCoinPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */

Просмотреть файл

@ -1,7 +1,6 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import PersonaCoinPageObject from '../pages/PersonaCoinPageObject';
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
import { Platform } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('PersonaCoin Testing Initialization', function () {
@ -11,10 +10,6 @@ describe('PersonaCoin Testing Initialization', function () {
});
it('Click and navigate to PersonaCoin test page', async () => {
/* Scroll to component test page button in scrollview if not already visible*/
await PersonaCoinPageObject.scrollToComponentButton(Platform.Win32);
await PersonaCoinPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */
await NavigateAppPage.clickAndGoToPersonaCoinPage();
await PersonaCoinPageObject.waitForPageDisplayed(PAGE_TIMEOUT);

Просмотреть файл

@ -1,7 +1,7 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import PressablePageObject from '../pages/PressablePageObject';
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
import { Platform } from '../../common/BasePage';
import { MobilePlatform } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('Pressable Testing Initialization', function () {
@ -11,7 +11,7 @@ describe('Pressable Testing Initialization', function () {
});
it('Click and navigate to Pressable test page', async () => {
await PressablePageObject.scrollToComponentButton(Platform.iOS);
await PressablePageObject.mobileScrollToComponentButton(MobilePlatform.iOS);
await PressablePageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */

Просмотреть файл

@ -1,7 +1,6 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import PressablePageObject from '../pages/PressablePageObject';
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
import { Platform } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('Pressable Testing Initialization', function () {
@ -11,10 +10,6 @@ describe('Pressable Testing Initialization', function () {
});
it('Click and navigate to Pressable test page', async () => {
/* Scroll to component test page button in scrollview if not already visible*/
await PressablePageObject.scrollToComponentButton(Platform.Win32);
await PressablePageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */
await NavigateAppPage.clickAndGoToPressablePage();
await PressablePageObject.waitForPageDisplayed(PAGE_TIMEOUT);

Просмотреть файл

@ -1,6 +1,6 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import RadioGroupPageObject, { RadioButtonSelector } from '../pages/RadioGroupPageObject';
import { ComponentSelector, Platform } from '../../common/BasePage';
import { ComponentSelector } from '../../common/BasePage';
import { RADIOBUTTON_A11Y_ROLE, RADIOGROUP_A11Y_ROLE, PAGE_TIMEOUT, BOOT_APP_TIMEOUT, Keys } from '../../common/consts';
import {
RADIOGROUP_ACCESSIBILITY_LABEL,
@ -17,10 +17,6 @@ describe('RadioGroup/RadioButton Testing Initialization', function () {
});
it('Click and navigate to RadioGroup test page', async () => {
/* Scroll to component test page button in scrollview if not already visible*/
await RadioGroupPageObject.scrollToComponentButton(Platform.Win32);
await RadioGroupPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */
await NavigateAppPage.clickAndGoToRadioGroupPage();
await RadioGroupPageObject.waitForPageDisplayed(PAGE_TIMEOUT);

Просмотреть файл

@ -1,7 +1,7 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import SeparatorPageObject from '../pages/SeparatorPageObject';
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
import { Platform } from '../../common/BasePage';
import { MobilePlatform } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('Separator Testing Initialization', function () {
@ -11,7 +11,7 @@ describe('Separator Testing Initialization', function () {
});
it('Click and navigate to Separator test page', async () => {
await SeparatorPageObject.scrollToComponentButton(Platform.iOS);
await SeparatorPageObject.mobileScrollToComponentButton(MobilePlatform.iOS);
await SeparatorPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */

Просмотреть файл

@ -1,7 +1,6 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import SeparatorPageObject from '../pages/SeparatorPageObject';
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
import { Platform } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('Separator Testing Initialization', function () {
@ -11,10 +10,6 @@ describe('Separator Testing Initialization', function () {
});
it('Click and navigate to Separator test page', async () => {
/* Scroll to component test page button in scrollview if not already visible*/
await SeparatorPageObject.scrollToComponentButton(Platform.Win32);
await SeparatorPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */
await NavigateAppPage.clickAndGoToSeparatorPage();
await SeparatorPageObject.waitForPageDisplayed(PAGE_TIMEOUT);

Просмотреть файл

@ -1,7 +1,7 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import ShimmerPageObject from '../pages/ShimmerPageObject.win';
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
import { Platform } from '../../common/BasePage';
import { MobilePlatform } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('Shimmer Testing Initialization', function () {
@ -11,7 +11,7 @@ describe('Shimmer Testing Initialization', function () {
});
it('Click and navigate to Shimmer test page', async () => {
await ShimmerPageObject.scrollToComponentButton(Platform.iOS);
await ShimmerPageObject.mobileScrollToComponentButton(MobilePlatform.iOS);
await ShimmerPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */

Просмотреть файл

@ -1,7 +1,6 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import ShimmerPageObject from '../pages/ShimmerPageObject.win';
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
import { Platform } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('Shimmer Testing Initialization', function () {
@ -11,10 +10,6 @@ describe('Shimmer Testing Initialization', function () {
});
it('Click and navigate to Shimmer test page', async () => {
/* Scroll to component test page button in scrollview if not already visible*/
await ShimmerPageObject.scrollToComponentButton(Platform.Win32);
await ShimmerPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */
await NavigateAppPage.clickAndGoToShimmerPage();
await ShimmerPageObject.waitForPageDisplayed(PAGE_TIMEOUT);

Просмотреть файл

@ -1,7 +1,7 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import SvgPageObject from '../pages/SvgPageObject';
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
import { Platform } from '../../common/BasePage';
import { MobilePlatform } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('Svg Testing Initialization', function () {
@ -11,7 +11,7 @@ describe('Svg Testing Initialization', function () {
});
it('Click and navigate to Svg test page', async () => {
await SvgPageObject.scrollToComponentButton(Platform.iOS);
await SvgPageObject.mobileScrollToComponentButton(MobilePlatform.iOS);
await SvgPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */

Просмотреть файл

@ -1,7 +1,6 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import SvgPageObject from '../pages/SvgPageObject';
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
import { Platform } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('Svg Testing Initialization', function () {
@ -11,10 +10,6 @@ describe('Svg Testing Initialization', function () {
});
it('Click and navigate to Svg test page', async () => {
/* Scroll to component test page button in scrollview if not already visible*/
await SvgPageObject.scrollToComponentButton(Platform.Win32);
await SvgPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */
await NavigateAppPage.clickAndGoToSvgPage();
await SvgPageObject.waitForPageDisplayed(PAGE_TIMEOUT);

Просмотреть файл

@ -1,7 +1,7 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import SwitchPageObject from '../pages/SwitchPageObject';
import { SwitchComponentSelector } from '../pages/SwitchPageObject';
import { ComponentSelector, Platform } from '../../common/BasePage';
import { ComponentSelector } from '../../common/BasePage';
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT, BUTTON_A11Y_ROLE, Keys } from '../../common/consts';
import { SWITCH_TEST_COMPONENT_LABEL, SWITCH_ACCESSIBILITY_LABEL } from '../../../TestComponents/Switch/consts';
@ -13,10 +13,6 @@ describe('Switch Testing Initialization', function () {
});
it('Click and navigate to Switch test page', async () => {
/* Scroll to component test page button in scrollview if not already visible*/
await SwitchPageObject.scrollToComponentButton(Platform.Win32);
await SwitchPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */
await NavigateAppPage.clickAndGoToSwitchPage();
await SwitchPageObject.waitForPageDisplayed(PAGE_TIMEOUT);

Просмотреть файл

@ -1,7 +1,6 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import TabsPageObject, { TabItemSelector } from '../pages/TabsPageObject';
import { TAB_A11Y_ROLE, BOOT_APP_TIMEOUT, PAGE_TIMEOUT, TABITEM_A11Y_ROLE, Keys } from '../../common/consts';
import { Platform } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('Tabs Testing Initialization', function () {
@ -11,10 +10,6 @@ describe('Tabs Testing Initialization', function () {
});
it('Click and navigate to Tabs test page', async () => {
/* Scroll to component test page button in scrollview if not already visible*/
await TabsPageObject.scrollToComponentButton(Platform.Win32);
await TabsPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */
await NavigateAppPage.clickAndGoToTabsPage();
await TabsPageObject.waitForPageDisplayed(PAGE_TIMEOUT);

Просмотреть файл

@ -1,7 +1,6 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import TabsPageObject, { TabItemSelector } from '../pages/TabsPageObject';
import { TAB_A11Y_ROLE, BOOT_APP_TIMEOUT, PAGE_TIMEOUT, TABITEM_A11Y_ROLE } from '../../common/consts';
import { Platform } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('Tabs Testing Initialization', function () {
@ -12,8 +11,6 @@ describe('Tabs Testing Initialization', function () {
it('Click and navigate to Tabs test page', async () => {
/* Scroll to component test page button in scrollview if not already visible*/
await TabsPageObject.scrollToComponentButton(Platform.Win32);
await TabsPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */
await NavigateAppPage.clickAndGoToTabsPage();

Просмотреть файл

@ -1,7 +1,6 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import ExperimentalTabsPageObject from '../pages/ExperimentalTabsPageObject';
import { TAB_A11Y_ROLE, TABITEM_A11Y_ROLE, BOOT_APP_TIMEOUT, PAGE_TIMEOUT } from '../../common/consts';
import { Platform } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('Experimental Tabs Testing Initialization', function () {
@ -11,10 +10,6 @@ describe('Experimental Tabs Testing Initialization', function () {
});
it('Click and navigate to Experimental Tabs test page', async () => {
/* Scroll to component test page button in scrollview if not already visible*/
await ExperimentalTabsPageObject.scrollToComponentButton(Platform.Win32);
await ExperimentalTabsPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */
await NavigateAppPage.clickAndGoToExperimentalTabsPage();
await ExperimentalTabsPageObject.waitForPageDisplayed(PAGE_TIMEOUT);

Просмотреть файл

@ -1,7 +1,7 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import TextPageObject from '../pages/TextPageObject';
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
import { Platform } from '../../common/BasePage';
import { MobilePlatform } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('Text Testing Initialization', function () {
@ -11,7 +11,7 @@ describe('Text Testing Initialization', function () {
});
it('Click and navigate to Text test page', async () => {
await TextPageObject.scrollToComponentButton(Platform.iOS);
await TextPageObject.mobileScrollToComponentButton(MobilePlatform.iOS);
await TextPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */

Просмотреть файл

@ -1,6 +1,6 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import TextPageObject from '../pages/TextPageObject';
import { ComponentSelector, Platform } from '../../common/BasePage';
import { ComponentSelector } from '../../common/BasePage';
import { TEXT_A11Y_ROLE, PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
import { TEXT_ACCESSIBILITY_LABEL, TEXT_COMPONENT_CONTENT } from '../../../TestComponents/Text/consts';
@ -12,10 +12,6 @@ describe('Text Testing Initialization', function () {
});
it('Click and navigate to Text test page', async () => {
/* Scroll to component test page button in scrollview if not already visible*/
await TextPageObject.scrollToComponentButton(Platform.Win32);
await TextPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */
await NavigateAppPage.clickAndGoToTextPage();
await TextPageObject.waitForPageDisplayed(PAGE_TIMEOUT);

Просмотреть файл

@ -1,7 +1,7 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import ExperimentalTextPageObject from '../pages/ExperimentalTextPageObject.win';
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
import { Platform } from '../../common/BasePage';
import { MobilePlatform } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('Experimental Text Testing Initialization', function () {
@ -11,7 +11,7 @@ describe('Experimental Text Testing Initialization', function () {
});
it('Click and navigate to Experimental Text test page', async () => {
await ExperimentalTextPageObject.scrollToComponentButton(Platform.iOS);
await ExperimentalTextPageObject.mobileScrollToComponentButton(MobilePlatform.iOS);
await ExperimentalTextPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */

Просмотреть файл

@ -1,7 +1,6 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import ExperimentalTextPageObject from '../pages/ExperimentalTextPageObject.win';
import { TEXT_A11Y_ROLE, PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
import { Platform } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('Experimental Text Testing Initialization', function () {
@ -11,10 +10,6 @@ describe('Experimental Text Testing Initialization', function () {
});
it('Click and navigate to Experimental Text test page', async () => {
/* Scroll to component test page button in scrollview if not already visible*/
await ExperimentalTextPageObject.scrollToComponentButton(Platform.Win32);
await ExperimentalTextPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */
await NavigateAppPage.clickAndGoToExperimentalTextPage();
await ExperimentalTextPageObject.waitForPageDisplayed(PAGE_TIMEOUT);

Просмотреть файл

@ -1,7 +1,7 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import ThemePageObject from '../pages/ThemePageObject.win';
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
import { Platform } from '../../common/BasePage';
import { MobilePlatform } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('Theme Testing Initialization', function () {
@ -11,7 +11,7 @@ describe('Theme Testing Initialization', function () {
});
it('Click and navigate to Theme test page', async () => {
await ThemePageObject.scrollToComponentButton(Platform.iOS);
await ThemePageObject.mobileScrollToComponentButton(MobilePlatform.iOS);
await ThemePageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */

Просмотреть файл

@ -1,7 +1,6 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import ThemePageObject from '../pages/ThemePageObject.win';
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
import { Platform } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('Theme Testing Initialization', function () {
@ -11,9 +10,6 @@ describe('Theme Testing Initialization', function () {
});
it('Click and navigate to Theme test page', async () => {
await ThemePageObject.scrollToComponentButton(Platform.Win32);
await ThemePageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */
await NavigateAppPage.clickAndGoToThemePage();
await ThemePageObject.waitForPageDisplayed(PAGE_TIMEOUT);

Просмотреть файл

@ -1,7 +1,7 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import TokenPageObject from '../pages/TokensPageObject.win';
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
import { Platform } from '../../common/BasePage';
import { MobilePlatform } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('Tokens Testing Initialization', function () {
@ -11,7 +11,7 @@ describe('Tokens Testing Initialization', function () {
});
it('Click and navigate to Tokens test page', async () => {
await TokenPageObject.scrollToComponentButton(Platform.iOS);
await TokenPageObject.mobileScrollToComponentButton(MobilePlatform.iOS);
await TokenPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */

Просмотреть файл

@ -1,7 +1,6 @@
import NavigateAppPage from '../../common/NavigateAppPage';
import TokenPageObject from '../pages/TokensPageObject.win';
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
import { Platform } from '../../common/BasePage';
// Before testing begins, allow up to 60 seconds for app to open
describe('Tokens Testing Initialization', function () {
@ -11,10 +10,6 @@ describe('Tokens Testing Initialization', function () {
});
it('Click and navigate to Tokens test page', async () => {
/* Scroll to component test page button in scrollview if not already visible*/
await TokenPageObject.scrollToComponentButton(Platform.Win32);
await TokenPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
/* Click on component button to navigate to test page */
await NavigateAppPage.clickAndGoToTokensPage();
await TokenPageObject.waitForPageDisplayed(PAGE_TIMEOUT);

Просмотреть файл

@ -18,13 +18,19 @@ export const enum ComponentSelector {
Secondary, // this._secondaryComponent
}
export const enum Platform {
Win32 = 0,
iOS,
macOS,
export const enum MobilePlatform {
iOS = 0,
Android,
}
export const enum NativePlatform {
Win32 = 0,
Windows,
macOS,
}
export type Platform = MobilePlatform | NativePlatform;
/****************************** IMPORTANT! PLEASE READ! **************************************************
* Every component's page object extends this. We can assume each test page will interact with at least
* two UI elements, so we'll add integration for two UI elements in this file (See *Getters* section below).
@ -72,8 +78,9 @@ export class BasePage {
}
/* Scrolls until the desired test page's button is displayed. We use the scroll viewer UI element as the point to start scrolling.
* We use a negative number as the Y-coordinate because that enables us to scroll downwards */
async scrollToComponentButton(platform: Platform): Promise<void> {
* We use a negative number as the Y-coordinate because that enables us to scroll downwards.
* There are no need for win32 and macos cases, as the click command automatically scrolls the element into view. */
async mobileScrollToComponentButton(platform: MobilePlatform): Promise<void> {
if (await (await this._pageButton).isDisplayed()) {
return;
}
@ -82,23 +89,7 @@ export class BasePage {
'Could not scroll to the ' + this._pageName + "'s Button. Please see Pipeline artifacts for more debugging information.";
switch (platform) {
case Platform.Win32: {
const scrollDownKeys = [Keys.PAGE_DOWN];
await browser.waitUntil(
async () => {
await (await this._firstTestPageButton).addValue(scrollDownKeys);
scrollDownKeys.push(Keys.PAGE_DOWN);
return await (await this._pageButton).isDisplayed();
},
{
timeout: this.waitForUiEvent,
timeoutMsg: errorMsg,
},
);
break;
}
case Platform.iOS: {
case MobilePlatform.iOS: {
await browser.waitUntil(
async () => {
await driver.execute('mobile: scroll', { direction: 'down' });
@ -111,13 +102,8 @@ export class BasePage {
);
break;
}
case Platform.macOS:
// Not needed for macOS. It automatically scrolls
break;
default:
case Platform.Android:
case MobilePlatform.Android:
// Todo
break;
}
@ -208,21 +194,6 @@ export class BasePage {
return windowHandles.length > 1;
}
/* Finds the first test page button in the ScrollView */
async SetFirstScrollViewButtonChild() {
const TestChildren = await (await this._testPageButtonScrollViewer).$$('//*');
const reg = new RegExp('Homepage_[a-zA-Z]*_Button');
for (const child of TestChildren) {
const autoId = await child.getAttribute('AutomationId');
if (autoId && autoId !== TESTPAGE_BUTTONS_SCROLLVIEWER && autoId.match(reg)) {
return await child;
}
}
return null;
}
/*****************************************/
/**************** Getters ****************/
/*****************************************/
@ -269,10 +240,6 @@ export class BasePage {
return By(TESTPAGE_BUTTONS_SCROLLVIEWER);
}
get _firstTestPageButton() {
return this.SetFirstScrollViewButtonChild();
}
/****************** Error Messages ******************/
get ERRORMESSAGE_SUFFIX(): string {
return 'Please review logs and error screenshots for more information.';

Просмотреть файл

@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Remove unnecessary scroll logic within e2e tests",
"packageName": "@fluentui-react-native/tester",
"email": "winlarry@microsoft.com",
"dependentChangeType": "patch"
}