Skip to content

Commit f1a04c7

Browse files
amgleitmanAdam Gleitman
andauthored
Add spacing test page and E2E tests for other platforms (#2456)
* Add spacing E2E tests * Change files * Add test ID to Spacing test page * Change files * Remove macOS and Win E2E tests since they don't have the Spacing test page yet * Revert "Remove macOS and Win E2E tests since they don't have the Spacing test page yet" This reverts commit 3516a68. * Activate spacing tokens page for all platforms * Change files Co-authored-by: Adam Gleitman <[email protected]>
1 parent 76ace50 commit f1a04c7

5 files changed

+56
-1
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import NavigateAppPage from '../../common/NavigateAppPage';
2+
import SpacingTokensPageObject from '../pages/SpacingTokensPageObject';
3+
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
4+
5+
// Before testing begins, allow up to 60 seconds for app to open
6+
describe('Spacing Tokens Testing Initialization', function () {
7+
it('Wait for app load', async () => {
8+
await NavigateAppPage.waitForPageDisplayed(BOOT_APP_TIMEOUT);
9+
await expect(await NavigateAppPage.isPageLoaded()).toBeTruthy();
10+
});
11+
12+
it('Click and navigate to Spacing tokens test page', async () => {
13+
await SpacingTokensPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
14+
15+
/* Click on component button to navigate to test page */
16+
await NavigateAppPage.clickAndGoToSpacingTokensPage();
17+
await SpacingTokensPageObject.waitForPageDisplayed(PAGE_TIMEOUT);
18+
19+
await expect(await SpacingTokensPageObject.isPageLoaded()).toBeTruthy();
20+
});
21+
});
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import NavigateAppPage from '../../common/NavigateAppPage';
2+
import SpacingTokensPageObject from '../pages/SpacingTokensPageObject';
3+
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
4+
5+
// Before testing begins, allow up to 60 seconds for app to open
6+
describe('Spacing Token Testing Initialization', function () {
7+
it('Wait for app load', async () => {
8+
await NavigateAppPage.waitForPageDisplayed(BOOT_APP_TIMEOUT);
9+
await expect(await NavigateAppPage.isPageLoaded()).toBeTruthy(NavigateAppPage.ERRORMESSAGE_APPLOAD);
10+
});
11+
12+
it('Click and navigate to spacing tokens test page', async () => {
13+
/* Click on component button to navigate to test page */
14+
await NavigateAppPage.clickAndGoToSpacingTokensPage();
15+
await SpacingTokensPageObject.waitForPageDisplayed(PAGE_TIMEOUT);
16+
17+
await expect(await SpacingTokensPageObject.isPageLoaded()).toBeTruthy(SpacingTokensPageObject.ERRORMESSAGE_PAGELOAD);
18+
await expect(await SpacingTokensPageObject.didAssertPopup()).toBeFalsy(SpacingTokensPageObject.ERRORMESSAGE_ASSERT); // Ensure no asserts popped up
19+
});
20+
});

apps/fluent-tester/src/testPages.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ export const tests: TestDescription[] = [
232232
name: 'Spacing Tokens',
233233
component: SpacingTokensTest,
234234
testPageButton: HOMEPAGE_SPACING_BUTTON,
235-
platforms: ['ios'],
235+
platforms: ['android', 'ios', 'macos', 'win32', 'windows'],
236236
},
237237
{
238238
name: 'Stroke Width Tokens',
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "minor",
3+
"comment": "Activate spacing tokens page for all platforms",
4+
"packageName": "@fluentui-react-native/e2e-testing",
5+
"email": "[email protected]",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "minor",
3+
"comment": "Activate spacing tokens page for all platforms",
4+
"packageName": "@fluentui-react-native/tester",
5+
"email": "[email protected]",
6+
"dependentChangeType": "patch"
7+
}

0 commit comments

Comments
 (0)