@fluentui-react-native/tester 0.50.25 → 0.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +141 -3
- package/CHANGELOG.md +47 -2
- package/lib/E2E/Button/pages/ButtonPageObject.d.ts +4 -0
- package/lib/E2E/Button/pages/ButtonPageObject.d.ts.map +1 -1
- package/lib/E2E/Button/pages/ButtonPageObject.js +15 -1
- package/lib/E2E/Button/pages/ButtonPageObject.js.map +1 -1
- package/lib/E2E/Button/specs/Button.spec.win.js +25 -5
- package/lib/E2E/Button/specs/Button.spec.win.js.map +1 -1
- package/lib/E2E/Checkbox/pages/CheckboxPageObject.d.ts +3 -1
- package/lib/E2E/Checkbox/pages/CheckboxPageObject.d.ts.map +1 -1
- package/lib/E2E/Checkbox/pages/CheckboxPageObject.js +21 -4
- package/lib/E2E/Checkbox/pages/CheckboxPageObject.js.map +1 -1
- package/lib/E2E/Checkbox/specs/Checkbox.spec.win.js +32 -5
- package/lib/E2E/Checkbox/specs/Checkbox.spec.win.js.map +1 -1
- package/lib/E2E/Checkbox/specs/Checkbox.spec.windows.d.ts +2 -0
- package/lib/E2E/Checkbox/specs/Checkbox.spec.windows.d.ts.map +1 -0
- package/lib/E2E/Checkbox/specs/Checkbox.spec.windows.js +67 -0
- package/lib/E2E/Checkbox/specs/Checkbox.spec.windows.js.map +1 -0
- package/lib/E2E/Text/pages/TextPageObject.macos.js +2 -2
- package/lib/E2E/Text/pages/TextPageObject.macos.js.map +1 -1
- package/lib/E2E/Text/pages/TextPageObject.win.d.ts +1 -0
- package/lib/E2E/Text/pages/TextPageObject.win.d.ts.map +1 -1
- package/lib/E2E/Text/pages/TextPageObject.win.js +9 -2
- package/lib/E2E/Text/pages/TextPageObject.win.js.map +1 -1
- package/lib/E2E/Text/specs/Text.spec.win.js +10 -1
- package/lib/E2E/Text/specs/Text.spec.win.js.map +1 -1
- package/lib/E2E/common/BasePage.win.d.ts +2 -0
- package/lib/E2E/common/BasePage.win.d.ts.map +1 -1
- package/lib/E2E/common/BasePage.win.js +11 -0
- package/lib/E2E/common/BasePage.win.js.map +1 -1
- package/lib/E2E/common/consts.d.ts +9 -0
- package/lib/E2E/common/consts.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/Badge/BadgeTest.d.ts +4 -0
- package/lib/FluentTester/TestComponents/Badge/BadgeTest.d.ts.map +1 -0
- package/lib/FluentTester/TestComponents/Badge/BadgeTest.js +76 -0
- package/lib/FluentTester/TestComponents/Badge/BadgeTest.js.map +1 -0
- package/lib/FluentTester/TestComponents/Badge/consts.d.ts +3 -0
- package/lib/FluentTester/TestComponents/Badge/consts.d.ts.map +1 -0
- package/lib/FluentTester/TestComponents/Badge/consts.js +3 -0
- package/lib/FluentTester/TestComponents/Badge/consts.js.map +1 -0
- package/lib/FluentTester/TestComponents/Badge/index.d.ts +3 -0
- package/lib/FluentTester/TestComponents/Badge/index.d.ts.map +1 -0
- package/lib/FluentTester/TestComponents/Badge/index.js +3 -0
- package/lib/FluentTester/TestComponents/Badge/index.js.map +1 -0
- package/lib/FluentTester/TestComponents/CheckboxExperimental/CheckboxTest.js +1 -1
- package/lib/FluentTester/TestComponents/CheckboxExperimental/CheckboxTest.js.map +1 -1
- package/lib/FluentTester/TestComponents/Text/TextE2ETest.js +3 -3
- package/lib/FluentTester/TestComponents/Text/TextE2ETest.js.map +1 -1
- package/lib/FluentTester/TestComponents/Text/consts.d.ts +3 -3
- package/lib/FluentTester/TestComponents/Text/consts.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/Text/consts.js +3 -3
- package/lib/FluentTester/TestComponents/Text/consts.js.map +1 -1
- package/lib/FluentTester/testPages.android.d.ts.map +1 -1
- package/lib/FluentTester/testPages.android.js +6 -0
- package/lib/FluentTester/testPages.android.js.map +1 -1
- package/lib/FluentTester/testPages.d.ts.map +1 -1
- package/lib/FluentTester/testPages.ios.d.ts.map +1 -1
- package/lib/FluentTester/testPages.ios.js +6 -0
- package/lib/FluentTester/testPages.ios.js.map +1 -1
- package/lib/FluentTester/testPages.js +6 -0
- package/lib/FluentTester/testPages.js.map +1 -1
- package/lib/FluentTester/testPages.macos.d.ts.map +1 -1
- package/lib/FluentTester/testPages.macos.js +6 -0
- package/lib/FluentTester/testPages.macos.js.map +1 -1
- package/lib/FluentTester/testPages.web.d.ts.map +1 -1
- package/lib/FluentTester/testPages.web.js +6 -0
- package/lib/FluentTester/testPages.web.js.map +1 -1
- package/lib/FluentTester/testPages.win32.d.ts.map +1 -1
- package/lib/FluentTester/testPages.win32.js +6 -0
- package/lib/FluentTester/testPages.win32.js.map +1 -1
- package/lib/FluentTester/testPages.windows.d.ts.map +1 -1
- package/lib/FluentTester/testPages.windows.js +13 -6
- package/lib/FluentTester/testPages.windows.js.map +1 -1
- package/lib-commonjs/E2E/Button/pages/ButtonPageObject.d.ts +4 -0
- package/lib-commonjs/E2E/Button/pages/ButtonPageObject.d.ts.map +1 -1
- package/lib-commonjs/E2E/Button/pages/ButtonPageObject.js +14 -0
- package/lib-commonjs/E2E/Button/pages/ButtonPageObject.js.map +1 -1
- package/lib-commonjs/E2E/Button/specs/Button.spec.win.js +24 -4
- package/lib-commonjs/E2E/Button/specs/Button.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/Checkbox/pages/CheckboxPageObject.d.ts +3 -1
- package/lib-commonjs/E2E/Checkbox/pages/CheckboxPageObject.d.ts.map +1 -1
- package/lib-commonjs/E2E/Checkbox/pages/CheckboxPageObject.js +20 -3
- package/lib-commonjs/E2E/Checkbox/pages/CheckboxPageObject.js.map +1 -1
- package/lib-commonjs/E2E/Checkbox/specs/Checkbox.spec.win.js +31 -4
- package/lib-commonjs/E2E/Checkbox/specs/Checkbox.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/Checkbox/specs/Checkbox.spec.windows.d.ts +2 -0
- package/lib-commonjs/E2E/Checkbox/specs/Checkbox.spec.windows.d.ts.map +1 -0
- package/lib-commonjs/E2E/Checkbox/specs/Checkbox.spec.windows.js +70 -0
- package/lib-commonjs/E2E/Checkbox/specs/Checkbox.spec.windows.js.map +1 -0
- package/lib-commonjs/E2E/Text/pages/TextPageObject.macos.js +1 -1
- package/lib-commonjs/E2E/Text/pages/TextPageObject.macos.js.map +1 -1
- package/lib-commonjs/E2E/Text/pages/TextPageObject.win.d.ts +1 -0
- package/lib-commonjs/E2E/Text/pages/TextPageObject.win.d.ts.map +1 -1
- package/lib-commonjs/E2E/Text/pages/TextPageObject.win.js +8 -1
- package/lib-commonjs/E2E/Text/pages/TextPageObject.win.js.map +1 -1
- package/lib-commonjs/E2E/Text/specs/Text.spec.win.js +10 -1
- package/lib-commonjs/E2E/Text/specs/Text.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/common/BasePage.win.d.ts +2 -0
- package/lib-commonjs/E2E/common/BasePage.win.d.ts.map +1 -1
- package/lib-commonjs/E2E/common/BasePage.win.js +11 -0
- package/lib-commonjs/E2E/common/BasePage.win.js.map +1 -1
- package/lib-commonjs/E2E/common/consts.d.ts +9 -0
- package/lib-commonjs/E2E/common/consts.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Badge/BadgeTest.d.ts +4 -0
- package/lib-commonjs/FluentTester/TestComponents/Badge/BadgeTest.d.ts.map +1 -0
- package/lib-commonjs/FluentTester/TestComponents/Badge/BadgeTest.js +81 -0
- package/lib-commonjs/FluentTester/TestComponents/Badge/BadgeTest.js.map +1 -0
- package/lib-commonjs/FluentTester/TestComponents/Badge/consts.d.ts +3 -0
- package/lib-commonjs/FluentTester/TestComponents/Badge/consts.d.ts.map +1 -0
- package/lib-commonjs/FluentTester/TestComponents/Badge/consts.js +6 -0
- package/lib-commonjs/FluentTester/TestComponents/Badge/consts.js.map +1 -0
- package/lib-commonjs/FluentTester/TestComponents/Badge/index.d.ts +3 -0
- package/lib-commonjs/FluentTester/TestComponents/Badge/index.d.ts.map +1 -0
- package/lib-commonjs/FluentTester/TestComponents/Badge/index.js +6 -0
- package/lib-commonjs/FluentTester/TestComponents/Badge/index.js.map +1 -0
- package/lib-commonjs/FluentTester/TestComponents/CheckboxExperimental/CheckboxTest.js +1 -1
- package/lib-commonjs/FluentTester/TestComponents/CheckboxExperimental/CheckboxTest.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Text/TextE2ETest.js +2 -2
- package/lib-commonjs/FluentTester/TestComponents/Text/TextE2ETest.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Text/consts.d.ts +3 -3
- package/lib-commonjs/FluentTester/TestComponents/Text/consts.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Text/consts.js +4 -4
- package/lib-commonjs/FluentTester/TestComponents/Text/consts.js.map +1 -1
- package/lib-commonjs/FluentTester/testPages.android.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/testPages.android.js +6 -0
- package/lib-commonjs/FluentTester/testPages.android.js.map +1 -1
- package/lib-commonjs/FluentTester/testPages.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/testPages.ios.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/testPages.ios.js +6 -0
- package/lib-commonjs/FluentTester/testPages.ios.js.map +1 -1
- package/lib-commonjs/FluentTester/testPages.js +6 -0
- package/lib-commonjs/FluentTester/testPages.js.map +1 -1
- package/lib-commonjs/FluentTester/testPages.macos.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/testPages.macos.js +6 -0
- package/lib-commonjs/FluentTester/testPages.macos.js.map +1 -1
- package/lib-commonjs/FluentTester/testPages.web.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/testPages.web.js +6 -0
- package/lib-commonjs/FluentTester/testPages.web.js.map +1 -1
- package/lib-commonjs/FluentTester/testPages.win32.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/testPages.win32.js +6 -0
- package/lib-commonjs/FluentTester/testPages.win32.js.map +1 -1
- package/lib-commonjs/FluentTester/testPages.windows.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/testPages.windows.js +13 -6
- package/lib-commonjs/FluentTester/testPages.windows.js.map +1 -1
- package/package.json +10 -9
- package/src/E2E/Button/pages/ButtonPageObject.ts +20 -0
- package/src/E2E/Button/specs/Button.spec.win.ts +37 -6
- package/src/E2E/Checkbox/pages/CheckboxPageObject.ts +27 -3
- package/src/E2E/Checkbox/specs/Checkbox.spec.win.ts +48 -6
- package/src/E2E/Checkbox/specs/Checkbox.spec.windows.ts +86 -0
- package/src/E2E/Text/pages/TextPageObject.macos.ts +2 -2
- package/src/E2E/Text/pages/TextPageObject.win.ts +11 -2
- package/src/E2E/Text/specs/Text.spec.win.ts +14 -1
- package/src/E2E/common/BasePage.win.ts +13 -0
- package/src/E2E/common/consts.ts +11 -0
- package/src/FluentTester/TestComponents/Badge/BadgeTest.tsx +93 -0
- package/src/FluentTester/TestComponents/Badge/consts.ts +2 -0
- package/src/FluentTester/TestComponents/Badge/index.ts +2 -0
- package/src/FluentTester/TestComponents/Badge/oof.svg +3 -0
- package/src/FluentTester/TestComponents/CheckboxExperimental/CheckboxTest.tsx +1 -1
- package/src/FluentTester/TestComponents/Text/TextE2ETest.tsx +4 -4
- package/src/FluentTester/TestComponents/Text/consts.ts +3 -3
- package/src/FluentTester/testPages.android.ts +6 -0
- package/src/FluentTester/testPages.ios.ts +6 -0
- package/src/FluentTester/testPages.macos.ts +6 -0
- package/src/FluentTester/testPages.ts +6 -0
- package/src/FluentTester/testPages.web.ts +6 -0
- package/src/FluentTester/testPages.win32.ts +6 -0
- package/src/FluentTester/testPages.windows.ts +13 -6
|
@@ -3,10 +3,30 @@ import {
|
|
|
3
3
|
BUTTON_TEST_COMPONENT,
|
|
4
4
|
BUTTON_NO_A11Y_LABEL_COMPONENT,
|
|
5
5
|
HOMEPAGE_BUTTON_BUTTON,
|
|
6
|
+
BUTTON_ON_PRESS,
|
|
6
7
|
} from '../../../FluentTester/TestComponents/Button/consts';
|
|
7
8
|
import { BasePage, By } from '../../common/BasePage.win';
|
|
8
9
|
|
|
9
10
|
class ButtonPageObject extends BasePage {
|
|
11
|
+
/******************************************************************/
|
|
12
|
+
/**************** UI Element Interaction Methods ******************/
|
|
13
|
+
/******************************************************************/
|
|
14
|
+
didOnClickCallbackFire(): boolean {
|
|
15
|
+
const callbackText = By(BUTTON_ON_PRESS);
|
|
16
|
+
browser.waitUntil(
|
|
17
|
+
() => {
|
|
18
|
+
return callbackText.isDisplayed();
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
timeout: this.waitForPageTimeout,
|
|
22
|
+
timeoutMsg: 'The OnClick callback did not fire.',
|
|
23
|
+
interval: 1000,
|
|
24
|
+
},
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
return callbackText.isDisplayed();
|
|
28
|
+
}
|
|
29
|
+
|
|
10
30
|
/*****************************************/
|
|
11
31
|
/**************** Getters ****************/
|
|
12
32
|
/*****************************************/
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import NavigateAppPage from '../../common/NavigateAppPage.win';
|
|
2
2
|
import ButtonPageObject from '../pages/ButtonPageObject';
|
|
3
3
|
import { ComponentSelector } from '../../common/BasePage.win';
|
|
4
|
-
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT, BUTTON_A11Y_ROLE } from '../../common/consts';
|
|
5
|
-
import {
|
|
4
|
+
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT, BUTTON_A11Y_ROLE, Keys } from '../../common/consts';
|
|
5
|
+
import {
|
|
6
|
+
BUTTON_TEST_COMPONENT,
|
|
7
|
+
BUTTON_ACCESSIBILITY_LABEL,
|
|
8
|
+
BUTTON_TEST_COMPONENT_LABEL,
|
|
9
|
+
} from '../../../FluentTester/TestComponents/Button/consts';
|
|
6
10
|
|
|
7
11
|
// Before testing begins, allow up to 60 seconds for app to open
|
|
8
12
|
describe('Button Testing Initialization', function () {
|
|
@@ -25,21 +29,48 @@ describe('Button Testing Initialization', function () {
|
|
|
25
29
|
});
|
|
26
30
|
|
|
27
31
|
describe('Button Accessibility Testing', () => {
|
|
28
|
-
|
|
32
|
+
/* Scrolls and waits for the Button to be visible on the Test Page */
|
|
33
|
+
beforeEach(() => {
|
|
29
34
|
ButtonPageObject.scrollToTestElement();
|
|
30
35
|
ButtonPageObject.waitForPrimaryElementDisplayed(PAGE_TIMEOUT);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it('Button - Validate accessibilityRole is correct', () => {
|
|
31
39
|
expect(ButtonPageObject.getAccessibilityRole()).toEqual(BUTTON_A11Y_ROLE);
|
|
32
40
|
});
|
|
33
41
|
|
|
34
42
|
it('Button - Set accessibilityLabel', () => {
|
|
35
|
-
ButtonPageObject.scrollToTestElement();
|
|
36
|
-
ButtonPageObject.waitForPrimaryElementDisplayed(PAGE_TIMEOUT);
|
|
37
43
|
expect(ButtonPageObject.getAccessibilityLabel(ComponentSelector.Primary)).toEqual(BUTTON_ACCESSIBILITY_LABEL);
|
|
38
44
|
});
|
|
39
45
|
|
|
40
46
|
it('Button - Do not set accessibilityLabel -> Default to Button label', () => {
|
|
47
|
+
expect(ButtonPageObject.getAccessibilityLabel(ComponentSelector.Secondary)).toEqual(BUTTON_TEST_COMPONENT_LABEL);
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
describe('Button Functional Testing', () => {
|
|
52
|
+
/* Scrolls and waits for the Button to be visible on the Test Page */
|
|
53
|
+
beforeEach(() => {
|
|
41
54
|
ButtonPageObject.scrollToTestElement();
|
|
42
55
|
ButtonPageObject.waitForPrimaryElementDisplayed(PAGE_TIMEOUT);
|
|
43
|
-
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
it('Validate OnClick() callback was fired -> Click', () => {
|
|
59
|
+
ButtonPageObject.clickComponent();
|
|
60
|
+
expect(ButtonPageObject.didOnClickCallbackFire()).toBeTruthy();
|
|
61
|
+
|
|
62
|
+
ButtonPageObject.clickComponent(); // Reset Button State
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
it('Validate OnClick() callback was fired -> Type "Enter"', () => {
|
|
66
|
+
ButtonPageObject.sendKey(BUTTON_TEST_COMPONENT, Keys.Enter);
|
|
67
|
+
expect(ButtonPageObject.didOnClickCallbackFire()).toBeTruthy();
|
|
68
|
+
|
|
69
|
+
ButtonPageObject.clickComponent(); // Reset Button State
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
it('Validate OnClick() callback was fired -> Type "Spacebar"', () => {
|
|
73
|
+
ButtonPageObject.sendKey(BUTTON_TEST_COMPONENT, Keys.Spacebar);
|
|
74
|
+
expect(ButtonPageObject.didOnClickCallbackFire()).toBeTruthy();
|
|
44
75
|
});
|
|
45
76
|
});
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
CHECKBOX_TEST_COMPONENT,
|
|
4
4
|
CHECKBOX_NO_A11Y_LABEL_COMPONENT,
|
|
5
5
|
HOMEPAGE_CHECKBOX_BUTTON,
|
|
6
|
+
CHECKBOX_ON_PRESS,
|
|
6
7
|
} from '../../../FluentTester/TestComponents/Checkbox/consts';
|
|
7
8
|
import { BasePage, By } from '../../common/BasePage.win';
|
|
8
9
|
|
|
@@ -14,19 +15,42 @@ class CheckboxPageObject extends BasePage {
|
|
|
14
15
|
return this._primaryComponent.isSelected();
|
|
15
16
|
}
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
waitForCheckboxChecked(timeout?: number): void {
|
|
18
19
|
browser.waitUntil(
|
|
19
20
|
() => {
|
|
20
|
-
return
|
|
21
|
+
return this.isCheckboxChecked();
|
|
21
22
|
},
|
|
22
23
|
{
|
|
23
24
|
timeout: timeout ?? this.waitForPageTimeout,
|
|
24
|
-
timeoutMsg: 'The
|
|
25
|
+
timeoutMsg: 'The Checkbox was not toggled correctly',
|
|
25
26
|
interval: 1000,
|
|
26
27
|
},
|
|
27
28
|
);
|
|
28
29
|
}
|
|
29
30
|
|
|
31
|
+
/* Useful in beforeEach() hook to reset the checkbox before every test */
|
|
32
|
+
toggleCheckboxToUnchecked(): void {
|
|
33
|
+
if (this.isCheckboxChecked()) {
|
|
34
|
+
this._primaryComponent.click();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
didOnChangeCallbackFire(): boolean {
|
|
39
|
+
const callbackText = By(CHECKBOX_ON_PRESS);
|
|
40
|
+
browser.waitUntil(
|
|
41
|
+
() => {
|
|
42
|
+
return callbackText.isDisplayed();
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
timeout: this.waitForPageTimeout,
|
|
46
|
+
timeoutMsg: 'The OnChange callback did not fire.',
|
|
47
|
+
interval: 1000,
|
|
48
|
+
},
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
return callbackText.isDisplayed();
|
|
52
|
+
}
|
|
53
|
+
|
|
30
54
|
/*****************************************/
|
|
31
55
|
/**************** Getters ****************/
|
|
32
56
|
/*****************************************/
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import NavigateAppPage from '../../common/NavigateAppPage.win';
|
|
2
2
|
import CheckboxPageObject from '../pages/CheckboxPageObject';
|
|
3
3
|
import { ComponentSelector } from '../../common/BasePage.win';
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import {
|
|
5
|
+
CHECKBOX_TEST_COMPONENT_LABEL,
|
|
6
|
+
CHECKBOX_ACCESSIBILITY_LABEL,
|
|
7
|
+
CHECKBOX_TEST_COMPONENT,
|
|
8
|
+
} from '../../../FluentTester/TestComponents/Checkbox/consts';
|
|
9
|
+
import { CHECKBOX_A11Y_ROLE, PAGE_TIMEOUT, BOOT_APP_TIMEOUT, Keys } from '../../common/consts';
|
|
6
10
|
|
|
7
11
|
describe('Checkbox Testing Initialization', () => {
|
|
8
12
|
it('Wait for app load', () => {
|
|
@@ -24,21 +28,59 @@ describe('Checkbox Testing Initialization', () => {
|
|
|
24
28
|
});
|
|
25
29
|
|
|
26
30
|
describe('Checkbox Accessibility Testing', () => {
|
|
27
|
-
|
|
31
|
+
/* Scrolls and waits for the Checkbox to be visible on the Test Page */
|
|
32
|
+
beforeEach(() => {
|
|
28
33
|
CheckboxPageObject.scrollToTestElement();
|
|
29
34
|
CheckboxPageObject.waitForPrimaryElementDisplayed(PAGE_TIMEOUT);
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it('Checkbox - Validate accessibilityRole is correct', () => {
|
|
30
38
|
expect(CheckboxPageObject.getAccessibilityRole()).toEqual(CHECKBOX_A11Y_ROLE);
|
|
31
39
|
});
|
|
32
40
|
|
|
33
41
|
it('Checkbox - Set accessibilityLabel', () => {
|
|
34
|
-
CheckboxPageObject.scrollToTestElement();
|
|
35
|
-
CheckboxPageObject.waitForPrimaryElementDisplayed(PAGE_TIMEOUT);
|
|
36
42
|
expect(CheckboxPageObject.getAccessibilityLabel(ComponentSelector.Primary)).toEqual(CHECKBOX_ACCESSIBILITY_LABEL);
|
|
37
43
|
});
|
|
38
44
|
|
|
39
45
|
it('Checkbox - Do not set accessibilityLabel -> Default to Checkbox label', () => {
|
|
46
|
+
expect(CheckboxPageObject.getAccessibilityLabel(ComponentSelector.Secondary)).toEqual(CHECKBOX_TEST_COMPONENT_LABEL);
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
describe('Checkbox Functional Testing', () => {
|
|
51
|
+
/* Scrolls and waits for the Checkbox to be visible on the Test Page AND un-checks the Checkbox */
|
|
52
|
+
beforeEach(() => {
|
|
40
53
|
CheckboxPageObject.scrollToTestElement();
|
|
41
54
|
CheckboxPageObject.waitForPrimaryElementDisplayed(PAGE_TIMEOUT);
|
|
42
|
-
|
|
55
|
+
|
|
56
|
+
CheckboxPageObject.toggleCheckboxToUnchecked();
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
it("Click on a Checkbox -> Validate it toggles correctly AND calls the user's onChange", () => {
|
|
60
|
+
/* Validate the Checkbox is initially toggled OFF */
|
|
61
|
+
expect(CheckboxPageObject.isCheckboxChecked()).toBeFalsy();
|
|
62
|
+
|
|
63
|
+
/* Click on the Checkbox to toggle on */
|
|
64
|
+
CheckboxPageObject.clickComponent();
|
|
65
|
+
CheckboxPageObject.waitForCheckboxChecked(PAGE_TIMEOUT);
|
|
66
|
+
|
|
67
|
+
expect(CheckboxPageObject.didOnChangeCallbackFire()).toBeTruthy();
|
|
68
|
+
|
|
69
|
+
/* Validate the Checkbox is toggled ON */
|
|
70
|
+
expect(CheckboxPageObject.isCheckboxChecked()).toBeTruthy();
|
|
71
|
+
|
|
72
|
+
CheckboxPageObject.clickComponent();
|
|
73
|
+
|
|
74
|
+
/* Validate the Checkbox is toggled OFF */
|
|
75
|
+
expect(CheckboxPageObject.isCheckboxChecked()).toBeFalsy();
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
it('Click the "Spacebar" on a Checkbox and verify it toggles', () => {
|
|
79
|
+
/* Presses the "space bar" to select the Checkbox */
|
|
80
|
+
CheckboxPageObject.sendKey(CHECKBOX_TEST_COMPONENT, Keys.Spacebar);
|
|
81
|
+
CheckboxPageObject.waitForCheckboxChecked(PAGE_TIMEOUT);
|
|
82
|
+
|
|
83
|
+
/* Validate the Checkbox is selected */
|
|
84
|
+
expect(CheckboxPageObject.isCheckboxChecked()).toBeTruthy();
|
|
43
85
|
});
|
|
44
86
|
});
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import NavigateAppPage from '../../common/NavigateAppPage.win';
|
|
2
|
+
import CheckboxPageObject from '../pages/CheckboxPageObject';
|
|
3
|
+
import { ComponentSelector } from '../../common/BasePage.win';
|
|
4
|
+
import { CHECKBOX_TEST_COMPONENT_LABEL, CHECKBOX_ACCESSIBILITY_LABEL } from '../../../FluentTester/TestComponents/Checkbox/consts';
|
|
5
|
+
import { CHECKBOX_A11Y_ROLE, PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
|
|
6
|
+
|
|
7
|
+
describe('Checkbox Testing Initialization', () => {
|
|
8
|
+
it('Wait for app load', () => {
|
|
9
|
+
NavigateAppPage.waitForPageDisplayed(BOOT_APP_TIMEOUT);
|
|
10
|
+
expect(NavigateAppPage.isPageLoaded()).toBeTruthy();
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
it('Click and navigate to Checkbox test page', () => {
|
|
14
|
+
/* Scroll to component test page button in scrollview if not already visible*/
|
|
15
|
+
CheckboxPageObject.scrollToComponentButton();
|
|
16
|
+
CheckboxPageObject.waitForButtonDisplayed(PAGE_TIMEOUT);
|
|
17
|
+
|
|
18
|
+
/* Click on component button to navigate to test page */
|
|
19
|
+
NavigateAppPage.clickAndGoToCheckboxPage();
|
|
20
|
+
CheckboxPageObject.waitForPageDisplayed(PAGE_TIMEOUT);
|
|
21
|
+
|
|
22
|
+
expect(CheckboxPageObject.isPageLoaded()).toBeTruthy();
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
describe('Checkbox Accessibility Testing', () => {
|
|
27
|
+
/* Scrolls and waits for the Checkbox to be visible on the Test Page */
|
|
28
|
+
beforeEach(() => {
|
|
29
|
+
CheckboxPageObject.scrollToTestElement();
|
|
30
|
+
CheckboxPageObject.waitForPrimaryElementDisplayed(PAGE_TIMEOUT);
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
it('Checkbox - Validate accessibilityRole is correct', () => {
|
|
34
|
+
expect(CheckboxPageObject.getAccessibilityRole()).toEqual(CHECKBOX_A11Y_ROLE);
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it('Checkbox - Set accessibilityLabel', () => {
|
|
38
|
+
expect(CheckboxPageObject.getAccessibilityLabel(ComponentSelector.Primary)).toEqual(CHECKBOX_ACCESSIBILITY_LABEL);
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
it('Checkbox - Do not set accessibilityLabel -> Default to Checkbox label', () => {
|
|
42
|
+
expect(CheckboxPageObject.getAccessibilityLabel(ComponentSelector.Secondary)).toEqual(CHECKBOX_TEST_COMPONENT_LABEL);
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
/* These currently don't work on UWP because element.isSelected() always returns false. I will need to debug and figure
|
|
47
|
+
* out why this isn't supported on UWP, and if there's a potential workaround. Task #5747337 */
|
|
48
|
+
// describe('Checkbox Functional Testing', () => {
|
|
49
|
+
// /* Scrolls and waits for the Checkbox to be visible on the Test Page AND un-checks the Checkbox */
|
|
50
|
+
// beforeEach(() => {
|
|
51
|
+
// CheckboxPageObject.scrollToTestElement();
|
|
52
|
+
// CheckboxPageObject.waitForPrimaryElementDisplayed(PAGE_TIMEOUT);
|
|
53
|
+
|
|
54
|
+
// CheckboxPageObject.toggleCheckboxToUnchecked();
|
|
55
|
+
// });
|
|
56
|
+
|
|
57
|
+
// it("Click on a Checkbox -> Validate it toggles correctly AND calls the user's onChange", () => {
|
|
58
|
+
// /* Validate the Checkbox is initially toggled OFF */
|
|
59
|
+
// expect(CheckboxPageObject.isCheckboxChecked()).toBeFalsy();
|
|
60
|
+
// console.log('Checkbox is checked: ' + CheckboxPageObject.isCheckboxChecked());
|
|
61
|
+
|
|
62
|
+
// /* Click on the Checkbox to toggle on */
|
|
63
|
+
// CheckboxPageObject.clickComponent();
|
|
64
|
+
|
|
65
|
+
// CheckboxPageObject.waitForCheckboxChecked(PAGE_TIMEOUT);
|
|
66
|
+
|
|
67
|
+
// expect(CheckboxPageObject.didOnChangeCallbackFire()).toBeTruthy();
|
|
68
|
+
|
|
69
|
+
// /* Validate the Checkbox is toggled ON */
|
|
70
|
+
// expect(CheckboxPageObject.isCheckboxChecked()).toBeTruthy();
|
|
71
|
+
|
|
72
|
+
// CheckboxPageObject.clickComponent();
|
|
73
|
+
|
|
74
|
+
// /* Validate the Checkbox is toggled OFF */
|
|
75
|
+
// expect(CheckboxPageObject.isCheckboxChecked()).toBeFalsy();
|
|
76
|
+
// });
|
|
77
|
+
|
|
78
|
+
// it('Click the "Spacebar" on a Checkbox and verify it toggles', () => {
|
|
79
|
+
// /* Presses the "space bar" to select the Checkbox */
|
|
80
|
+
// CheckboxPageObject.sendKey(CHECKBOX_TEST_COMPONENT, Keys.Spacebar);
|
|
81
|
+
// CheckboxPageObject.waitForCheckboxChecked(PAGE_TIMEOUT);
|
|
82
|
+
|
|
83
|
+
// /* Validate the Checkbox is selected */
|
|
84
|
+
// expect(CheckboxPageObject.isCheckboxChecked()).toBeTruthy();
|
|
85
|
+
// });
|
|
86
|
+
// });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TEXT_TESTPAGE,
|
|
1
|
+
import { TEXT_TESTPAGE, FIRST_TEXT_COMPONENT, HOMEPAGE_TEXT_BUTTON } from '../../../FluentTester/TestComponents/Text/consts';
|
|
2
2
|
import { BasePage, By } from '../../common/BasePage.macos';
|
|
3
3
|
|
|
4
4
|
class TextPageObject extends BasePage {
|
|
@@ -14,7 +14,7 @@ class TextPageObject extends BasePage {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
get _primaryComponent() {
|
|
17
|
-
return By(
|
|
17
|
+
return By(FIRST_TEXT_COMPONENT);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
get _pageButton() {
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
TEXT_TESTPAGE,
|
|
3
|
+
FIRST_TEXT_COMPONENT,
|
|
4
|
+
HOMEPAGE_TEXT_BUTTON,
|
|
5
|
+
SECOND_TEXT_COMPONENT,
|
|
6
|
+
} from '../../../FluentTester/TestComponents/Text/consts';
|
|
2
7
|
import { BasePage, By } from '../../common/BasePage.win';
|
|
3
8
|
|
|
4
9
|
class TextPageObject extends BasePage {
|
|
@@ -14,7 +19,11 @@ class TextPageObject extends BasePage {
|
|
|
14
19
|
}
|
|
15
20
|
|
|
16
21
|
get _primaryComponent() {
|
|
17
|
-
return By(
|
|
22
|
+
return By(FIRST_TEXT_COMPONENT);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
get _secondaryComponent() {
|
|
26
|
+
return By(SECOND_TEXT_COMPONENT);
|
|
18
27
|
}
|
|
19
28
|
|
|
20
29
|
get _pageButton() {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import NavigateAppPage from '../../common/NavigateAppPage.win';
|
|
2
2
|
import TextPageObject from '../pages/TextPageObject.win';
|
|
3
|
+
import { ComponentSelector } from '../../common/BasePage.win';
|
|
3
4
|
import { TEXT_A11Y_ROLE, PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
|
|
5
|
+
import { TEXT_ACCESSIBILITY_LABEL, TEXT_COMPONENT_CONTENT } from '../../../FluentTester/TestComponents/Text/consts';
|
|
4
6
|
|
|
5
7
|
// Before testing begins, allow up to 60 seconds for app to open
|
|
6
8
|
describe('Text Testing Initialization', function () {
|
|
@@ -23,9 +25,20 @@ describe('Text Testing Initialization', function () {
|
|
|
23
25
|
});
|
|
24
26
|
|
|
25
27
|
describe('Text Accessibility Testing', () => {
|
|
26
|
-
|
|
28
|
+
beforeEach(() => {
|
|
27
29
|
TextPageObject.scrollToTestElement();
|
|
28
30
|
TextPageObject.waitForPrimaryElementDisplayed(PAGE_TIMEOUT);
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
it('Text - Validate accessibilityRole is correct', () => {
|
|
29
34
|
expect(TextPageObject.getAccessibilityRole()).toEqual(TEXT_A11Y_ROLE);
|
|
30
35
|
});
|
|
36
|
+
|
|
37
|
+
it('Text - Set accessibilityLabel', () => {
|
|
38
|
+
expect(TextPageObject.getAccessibilityLabel(ComponentSelector.Primary)).toEqual(TEXT_ACCESSIBILITY_LABEL);
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
it('Text - Do not accessibilityLabel -> Default to content', () => {
|
|
42
|
+
expect(TextPageObject.getAccessibilityLabel(ComponentSelector.Secondary)).toEqual(TEXT_COMPONENT_CONTENT);
|
|
43
|
+
});
|
|
31
44
|
});
|
|
@@ -52,6 +52,18 @@ export class BasePage {
|
|
|
52
52
|
return this._pageButton.isDisplayed();
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
+
clickComponent(): void {
|
|
56
|
+
this._primaryComponent.click();
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* ****TODO****: I need to better use the ComponentSelector for this. We shouldn't have the spec needing to import the constant string */
|
|
60
|
+
sendKey(componentID?: string, key?: string): void {
|
|
61
|
+
const component = By(componentID);
|
|
62
|
+
if (component.isDisplayed()) {
|
|
63
|
+
component.addValue(key); // Adding a value sends the key on that component
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
55
67
|
/* Scrolls until the desired test page's button is displayed. We use the scroll viewer UI element as the point to start scrolling.
|
|
56
68
|
* We use a negative number as the Y-coordinate because that enables us to scroll downwards */
|
|
57
69
|
scrollToComponentButton(): void {
|
|
@@ -109,6 +121,7 @@ export class BasePage {
|
|
|
109
121
|
while (!this._primaryComponent.isDisplayed()) {
|
|
110
122
|
driver.touchScroll(COMPONENT_SCROLL_COORDINATES.x, COMPONENT_SCROLL_COORDINATES.y, $('~ScrollViewAreaForComponents').elementId);
|
|
111
123
|
}
|
|
124
|
+
driver.touchScroll(COMPONENT_SCROLL_COORDINATES.x, COMPONENT_SCROLL_COORDINATES.y, $('~ScrollViewAreaForComponents').elementId);
|
|
112
125
|
}
|
|
113
126
|
|
|
114
127
|
/* A method that allows the caller to pass in a condition. A wrapper for waitUntil(). Once testing becomes more extensive,
|
package/src/E2E/common/consts.ts
CHANGED
|
@@ -13,3 +13,14 @@ export const TEXT_A11Y_ROLE = 'ControlType.Text';
|
|
|
13
13
|
/* Jasmine Timeouts */
|
|
14
14
|
export const BOOT_APP_TIMEOUT = 60000;
|
|
15
15
|
export const PAGE_TIMEOUT = 15000;
|
|
16
|
+
|
|
17
|
+
/* Keyboard Key Constants */
|
|
18
|
+
export const enum Keys {
|
|
19
|
+
Up_Arrow = 'ArrowUp',
|
|
20
|
+
Right_Arrow = 'ArrowRight',
|
|
21
|
+
Down_Arrow = 'ArrowDown',
|
|
22
|
+
Left_Arrow = 'ArrowLeft',
|
|
23
|
+
Spacebar = ' ',
|
|
24
|
+
Enter = 'Enter',
|
|
25
|
+
Escape = 'Escape',
|
|
26
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { BADGE_TESTPAGE } from './consts';
|
|
4
|
+
import { Test, TestSection, PlatformStatus } from '../Test';
|
|
5
|
+
import { View, Platform, Text } from 'react-native';
|
|
6
|
+
import { Badge, CompressibleBadge } from '@fluentui-react-native/badge';
|
|
7
|
+
import BadgeSvg from './oof.svg';
|
|
8
|
+
|
|
9
|
+
import { SvgIconProps } from '@fluentui-react-native/icon';
|
|
10
|
+
|
|
11
|
+
export const BasicBadge: React.FunctionComponent = () => {
|
|
12
|
+
const svgProps: SvgIconProps = {
|
|
13
|
+
src: BadgeSvg,
|
|
14
|
+
viewBox: '0 0 28 28',
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const fontBuiltInProps = {
|
|
18
|
+
fontFamily: 'Arial',
|
|
19
|
+
codepoint: 0x2663,
|
|
20
|
+
fontSize: 16,
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const BadgeNoBorder = Badge.customize({
|
|
24
|
+
borderColor: 'transparent',
|
|
25
|
+
borderWidth: 0,
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
const StyledBadge = Badge.customize({
|
|
29
|
+
backgroundColor: 'yellow',
|
|
30
|
+
borderColor: '#f09',
|
|
31
|
+
borderWidth: 4,
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
const svgIconsEnabled = ['ios', 'macos', 'win32', 'android'].includes(Platform.OS as string);
|
|
35
|
+
const iconProps = { svgSource: svgProps, width: 20, height: 20 };
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<View>
|
|
39
|
+
<Badge />
|
|
40
|
+
<Text>Appearance</Text>
|
|
41
|
+
<Badge appearance="outline" text="Outline badge" />
|
|
42
|
+
<Text>Shape</Text>
|
|
43
|
+
<Badge shape="circular" text="Circular badge" />
|
|
44
|
+
<Badge shape="rounded" text="rounded badge" />
|
|
45
|
+
<Badge shape="square" text="Square badge" />
|
|
46
|
+
<Text>Size</Text>
|
|
47
|
+
<Badge size="smallest" shape="circular" />
|
|
48
|
+
<Badge size="smaller" shape="circular" />
|
|
49
|
+
<Badge size="small" text="Small" />
|
|
50
|
+
<Badge size="medium" text="Medium" />
|
|
51
|
+
<Badge size="large" text="Large" />
|
|
52
|
+
<Badge size="largest" text="Largest" />
|
|
53
|
+
{svgIconsEnabled && (
|
|
54
|
+
<>
|
|
55
|
+
<Text>Badge with icon</Text>
|
|
56
|
+
<Badge appearance="outline" icon={iconProps} />
|
|
57
|
+
<Badge icon={{ fontSource: { ...fontBuiltInProps }, color: '#fff' }} />
|
|
58
|
+
<Text>Badge with icon and text</Text>
|
|
59
|
+
<Badge appearance="outline" icon={iconProps} />
|
|
60
|
+
</>
|
|
61
|
+
)}
|
|
62
|
+
<Text>Customized Badge</Text>
|
|
63
|
+
<BadgeNoBorder appearance="outline" icon={iconProps} />
|
|
64
|
+
<StyledBadge appearance="outline" text="styled badge" />
|
|
65
|
+
<Text>Compressible badge</Text>
|
|
66
|
+
<CompressibleBadge />
|
|
67
|
+
<CompressibleBadge text="Basic compressible" />
|
|
68
|
+
</View>
|
|
69
|
+
);
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
const badgeSections: TestSection[] = [
|
|
73
|
+
{
|
|
74
|
+
name: 'Basic Badge',
|
|
75
|
+
testID: BADGE_TESTPAGE,
|
|
76
|
+
component: BasicBadge,
|
|
77
|
+
},
|
|
78
|
+
];
|
|
79
|
+
|
|
80
|
+
export const BadgeTest: React.FunctionComponent = () => {
|
|
81
|
+
const status: PlatformStatus = {
|
|
82
|
+
win32Status: 'Beta',
|
|
83
|
+
uwpStatus: 'Experimental',
|
|
84
|
+
iosStatus: 'Experimental',
|
|
85
|
+
macosStatus: 'Experimental',
|
|
86
|
+
androidStatus: 'Backlog',
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
const description =
|
|
90
|
+
'A badge is an additional visual discriptor for UI elements. It can be used to denote numerical value, status or general information.\n Included in this spec are base properties for usage in all badge scenarios. Reference properties for other badge types i.e. size, layout, and style variations';
|
|
91
|
+
|
|
92
|
+
return <Test name="Badge Test" description={description} sections={badgeSections} status={status}></Test>;
|
|
93
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M14 0C6.26801 0 0 6.26801 0 14C0 21.732 6.26801 28 14 28C21.732 28 28 21.732 28 14C28 6.26801 21.732 0 14 0ZM2.80129 14C2.80129 7.81512 7.81512 2.80129 14 2.80129C20.1849 2.80129 25.1987 7.81512 25.1987 14C25.1987 20.1849 20.1849 25.1987 14 25.1987C7.81512 25.1987 2.80129 20.1849 2.80129 14ZM19.8991 9.51445C20.4461 10.0614 20.4461 10.9483 19.8991 11.4953L13.5962 17.7982C13.0492 18.3452 12.1624 18.3452 11.6154 17.7982L8.81412 14.9969C8.26714 14.4499 8.26714 13.563 8.81412 13.0161C9.36111 12.4691 10.2479 12.4691 10.7949 13.0161L12.6058 14.827L17.9183 9.51445C18.4653 8.96746 19.3522 8.96746 19.8991 9.51445Z" fill="#C239B3"/>
|
|
3
|
+
</svg>
|
|
@@ -151,7 +151,7 @@ const checkboxSections: TestSection[] = [
|
|
|
151
151
|
export const ExperimentalCheckboxTest: React.FunctionComponent = () => {
|
|
152
152
|
const status: PlatformStatus = {
|
|
153
153
|
win32Status: 'Beta',
|
|
154
|
-
uwpStatus: '
|
|
154
|
+
uwpStatus: 'N/A',
|
|
155
155
|
iosStatus: 'N/A',
|
|
156
156
|
macosStatus: 'Experimental',
|
|
157
157
|
androidStatus: 'N/A',
|
|
@@ -3,17 +3,17 @@ import { View } from 'react-native';
|
|
|
3
3
|
import { Text } from '@fluentui/react-native';
|
|
4
4
|
import { Stack } from '@fluentui-react-native/stack';
|
|
5
5
|
import { stackStyle } from '../Common/styles';
|
|
6
|
-
import {
|
|
6
|
+
import { FIRST_TEXT_COMPONENT, TEXT_ACCESSIBILITY_LABEL, SECOND_TEXT_COMPONENT, TEXT_COMPONENT_CONTENT } from './consts';
|
|
7
7
|
|
|
8
8
|
export const E2ETextTest: React.FunctionComponent = () => {
|
|
9
9
|
return (
|
|
10
10
|
<View>
|
|
11
11
|
<Stack style={stackStyle} gap={5}>
|
|
12
|
-
<Text variant="captionStandard" testID={
|
|
12
|
+
<Text variant="captionStandard" testID={FIRST_TEXT_COMPONENT} accessibilityLabel={TEXT_ACCESSIBILITY_LABEL}>
|
|
13
13
|
Testing Text Component - AccessibilityLabel Set
|
|
14
14
|
</Text>
|
|
15
|
-
<Text variant="captionStandard" testID={
|
|
16
|
-
{
|
|
15
|
+
<Text variant="captionStandard" testID={SECOND_TEXT_COMPONENT}>
|
|
16
|
+
{TEXT_COMPONENT_CONTENT}
|
|
17
17
|
</Text>
|
|
18
18
|
</Stack>
|
|
19
19
|
</View>
|
|
@@ -2,9 +2,9 @@ export const HOMEPAGE_TEXT_BUTTON = 'Homepage_Text_Button';
|
|
|
2
2
|
export const TEXT_TESTPAGE = 'Text_TestPage';
|
|
3
3
|
|
|
4
4
|
/* E2E Testing Text 1 */
|
|
5
|
-
export const
|
|
5
|
+
export const FIRST_TEXT_COMPONENT = 'Text_Test_Component'; // A component on each specific test page
|
|
6
6
|
export const TEXT_ACCESSIBILITY_LABEL = 'E2E testing Text_Test_Component accessibility label';
|
|
7
7
|
|
|
8
8
|
/* E2E Testing Text 2 */
|
|
9
|
-
export const
|
|
10
|
-
export const
|
|
9
|
+
export const SECOND_TEXT_COMPONENT = 'Text_No_A11y_label_Component';
|
|
10
|
+
export const TEXT_COMPONENT_CONTENT = 'Test Text2 - No Accessibility Label'; // A component on each specific test page
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TestDescription } from './TestComponents';
|
|
2
2
|
import { JSAvatarTest, HOMEPAGE_AVATAR_BUTTON } from './TestComponents/Avatar';
|
|
3
|
+
import { BadgeTest, HOMEPAGE_BADGE } from './TestComponents/Badge';
|
|
3
4
|
import { ButtonTest, HOMEPAGE_BUTTON_BUTTON } from './TestComponents/Button';
|
|
4
5
|
import { CalloutTest, HOMEPAGE_CALLOUT_BUTTON } from './TestComponents/Callout';
|
|
5
6
|
import { CheckboxTest, HOMEPAGE_CHECKBOX_BUTTON } from './TestComponents/Checkbox';
|
|
@@ -34,6 +35,11 @@ export const tests: TestDescription[] = [
|
|
|
34
35
|
component: JSAvatarTest,
|
|
35
36
|
testPage: HOMEPAGE_AVATAR_BUTTON,
|
|
36
37
|
},
|
|
38
|
+
{
|
|
39
|
+
name: 'Badge Test',
|
|
40
|
+
component: BadgeTest,
|
|
41
|
+
testPage: HOMEPAGE_BADGE,
|
|
42
|
+
},
|
|
37
43
|
{
|
|
38
44
|
name: 'Button Test',
|
|
39
45
|
component: ButtonTest,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TestDescription } from './TestComponents';
|
|
2
2
|
import { AvatarTest, HOMEPAGE_AVATAR_BUTTON } from './TestComponents/Avatar';
|
|
3
|
+
import { BadgeTest, HOMEPAGE_BADGE } from './TestComponents/Badge';
|
|
3
4
|
import { ButtonTest, HOMEPAGE_BUTTON_BUTTON } from './TestComponents/Button';
|
|
4
5
|
import { CheckboxTest, HOMEPAGE_CHECKBOX_BUTTON } from './TestComponents/Checkbox';
|
|
5
6
|
import { ExperimentalCheckboxTest, HOMEPAGE_CHECKBOX_EXPERIMENTAL_BUTTON } from './TestComponents/CheckboxExperimental';
|
|
@@ -31,6 +32,11 @@ export const tests: TestDescription[] = [
|
|
|
31
32
|
component: AvatarTest,
|
|
32
33
|
testPage: HOMEPAGE_AVATAR_BUTTON,
|
|
33
34
|
},
|
|
35
|
+
{
|
|
36
|
+
name: 'Badge Test',
|
|
37
|
+
component: BadgeTest,
|
|
38
|
+
testPage: HOMEPAGE_BADGE,
|
|
39
|
+
},
|
|
34
40
|
{
|
|
35
41
|
name: 'Button Test',
|
|
36
42
|
component: ButtonTest,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TestDescription } from './TestComponents';
|
|
2
2
|
import { AvatarTest, HOMEPAGE_AVATAR_BUTTON } from './TestComponents/Avatar';
|
|
3
|
+
import { BadgeTest, HOMEPAGE_BADGE } from './TestComponents/Badge';
|
|
3
4
|
import { ButtonTest, HOMEPAGE_BUTTON_BUTTON } from './TestComponents/Button';
|
|
4
5
|
import { CalloutTest, HOMEPAGE_CALLOUT_BUTTON } from './TestComponents/Callout';
|
|
5
6
|
import { CheckboxTest, HOMEPAGE_CHECKBOX_BUTTON } from './TestComponents/Checkbox';
|
|
@@ -37,6 +38,11 @@ export const tests: TestDescription[] = [
|
|
|
37
38
|
component: AvatarTest,
|
|
38
39
|
testPage: HOMEPAGE_AVATAR_BUTTON,
|
|
39
40
|
},
|
|
41
|
+
{
|
|
42
|
+
name: 'Badge Test',
|
|
43
|
+
component: BadgeTest,
|
|
44
|
+
testPage: HOMEPAGE_BADGE,
|
|
45
|
+
},
|
|
40
46
|
{
|
|
41
47
|
name: 'Button Test',
|
|
42
48
|
component: ButtonTest,
|