@fluentui-react-native/tester 0.52.1 → 0.53.2
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 +157 -1
- package/CHANGELOG.md +50 -2
- package/lib/E2E/ActivityIndicator/specs/ActivityIndicator.spec.win.js +3 -2
- package/lib/E2E/ActivityIndicator/specs/ActivityIndicator.spec.win.js.map +1 -1
- package/lib/E2E/Button/specs/Button.spec.win.js +9 -2
- package/lib/E2E/Button/specs/Button.spec.win.js.map +1 -1
- package/lib/E2E/ButtonExperimental/specs/ButtonExperimental.spec.win.js +6 -2
- package/lib/E2E/ButtonExperimental/specs/ButtonExperimental.spec.win.js.map +1 -1
- package/lib/E2E/Callout/specs/Callout.spec.win.js +3 -2
- package/lib/E2E/Callout/specs/Callout.spec.win.js.map +1 -1
- package/lib/E2E/Checkbox/specs/Checkbox.spec.win.js +8 -2
- package/lib/E2E/Checkbox/specs/Checkbox.spec.win.js.map +1 -1
- package/lib/E2E/CheckboxExperimental/specs/ExperimentalCheckbox.spec.win.js +6 -2
- package/lib/E2E/CheckboxExperimental/specs/ExperimentalCheckbox.spec.win.js.map +1 -1
- package/lib/E2E/ContextualMenu/specs/ContextualMenu.spec.win.js +5 -2
- package/lib/E2E/ContextualMenu/specs/ContextualMenu.spec.win.js.map +1 -1
- package/lib/E2E/FocusTrapZone/specs/FocusTrapZone.spec.win.js +3 -2
- package/lib/E2E/FocusTrapZone/specs/FocusTrapZone.spec.win.js.map +1 -1
- package/lib/E2E/FocusZone/specs/FocusZone.spec.win.js +3 -2
- package/lib/E2E/FocusZone/specs/FocusZone.spec.win.js.map +1 -1
- package/lib/E2E/Icon/specs/Icon.spec.win.js +3 -2
- package/lib/E2E/Icon/specs/Icon.spec.win.js.map +1 -1
- package/lib/E2E/Link/specs/Link.spec.win.js +5 -2
- package/lib/E2E/Link/specs/Link.spec.win.js.map +1 -1
- package/lib/E2E/MenuButton/specs/MenuButton.spec.win.js +8 -2
- package/lib/E2E/MenuButton/specs/MenuButton.spec.win.js.map +1 -1
- package/lib/E2E/MenuButtonExperimental/specs/ExperimentalMenuButton.spec.win.js +6 -2
- package/lib/E2E/MenuButtonExperimental/specs/ExperimentalMenuButton.spec.win.js.map +1 -1
- package/lib/E2E/Persona/specs/Persona.spec.win.js +3 -2
- package/lib/E2E/Persona/specs/Persona.spec.win.js.map +1 -1
- package/lib/E2E/PersonaCoin/specs/PersonaCoin.spec.win.js +3 -2
- package/lib/E2E/PersonaCoin/specs/PersonaCoin.spec.win.js.map +1 -1
- package/lib/E2E/Pressable/specs/Pressable.spec.win.js +3 -2
- package/lib/E2E/Pressable/specs/Pressable.spec.win.js.map +1 -1
- package/lib/E2E/RadioGroup/specs/RadioGroup.spec.win.js +12 -2
- package/lib/E2E/RadioGroup/specs/RadioGroup.spec.win.js.map +1 -1
- package/lib/E2E/Separator/specs/Separator.spec.win.js +3 -2
- package/lib/E2E/Separator/specs/Separator.spec.win.js.map +1 -1
- package/lib/E2E/Shimmer/specs/Shimmer.spec.win.js +3 -2
- package/lib/E2E/Shimmer/specs/Shimmer.spec.win.js.map +1 -1
- package/lib/E2E/Svg/specs/Svg.spec.win.js +3 -2
- package/lib/E2E/Svg/specs/Svg.spec.win.js.map +1 -1
- package/lib/E2E/Tabs/specs/Tabs.spec.win.js +7 -2
- package/lib/E2E/Tabs/specs/Tabs.spec.win.js.map +1 -1
- package/lib/E2E/TabsExperimental/specs/TabsExperimental.spec.win.js +5 -2
- package/lib/E2E/TabsExperimental/specs/TabsExperimental.spec.win.js.map +1 -1
- package/lib/E2E/Text/specs/Text.spec.win.js +6 -2
- package/lib/E2E/Text/specs/Text.spec.win.js.map +1 -1
- package/lib/E2E/TextExperimental/specs/ExperimentalText.spec.win.js +4 -2
- package/lib/E2E/TextExperimental/specs/ExperimentalText.spec.win.js.map +1 -1
- package/lib/E2E/Theme/specs/Theme.spec.win.js +3 -2
- package/lib/E2E/Theme/specs/Theme.spec.win.js.map +1 -1
- package/lib/E2E/Tokens/specs/Tokens.spec.win.js +3 -2
- package/lib/E2E/Tokens/specs/Tokens.spec.win.js.map +1 -1
- package/lib/E2E/common/BasePage.win.d.ts +6 -0
- package/lib/E2E/common/BasePage.win.d.ts.map +1 -1
- package/lib/E2E/common/BasePage.win.js +45 -0
- package/lib/E2E/common/BasePage.win.js.map +1 -1
- package/lib/FluentTester/TestComponents/ButtonExperimental/ButtonIconTestSection.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/ButtonExperimental/ButtonIconTestSection.js +9 -5
- package/lib/FluentTester/TestComponents/ButtonExperimental/ButtonIconTestSection.js.map +1 -1
- package/lib/FluentTester/TestComponents/ButtonExperimental/ButtonSizeTestSection.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/ButtonExperimental/ButtonSizeTestSection.js +3 -3
- package/lib/FluentTester/TestComponents/ButtonExperimental/ButtonSizeTestSection.js.map +1 -1
- package/lib/FluentTester/TestComponents/ButtonExperimental/ToggleButtonTestSection.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/ButtonExperimental/ToggleButtonTestSection.js +3 -2
- package/lib/FluentTester/TestComponents/ButtonExperimental/ToggleButtonTestSection.js.map +1 -1
- package/lib/FluentTester/theme/CustomThemes.js +1 -1
- package/lib/FluentTester/theme/CustomThemes.js.map +1 -1
- package/lib/FluentTester/theme/applyBrand.d.ts +2 -2
- package/lib/FluentTester/theme/applyBrand.d.ts.map +1 -1
- package/lib/FluentTester/theme/applyBrand.js +4 -1
- package/lib/FluentTester/theme/applyBrand.js.map +1 -1
- package/lib-commonjs/E2E/ActivityIndicator/specs/ActivityIndicator.spec.win.js +3 -2
- package/lib-commonjs/E2E/ActivityIndicator/specs/ActivityIndicator.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/Button/specs/Button.spec.win.js +9 -2
- package/lib-commonjs/E2E/Button/specs/Button.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/ButtonExperimental/specs/ButtonExperimental.spec.win.js +6 -2
- package/lib-commonjs/E2E/ButtonExperimental/specs/ButtonExperimental.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/Callout/specs/Callout.spec.win.js +3 -2
- package/lib-commonjs/E2E/Callout/specs/Callout.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/Checkbox/specs/Checkbox.spec.win.js +8 -2
- package/lib-commonjs/E2E/Checkbox/specs/Checkbox.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/CheckboxExperimental/specs/ExperimentalCheckbox.spec.win.js +6 -2
- package/lib-commonjs/E2E/CheckboxExperimental/specs/ExperimentalCheckbox.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/ContextualMenu/specs/ContextualMenu.spec.win.js +5 -2
- package/lib-commonjs/E2E/ContextualMenu/specs/ContextualMenu.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/FocusTrapZone/specs/FocusTrapZone.spec.win.js +3 -2
- package/lib-commonjs/E2E/FocusTrapZone/specs/FocusTrapZone.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/FocusZone/specs/FocusZone.spec.win.js +3 -2
- package/lib-commonjs/E2E/FocusZone/specs/FocusZone.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/Icon/specs/Icon.spec.win.js +3 -2
- package/lib-commonjs/E2E/Icon/specs/Icon.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/Link/specs/Link.spec.win.js +5 -2
- package/lib-commonjs/E2E/Link/specs/Link.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/MenuButton/specs/MenuButton.spec.win.js +8 -2
- package/lib-commonjs/E2E/MenuButton/specs/MenuButton.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/MenuButtonExperimental/specs/ExperimentalMenuButton.spec.win.js +6 -2
- package/lib-commonjs/E2E/MenuButtonExperimental/specs/ExperimentalMenuButton.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/Persona/specs/Persona.spec.win.js +3 -2
- package/lib-commonjs/E2E/Persona/specs/Persona.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/PersonaCoin/specs/PersonaCoin.spec.win.js +3 -2
- package/lib-commonjs/E2E/PersonaCoin/specs/PersonaCoin.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/Pressable/specs/Pressable.spec.win.js +3 -2
- package/lib-commonjs/E2E/Pressable/specs/Pressable.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/RadioGroup/specs/RadioGroup.spec.win.js +12 -2
- package/lib-commonjs/E2E/RadioGroup/specs/RadioGroup.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/Separator/specs/Separator.spec.win.js +3 -2
- package/lib-commonjs/E2E/Separator/specs/Separator.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/Shimmer/specs/Shimmer.spec.win.js +3 -2
- package/lib-commonjs/E2E/Shimmer/specs/Shimmer.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/Svg/specs/Svg.spec.win.js +3 -2
- package/lib-commonjs/E2E/Svg/specs/Svg.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/Tabs/specs/Tabs.spec.win.js +7 -2
- package/lib-commonjs/E2E/Tabs/specs/Tabs.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/TabsExperimental/specs/TabsExperimental.spec.win.js +5 -2
- package/lib-commonjs/E2E/TabsExperimental/specs/TabsExperimental.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/Text/specs/Text.spec.win.js +6 -2
- package/lib-commonjs/E2E/Text/specs/Text.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/TextExperimental/specs/ExperimentalText.spec.win.js +4 -2
- package/lib-commonjs/E2E/TextExperimental/specs/ExperimentalText.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/Theme/specs/Theme.spec.win.js +3 -2
- package/lib-commonjs/E2E/Theme/specs/Theme.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/Tokens/specs/Tokens.spec.win.js +3 -2
- package/lib-commonjs/E2E/Tokens/specs/Tokens.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/common/BasePage.win.d.ts +6 -0
- package/lib-commonjs/E2E/common/BasePage.win.d.ts.map +1 -1
- package/lib-commonjs/E2E/common/BasePage.win.js +45 -0
- package/lib-commonjs/E2E/common/BasePage.win.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/ButtonExperimental/ButtonIconTestSection.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/ButtonExperimental/ButtonIconTestSection.js +8 -4
- package/lib-commonjs/FluentTester/TestComponents/ButtonExperimental/ButtonIconTestSection.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/ButtonExperimental/ButtonSizeTestSection.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/ButtonExperimental/ButtonSizeTestSection.js +3 -3
- package/lib-commonjs/FluentTester/TestComponents/ButtonExperimental/ButtonSizeTestSection.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/ButtonExperimental/ToggleButtonTestSection.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/ButtonExperimental/ToggleButtonTestSection.js +3 -2
- package/lib-commonjs/FluentTester/TestComponents/ButtonExperimental/ToggleButtonTestSection.js.map +1 -1
- package/lib-commonjs/FluentTester/theme/CustomThemes.js +1 -1
- package/lib-commonjs/FluentTester/theme/CustomThemes.js.map +1 -1
- package/lib-commonjs/FluentTester/theme/applyBrand.d.ts +2 -2
- package/lib-commonjs/FluentTester/theme/applyBrand.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/theme/applyBrand.js +4 -1
- package/lib-commonjs/FluentTester/theme/applyBrand.js.map +1 -1
- package/package.json +9 -9
- package/src/E2E/ActivityIndicator/specs/ActivityIndicator.spec.win.ts +3 -2
- package/src/E2E/Button/specs/Button.spec.win.ts +9 -2
- package/src/E2E/ButtonExperimental/specs/ButtonExperimental.spec.win.ts +9 -2
- package/src/E2E/Callout/specs/Callout.spec.win.ts +3 -2
- package/src/E2E/Checkbox/specs/Checkbox.spec.win.ts +8 -2
- package/src/E2E/CheckboxExperimental/specs/ExperimentalCheckbox.spec.win.ts +9 -2
- package/src/E2E/ContextualMenu/specs/ContextualMenu.spec.win.ts +5 -2
- package/src/E2E/FocusTrapZone/specs/FocusTrapZone.spec.win.ts +3 -2
- package/src/E2E/FocusZone/specs/FocusZone.spec.win.ts +3 -2
- package/src/E2E/Icon/specs/Icon.spec.win.ts +3 -2
- package/src/E2E/Link/specs/Link.spec.win.ts +7 -2
- package/src/E2E/MenuButton/specs/MenuButton.spec.win.ts +8 -2
- package/src/E2E/MenuButtonExperimental/specs/ExperimentalMenuButton.spec.win.ts +9 -2
- package/src/E2E/Persona/specs/Persona.spec.win.ts +3 -2
- package/src/E2E/PersonaCoin/specs/PersonaCoin.spec.win.ts +3 -2
- package/src/E2E/Pressable/specs/Pressable.spec.win.ts +3 -2
- package/src/E2E/RadioGroup/specs/RadioGroup.spec.win.ts +12 -2
- package/src/E2E/Separator/specs/Separator.spec.win.ts +3 -2
- package/src/E2E/Shimmer/specs/Shimmer.spec.win.ts +3 -2
- package/src/E2E/Svg/specs/Svg.spec.win.ts +3 -2
- package/src/E2E/Tabs/specs/Tabs.spec.win.ts +7 -2
- package/src/E2E/TabsExperimental/specs/TabsExperimental.spec.win.ts +7 -2
- package/src/E2E/Text/specs/Text.spec.win.ts +6 -2
- package/src/E2E/TextExperimental/specs/ExperimentalText.spec.win.ts +5 -2
- package/src/E2E/Theme/specs/Theme.spec.win.ts +3 -2
- package/src/E2E/Tokens/specs/Tokens.spec.win.ts +3 -2
- package/src/E2E/common/BasePage.win.ts +34 -0
- package/src/FluentTester/TestComponents/ButtonExperimental/ButtonIconTestSection.tsx +13 -7
- package/src/FluentTester/TestComponents/ButtonExperimental/ButtonSizeTestSection.tsx +21 -3
- package/src/FluentTester/TestComponents/ButtonExperimental/ToggleButtonTestSection.tsx +5 -2
- package/src/FluentTester/theme/CustomThemes.ts +1 -1
- package/src/FluentTester/theme/applyBrand.ts +6 -2
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
describe('RadioGroup/RadioButton Testing Initialization', function () {
|
|
14
14
|
it('Wait for app load', () => {
|
|
15
15
|
NavigateAppPage.waitForPageDisplayed(BOOT_APP_TIMEOUT);
|
|
16
|
-
expect(NavigateAppPage.isPageLoaded()).toBeTruthy();
|
|
16
|
+
expect(NavigateAppPage.isPageLoaded()).toBeTruthy(NavigateAppPage.ERRORMESSAGE_APPLOAD);
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
it('Click and navigate to RadioGroup test page', () => {
|
|
@@ -25,7 +25,8 @@ describe('RadioGroup/RadioButton Testing Initialization', function () {
|
|
|
25
25
|
NavigateAppPage.clickAndGoToRadioGroupPage();
|
|
26
26
|
RadioGroupPageObject.waitForPageDisplayed(PAGE_TIMEOUT);
|
|
27
27
|
|
|
28
|
-
expect(RadioGroupPageObject.isPageLoaded()).toBeTruthy();
|
|
28
|
+
expect(RadioGroupPageObject.isPageLoaded()).toBeTruthy(RadioGroupPageObject.ERRORMESSAGE_PAGELOAD);
|
|
29
|
+
expect(RadioGroupPageObject.didAssertPopup()).toBeFalsy(RadioGroupPageObject.ERRORMESSAGE_ASSERT); // Ensure no asserts popped up
|
|
29
30
|
});
|
|
30
31
|
});
|
|
31
32
|
|
|
@@ -38,26 +39,32 @@ describe('RadioGroup/RadioButton Accessibility Testing', () => {
|
|
|
38
39
|
|
|
39
40
|
it("Validate RadioGroup's accessibilityRole is correct", () => {
|
|
40
41
|
expect(RadioGroupPageObject.getAccessibilityRole()).toEqual(RADIOGROUP_A11Y_ROLE);
|
|
42
|
+
expect(RadioGroupPageObject.didAssertPopup()).toBeFalsy(RadioGroupPageObject.ERRORMESSAGE_ASSERT);
|
|
41
43
|
});
|
|
42
44
|
|
|
43
45
|
it("Validate RadioButton's accessibilityRole is correct", () => {
|
|
44
46
|
expect(RadioGroupPageObject.getRadioButtonAccesibilityRole()).toEqual(RADIOBUTTON_A11Y_ROLE);
|
|
47
|
+
expect(RadioGroupPageObject.didAssertPopup()).toBeFalsy(RadioGroupPageObject.ERRORMESSAGE_ASSERT);
|
|
45
48
|
});
|
|
46
49
|
|
|
47
50
|
it('RadioGroup - Set accessibilityLabel', () => {
|
|
48
51
|
expect(RadioGroupPageObject.getAccessibilityLabel(ComponentSelector.Primary)).toEqual(RADIOGROUP_ACCESSIBILITY_LABEL);
|
|
52
|
+
expect(RadioGroupPageObject.didAssertPopup()).toBeFalsy(RadioGroupPageObject.ERRORMESSAGE_ASSERT);
|
|
49
53
|
});
|
|
50
54
|
|
|
51
55
|
it('RadioGroup - Do not set accessibilityLabel -> Default to RadioGroup label', () => {
|
|
52
56
|
expect(RadioGroupPageObject.getAccessibilityLabel(ComponentSelector.Secondary)).toEqual(RADIOGROUP_TEST_COMPONENT_LABEL);
|
|
57
|
+
expect(RadioGroupPageObject.didAssertPopup()).toBeFalsy(RadioGroupPageObject.ERRORMESSAGE_ASSERT);
|
|
53
58
|
});
|
|
54
59
|
|
|
55
60
|
it('RadioButton - Set accessibilityLabel', () => {
|
|
56
61
|
expect(RadioGroupPageObject.getRBAccessibilityLabel(RadioButtonSelector.First)).toEqual(FIRST_RADIO_BUTTON_ACCESSIBILITY_LABEL);
|
|
62
|
+
expect(RadioGroupPageObject.didAssertPopup()).toBeFalsy(RadioGroupPageObject.ERRORMESSAGE_ASSERT);
|
|
57
63
|
});
|
|
58
64
|
|
|
59
65
|
it('RadioButton - Do not set accessibilityLabel -> Default to RadioButton label', () => {
|
|
60
66
|
expect(RadioGroupPageObject.getRBAccessibilityLabel(RadioButtonSelector.Second)).toEqual(SECOND_RADIO_BUTTON_LABEL);
|
|
67
|
+
expect(RadioGroupPageObject.didAssertPopup()).toBeFalsy(RadioGroupPageObject.ERRORMESSAGE_ASSERT);
|
|
61
68
|
});
|
|
62
69
|
});
|
|
63
70
|
|
|
@@ -80,6 +87,7 @@ describe('RadioGroup Functional Testing', () => {
|
|
|
80
87
|
|
|
81
88
|
/* Validate the RadioButton is selected */
|
|
82
89
|
expect(RadioGroupPageObject.isRadioButtonSelected(RadioButtonSelector.Second)).toBeTruthy();
|
|
90
|
+
expect(RadioGroupPageObject.didAssertPopup()).toBeFalsy(RadioGroupPageObject.ERRORMESSAGE_ASSERT);
|
|
83
91
|
});
|
|
84
92
|
|
|
85
93
|
it('Keyboard to RadioButton and check for Selection state', () => {
|
|
@@ -89,6 +97,7 @@ describe('RadioGroup Functional Testing', () => {
|
|
|
89
97
|
|
|
90
98
|
/* Validate the RadioButton is selected */
|
|
91
99
|
expect(RadioGroupPageObject.isRadioButtonSelected(RadioButtonSelector.Second)).toBeTruthy();
|
|
100
|
+
expect(RadioGroupPageObject.didAssertPopup()).toBeFalsy(RadioGroupPageObject.ERRORMESSAGE_ASSERT);
|
|
92
101
|
});
|
|
93
102
|
|
|
94
103
|
it("Keyboard to DISABLED RadioButton and validate it doesn't get selected", () => {
|
|
@@ -98,5 +107,6 @@ describe('RadioGroup Functional Testing', () => {
|
|
|
98
107
|
|
|
99
108
|
/* Validate the RadioButton is selected */
|
|
100
109
|
expect(RadioGroupPageObject.isRadioButtonSelected(RadioButtonSelector.Fourth)).toBeTruthy();
|
|
110
|
+
expect(RadioGroupPageObject.didAssertPopup()).toBeFalsy(RadioGroupPageObject.ERRORMESSAGE_ASSERT);
|
|
101
111
|
});
|
|
102
112
|
});
|
|
@@ -6,7 +6,7 @@ import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
|
|
|
6
6
|
describe('Separator Testing Initialization', function () {
|
|
7
7
|
it('Wait for app load', () => {
|
|
8
8
|
NavigateAppPage.waitForPageDisplayed(BOOT_APP_TIMEOUT);
|
|
9
|
-
expect(NavigateAppPage.isPageLoaded()).toBeTruthy();
|
|
9
|
+
expect(NavigateAppPage.isPageLoaded()).toBeTruthy(NavigateAppPage.ERRORMESSAGE_APPLOAD);
|
|
10
10
|
});
|
|
11
11
|
|
|
12
12
|
it('Click and navigate to Separator test page', () => {
|
|
@@ -18,6 +18,7 @@ describe('Separator Testing Initialization', function () {
|
|
|
18
18
|
NavigateAppPage.clickAndGoToSeparatorPage();
|
|
19
19
|
SeparatorPageObject.waitForPageDisplayed(PAGE_TIMEOUT);
|
|
20
20
|
|
|
21
|
-
expect(SeparatorPageObject.isPageLoaded()).toBeTruthy();
|
|
21
|
+
expect(SeparatorPageObject.isPageLoaded()).toBeTruthy(SeparatorPageObject.ERRORMESSAGE_PAGELOAD);
|
|
22
|
+
expect(SeparatorPageObject.didAssertPopup()).toBeFalsy(SeparatorPageObject.ERRORMESSAGE_ASSERT); // Ensure no asserts popped up
|
|
22
23
|
});
|
|
23
24
|
});
|
|
@@ -6,7 +6,7 @@ import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
|
|
|
6
6
|
describe('Shimmer Testing Initialization', function () {
|
|
7
7
|
it('Wait for app load', () => {
|
|
8
8
|
NavigateAppPage.waitForPageDisplayed(BOOT_APP_TIMEOUT);
|
|
9
|
-
expect(NavigateAppPage.isPageLoaded()).toBeTruthy();
|
|
9
|
+
expect(NavigateAppPage.isPageLoaded()).toBeTruthy(NavigateAppPage.ERRORMESSAGE_APPLOAD);
|
|
10
10
|
});
|
|
11
11
|
|
|
12
12
|
it('Click and navigate to Shimmer test page', () => {
|
|
@@ -18,6 +18,7 @@ describe('Shimmer Testing Initialization', function () {
|
|
|
18
18
|
NavigateAppPage.clickAndGoToShimmerPage();
|
|
19
19
|
ShimmerPageObject.waitForPageDisplayed(PAGE_TIMEOUT);
|
|
20
20
|
|
|
21
|
-
expect(ShimmerPageObject.isPageLoaded()).toBeTruthy();
|
|
21
|
+
expect(ShimmerPageObject.isPageLoaded()).toBeTruthy(ShimmerPageObject.ERRORMESSAGE_PAGELOAD);
|
|
22
|
+
expect(ShimmerPageObject.didAssertPopup()).toBeFalsy(ShimmerPageObject.ERRORMESSAGE_ASSERT); // Ensure no asserts popped up
|
|
22
23
|
});
|
|
23
24
|
});
|
|
@@ -6,7 +6,7 @@ import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
|
|
|
6
6
|
describe('Svg Testing Initialization', function () {
|
|
7
7
|
it('Wait for app load', () => {
|
|
8
8
|
NavigateAppPage.waitForPageDisplayed(BOOT_APP_TIMEOUT);
|
|
9
|
-
expect(NavigateAppPage.isPageLoaded()).toBeTruthy();
|
|
9
|
+
expect(NavigateAppPage.isPageLoaded()).toBeTruthy(NavigateAppPage.ERRORMESSAGE_APPLOAD);
|
|
10
10
|
});
|
|
11
11
|
|
|
12
12
|
it('Click and navigate to Svg test page', () => {
|
|
@@ -18,6 +18,7 @@ describe('Svg Testing Initialization', function () {
|
|
|
18
18
|
NavigateAppPage.clickAndGoToSvgPage();
|
|
19
19
|
SvgPageObject.waitForPageDisplayed(PAGE_TIMEOUT);
|
|
20
20
|
|
|
21
|
-
expect(SvgPageObject.isPageLoaded()).toBeTruthy();
|
|
21
|
+
expect(SvgPageObject.isPageLoaded()).toBeTruthy(SvgPageObject.ERRORMESSAGE_PAGELOAD);
|
|
22
|
+
expect(SvgPageObject.didAssertPopup()).toBeFalsy(SvgPageObject.ERRORMESSAGE_ASSERT); // Ensure no asserts popped up
|
|
22
23
|
});
|
|
23
24
|
});
|
|
@@ -6,7 +6,7 @@ import { TAB_A11Y_ROLE, BOOT_APP_TIMEOUT, PAGE_TIMEOUT, TABITEM_A11Y_ROLE, Keys
|
|
|
6
6
|
describe('Tabs Testing Initialization', function () {
|
|
7
7
|
it('Wait for app load', () => {
|
|
8
8
|
NavigateAppPage.waitForPageDisplayed(BOOT_APP_TIMEOUT);
|
|
9
|
-
expect(NavigateAppPage.isPageLoaded()).toBeTruthy();
|
|
9
|
+
expect(NavigateAppPage.isPageLoaded()).toBeTruthy(NavigateAppPage.ERRORMESSAGE_APPLOAD);
|
|
10
10
|
});
|
|
11
11
|
|
|
12
12
|
it('Click and navigate to Tabs test page', () => {
|
|
@@ -18,7 +18,8 @@ describe('Tabs Testing Initialization', function () {
|
|
|
18
18
|
NavigateAppPage.clickAndGoToTabsPage();
|
|
19
19
|
TabsPageObject.waitForPageDisplayed(PAGE_TIMEOUT);
|
|
20
20
|
|
|
21
|
-
expect(TabsPageObject.isPageLoaded()).toBeTruthy();
|
|
21
|
+
expect(TabsPageObject.isPageLoaded()).toBeTruthy(TabsPageObject.ERRORMESSAGE_PAGELOAD);
|
|
22
|
+
expect(TabsPageObject.didAssertPopup()).toBeFalsy(TabsPageObject.ERRORMESSAGE_ASSERT); // Ensure no asserts popped up
|
|
22
23
|
});
|
|
23
24
|
});
|
|
24
25
|
|
|
@@ -31,10 +32,12 @@ describe('Tabs Accessibility Testing', () => {
|
|
|
31
32
|
|
|
32
33
|
it("Validate Tab's accessibilityRole is correct", () => {
|
|
33
34
|
expect(TabsPageObject.getAccessibilityRole()).toEqual(TAB_A11Y_ROLE);
|
|
35
|
+
expect(TabsPageObject.didAssertPopup()).toBeFalsy(TabsPageObject.ERRORMESSAGE_ASSERT);
|
|
34
36
|
});
|
|
35
37
|
|
|
36
38
|
it("Validate TabItem's accessibilityRole is correct", () => {
|
|
37
39
|
expect(TabsPageObject.getTabItemAccesibilityRole(TabItemSelector.First)).toEqual(TABITEM_A11Y_ROLE);
|
|
40
|
+
expect(TabsPageObject.didAssertPopup()).toBeFalsy(TabsPageObject.ERRORMESSAGE_ASSERT);
|
|
38
41
|
});
|
|
39
42
|
});
|
|
40
43
|
|
|
@@ -53,6 +56,7 @@ describe('Tabs Functional Tests', () => {
|
|
|
53
56
|
TabsPageObject.waitForTabsItemsToOpen(TabItemSelector.Second, PAGE_TIMEOUT);
|
|
54
57
|
|
|
55
58
|
expect(TabsPageObject.didTabItemContentLoad(TabItemSelector.Second)).toBeTruthy();
|
|
59
|
+
expect(TabsPageObject.didAssertPopup()).toBeFalsy(TabsPageObject.ERRORMESSAGE_ASSERT);
|
|
56
60
|
});
|
|
57
61
|
|
|
58
62
|
it('Keyboarding: Arrow Navigation: Right -> Down -> Left -> Up -> Validate the correct TabItem content is shown', () => {
|
|
@@ -79,5 +83,6 @@ describe('Tabs Functional Tests', () => {
|
|
|
79
83
|
TabsPageObject.waitForTabsItemsToOpen(TabItemSelector.First, PAGE_TIMEOUT);
|
|
80
84
|
|
|
81
85
|
expect(TabsPageObject.didTabItemContentLoad(TabItemSelector.First)).toBeTruthy();
|
|
86
|
+
expect(TabsPageObject.didAssertPopup()).toBeFalsy(TabsPageObject.ERRORMESSAGE_ASSERT);
|
|
82
87
|
});
|
|
83
88
|
});
|
|
@@ -6,7 +6,7 @@ import { TAB_A11Y_ROLE, TABITEM_A11Y_ROLE, BOOT_APP_TIMEOUT, PAGE_TIMEOUT } from
|
|
|
6
6
|
describe('Experimental Tabs Testing Initialization', function () {
|
|
7
7
|
it('Wait for app load', () => {
|
|
8
8
|
NavigateAppPage.waitForPageDisplayed(BOOT_APP_TIMEOUT);
|
|
9
|
-
expect(NavigateAppPage.isPageLoaded()).toBeTruthy();
|
|
9
|
+
expect(NavigateAppPage.isPageLoaded()).toBeTruthy(NavigateAppPage.ERRORMESSAGE_APPLOAD);
|
|
10
10
|
});
|
|
11
11
|
|
|
12
12
|
it('Click and navigate to Experimental Tabs test page', () => {
|
|
@@ -18,7 +18,8 @@ describe('Experimental Tabs Testing Initialization', function () {
|
|
|
18
18
|
NavigateAppPage.clickAndGoToExperimentalTabsPage();
|
|
19
19
|
ExperimentalTabsPageObject.waitForPageDisplayed(PAGE_TIMEOUT);
|
|
20
20
|
|
|
21
|
-
expect(ExperimentalTabsPageObject.isPageLoaded()).toBeTruthy();
|
|
21
|
+
expect(ExperimentalTabsPageObject.isPageLoaded()).toBeTruthy(ExperimentalTabsPageObject.ERRORMESSAGE_PAGELOAD);
|
|
22
|
+
expect(ExperimentalTabsPageObject.didAssertPopup()).toBeFalsy(ExperimentalTabsPageObject.ERRORMESSAGE_ASSERT); // Ensure no asserts popped up
|
|
22
23
|
});
|
|
23
24
|
});
|
|
24
25
|
|
|
@@ -26,12 +27,16 @@ describe('Experimental Tabs Accessibility Testing', () => {
|
|
|
26
27
|
it("Validate Experimental Tab's accessibilityRole is correct", () => {
|
|
27
28
|
ExperimentalTabsPageObject.scrollToTestElement();
|
|
28
29
|
ExperimentalTabsPageObject.waitForPrimaryElementDisplayed(PAGE_TIMEOUT);
|
|
30
|
+
|
|
29
31
|
expect(ExperimentalTabsPageObject.getAccessibilityRole()).toEqual(TAB_A11Y_ROLE);
|
|
32
|
+
expect(ExperimentalTabsPageObject.didAssertPopup()).toBeFalsy(ExperimentalTabsPageObject.ERRORMESSAGE_ASSERT);
|
|
30
33
|
});
|
|
31
34
|
|
|
32
35
|
it("Validate Experimental TabItem's accessibilityRole is correct", () => {
|
|
33
36
|
ExperimentalTabsPageObject.scrollToTestElement();
|
|
34
37
|
ExperimentalTabsPageObject.waitForPrimaryElementDisplayed(PAGE_TIMEOUT);
|
|
38
|
+
|
|
35
39
|
expect(ExperimentalTabsPageObject.getTabItemAccesibilityRole()).toEqual(TABITEM_A11Y_ROLE);
|
|
40
|
+
expect(ExperimentalTabsPageObject.didAssertPopup()).toBeFalsy(ExperimentalTabsPageObject.ERRORMESSAGE_ASSERT);
|
|
36
41
|
});
|
|
37
42
|
});
|
|
@@ -8,7 +8,7 @@ import { TEXT_ACCESSIBILITY_LABEL, TEXT_COMPONENT_CONTENT } from '../../../Fluen
|
|
|
8
8
|
describe('Text Testing Initialization', function () {
|
|
9
9
|
it('Wait for app load', () => {
|
|
10
10
|
NavigateAppPage.waitForPageDisplayed(BOOT_APP_TIMEOUT);
|
|
11
|
-
expect(NavigateAppPage.isPageLoaded()).toBeTruthy();
|
|
11
|
+
expect(NavigateAppPage.isPageLoaded()).toBeTruthy(NavigateAppPage.ERRORMESSAGE_APPLOAD);
|
|
12
12
|
});
|
|
13
13
|
|
|
14
14
|
it('Click and navigate to Text test page', () => {
|
|
@@ -20,7 +20,8 @@ describe('Text Testing Initialization', function () {
|
|
|
20
20
|
NavigateAppPage.clickAndGoToTextPage();
|
|
21
21
|
TextPageObject.waitForPageDisplayed(PAGE_TIMEOUT);
|
|
22
22
|
|
|
23
|
-
expect(TextPageObject.isPageLoaded()).toBeTruthy();
|
|
23
|
+
expect(TextPageObject.isPageLoaded()).toBeTruthy(TextPageObject.ERRORMESSAGE_PAGELOAD);
|
|
24
|
+
expect(TextPageObject.didAssertPopup()).toBeFalsy(TextPageObject.ERRORMESSAGE_ASSERT); // Ensure no asserts popped up
|
|
24
25
|
});
|
|
25
26
|
});
|
|
26
27
|
|
|
@@ -32,13 +33,16 @@ describe('Text Accessibility Testing', () => {
|
|
|
32
33
|
|
|
33
34
|
it('Text - Validate accessibilityRole is correct', () => {
|
|
34
35
|
expect(TextPageObject.getAccessibilityRole()).toEqual(TEXT_A11Y_ROLE);
|
|
36
|
+
expect(TextPageObject.didAssertPopup()).toBeFalsy(TextPageObject.ERRORMESSAGE_ASSERT);
|
|
35
37
|
});
|
|
36
38
|
|
|
37
39
|
it('Text - Set accessibilityLabel', () => {
|
|
38
40
|
expect(TextPageObject.getAccessibilityLabel(ComponentSelector.Primary)).toEqual(TEXT_ACCESSIBILITY_LABEL);
|
|
41
|
+
expect(TextPageObject.didAssertPopup()).toBeFalsy(TextPageObject.ERRORMESSAGE_ASSERT);
|
|
39
42
|
});
|
|
40
43
|
|
|
41
44
|
it('Text - Do not accessibilityLabel -> Default to content', () => {
|
|
42
45
|
expect(TextPageObject.getAccessibilityLabel(ComponentSelector.Secondary)).toEqual(TEXT_COMPONENT_CONTENT);
|
|
46
|
+
expect(TextPageObject.didAssertPopup()).toBeFalsy(TextPageObject.ERRORMESSAGE_ASSERT);
|
|
43
47
|
});
|
|
44
48
|
});
|
|
@@ -6,7 +6,7 @@ import { TEXT_A11Y_ROLE, PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/con
|
|
|
6
6
|
describe('Experimental Text Testing Initialization', function () {
|
|
7
7
|
it('Wait for app load', () => {
|
|
8
8
|
NavigateAppPage.waitForPageDisplayed(BOOT_APP_TIMEOUT);
|
|
9
|
-
expect(NavigateAppPage.isPageLoaded()).toBeTruthy();
|
|
9
|
+
expect(NavigateAppPage.isPageLoaded()).toBeTruthy(NavigateAppPage.ERRORMESSAGE_APPLOAD);
|
|
10
10
|
});
|
|
11
11
|
|
|
12
12
|
it('Click and navigate to Experimental Text test page', () => {
|
|
@@ -18,7 +18,8 @@ describe('Experimental Text Testing Initialization', function () {
|
|
|
18
18
|
NavigateAppPage.clickAndGoToExperimentalTextPage();
|
|
19
19
|
ExperimentalTextPageObject.waitForPageDisplayed(PAGE_TIMEOUT);
|
|
20
20
|
|
|
21
|
-
expect(ExperimentalTextPageObject.isPageLoaded()).toBeTruthy();
|
|
21
|
+
expect(ExperimentalTextPageObject.isPageLoaded()).toBeTruthy(ExperimentalTextPageObject.ERRORMESSAGE_PAGELOAD);
|
|
22
|
+
expect(ExperimentalTextPageObject.didAssertPopup()).toBeFalsy(ExperimentalTextPageObject.ERRORMESSAGE_ASSERT); // Ensure no asserts popped up
|
|
22
23
|
});
|
|
23
24
|
});
|
|
24
25
|
|
|
@@ -26,6 +27,8 @@ describe('Experimental Text Accessibility Testing', () => {
|
|
|
26
27
|
it('Text - Validate accessibilityRole is correct', () => {
|
|
27
28
|
ExperimentalTextPageObject.scrollToTestElement();
|
|
28
29
|
ExperimentalTextPageObject.waitForPrimaryElementDisplayed(PAGE_TIMEOUT);
|
|
30
|
+
|
|
29
31
|
expect(ExperimentalTextPageObject.getAccessibilityRole()).toEqual(TEXT_A11Y_ROLE);
|
|
32
|
+
expect(ExperimentalTextPageObject.didAssertPopup()).toBeFalsy(ExperimentalTextPageObject.ERRORMESSAGE_ASSERT);
|
|
30
33
|
});
|
|
31
34
|
});
|
|
@@ -6,7 +6,7 @@ import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
|
|
|
6
6
|
describe('Theme Testing Initialization', function () {
|
|
7
7
|
it('Wait for app load', () => {
|
|
8
8
|
NavigateAppPage.waitForPageDisplayed(BOOT_APP_TIMEOUT);
|
|
9
|
-
expect(NavigateAppPage.isPageLoaded()).toBeTruthy();
|
|
9
|
+
expect(NavigateAppPage.isPageLoaded()).toBeTruthy(NavigateAppPage.ERRORMESSAGE_APPLOAD);
|
|
10
10
|
});
|
|
11
11
|
|
|
12
12
|
it('Click and navigate to Theme test page', () => {
|
|
@@ -18,6 +18,7 @@ describe('Theme Testing Initialization', function () {
|
|
|
18
18
|
NavigateAppPage.clickAndGoToThemePage();
|
|
19
19
|
ThemePageObject.waitForPageDisplayed(PAGE_TIMEOUT);
|
|
20
20
|
|
|
21
|
-
expect(ThemePageObject.isPageLoaded()).toBeTruthy();
|
|
21
|
+
expect(ThemePageObject.isPageLoaded()).toBeTruthy(ThemePageObject.ERRORMESSAGE_PAGELOAD);
|
|
22
|
+
expect(ThemePageObject.didAssertPopup()).toBeFalsy(ThemePageObject.ERRORMESSAGE_ASSERT); // Ensure no asserts popped up
|
|
22
23
|
});
|
|
23
24
|
});
|
|
@@ -6,7 +6,7 @@ import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../common/consts';
|
|
|
6
6
|
describe('Tokens Testing Initialization', function () {
|
|
7
7
|
it('Wait for app load', () => {
|
|
8
8
|
NavigateAppPage.waitForPageDisplayed(BOOT_APP_TIMEOUT);
|
|
9
|
-
expect(NavigateAppPage.isPageLoaded()).toBeTruthy();
|
|
9
|
+
expect(NavigateAppPage.isPageLoaded()).toBeTruthy(NavigateAppPage.ERRORMESSAGE_APPLOAD);
|
|
10
10
|
});
|
|
11
11
|
|
|
12
12
|
it('Click and navigate to Tokens test page', () => {
|
|
@@ -18,6 +18,7 @@ describe('Tokens Testing Initialization', function () {
|
|
|
18
18
|
NavigateAppPage.clickAndGoToTokensPage();
|
|
19
19
|
TokenPageObject.waitForPageDisplayed(PAGE_TIMEOUT);
|
|
20
20
|
|
|
21
|
-
expect(TokenPageObject.isPageLoaded()).toBeTruthy();
|
|
21
|
+
expect(TokenPageObject.isPageLoaded()).toBeTruthy(TokenPageObject.ERRORMESSAGE_PAGELOAD);
|
|
22
|
+
expect(TokenPageObject.didAssertPopup()).toBeFalsy(TokenPageObject.ERRORMESSAGE_ASSERT); // Ensure no asserts popped up
|
|
22
23
|
});
|
|
23
24
|
});
|
|
@@ -131,6 +131,23 @@ export class BasePage {
|
|
|
131
131
|
);
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
+
/* FUNCTIONALITY: Determines if an Assert has fired. True if yes; false otherwise
|
|
135
|
+
*
|
|
136
|
+
* WHY/HOW: Unfortunately, some Asserts don't take focus away from the test app. Because of this, the test execution is able
|
|
137
|
+
* to continue without realizing an assert as popped up (unless the assert is a crashing one).
|
|
138
|
+
*
|
|
139
|
+
* In order to detect an assert, this function gets the number of window handles currently open within the test app.
|
|
140
|
+
* Only one instance SHOULD be open at a time (the app itself). If another instance of the app is open, we know an assert dialogue
|
|
141
|
+
* has popped up. With this information, we know to fail the test.
|
|
142
|
+
*
|
|
143
|
+
* Additionally, you might think it's logical to simply place this in the afterEach() hook so it's called after every test (rather than duplicating this call in every test).
|
|
144
|
+
* Unfortunately, afterEach() is designed for setup/teardown - not for determining if a test should fail or not.
|
|
145
|
+
* */
|
|
146
|
+
didAssertPopup(): boolean {
|
|
147
|
+
// If more than 1 instance of the app is open, we know an assert dialogue popped up.
|
|
148
|
+
return browser.getWindowHandles().length > 1;
|
|
149
|
+
}
|
|
150
|
+
|
|
134
151
|
/*****************************************/
|
|
135
152
|
/**************** Getters ****************/
|
|
136
153
|
/*****************************************/
|
|
@@ -172,6 +189,23 @@ export class BasePage {
|
|
|
172
189
|
return DUMMY_CHAR;
|
|
173
190
|
}
|
|
174
191
|
|
|
192
|
+
/****************** Error Messages ******************/
|
|
193
|
+
get ERRORMESSAGE_SUFFIX(): string {
|
|
194
|
+
return 'Please review logs and error screenshots for more information.';
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
get ERRORMESSAGE_APPLOAD(): string {
|
|
198
|
+
return 'The FluentTester app did not load correctly. ' + this.ERRORMESSAGE_SUFFIX;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
get ERRORMESSAGE_PAGELOAD(): string {
|
|
202
|
+
return 'The ' + this._pageName + ' test page did not load correctly. ' + this.ERRORMESSAGE_SUFFIX;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
get ERRORMESSAGE_ASSERT(): string {
|
|
206
|
+
return 'An assert popped up. ' + this.ERRORMESSAGE_SUFFIX;
|
|
207
|
+
}
|
|
208
|
+
|
|
175
209
|
// Default timeout to wait until page is displayed (10s)
|
|
176
210
|
waitForPageTimeout: number = 15000;
|
|
177
211
|
}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { Button } from '@fluentui-react-native/experimental-button';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { Platform, View } from 'react-native';
|
|
3
|
+
import { Platform, View, StyleSheet } from 'react-native';
|
|
4
4
|
import { commonTestStyles, stackStyle } from '../Common/styles';
|
|
5
5
|
import { SvgIconProps } from '@fluentui-react-native/icon';
|
|
6
6
|
import TestSvg from './test.svg';
|
|
7
7
|
import { SvgXml } from 'react-native-svg';
|
|
8
8
|
|
|
9
|
+
const styles = StyleSheet.create({
|
|
10
|
+
chevron: { paddingStart: 4 },
|
|
11
|
+
});
|
|
12
|
+
|
|
9
13
|
export const ButtonIconTest: React.FunctionComponent = () => {
|
|
10
14
|
const fontBuiltInProps = {
|
|
11
15
|
fontFamily: 'Arial',
|
|
@@ -39,12 +43,6 @@ export const ButtonIconTest: React.FunctionComponent = () => {
|
|
|
39
43
|
>
|
|
40
44
|
Icon after
|
|
41
45
|
</Button>
|
|
42
|
-
{svgIconsEnabled && (
|
|
43
|
-
<Button style={commonTestStyles.vmargin} icon={{ svgSource: svgProps }}>
|
|
44
|
-
Icon Button and Chevron
|
|
45
|
-
<SvgXml xml={chevronXml} />
|
|
46
|
-
</Button>
|
|
47
|
-
)}
|
|
48
46
|
<Button icon={{ fontSource: fontBuiltInProps }} style={commonTestStyles.vmargin}>
|
|
49
47
|
Font icon
|
|
50
48
|
</Button>
|
|
@@ -67,6 +65,14 @@ export const ButtonIconTest: React.FunctionComponent = () => {
|
|
|
67
65
|
<Button icon={testImage} style={commonTestStyles.vmargin}>
|
|
68
66
|
PNG
|
|
69
67
|
</Button>
|
|
68
|
+
{svgIconsEnabled && (
|
|
69
|
+
<Button style={commonTestStyles.vmargin} icon={{ svgSource: svgProps }}>
|
|
70
|
+
Icon Button and Chevron
|
|
71
|
+
<View style={styles.chevron}>
|
|
72
|
+
<SvgXml xml={chevronXml} />
|
|
73
|
+
</View>
|
|
74
|
+
</Button>
|
|
75
|
+
)}
|
|
70
76
|
</View>
|
|
71
77
|
);
|
|
72
78
|
};
|
|
@@ -16,9 +16,27 @@ export const ButtonSizeTest: React.FunctionComponent = () => {
|
|
|
16
16
|
<View style={[stackStyle, commonTestStyles.view]}>
|
|
17
17
|
{svgIconsEnabled && (
|
|
18
18
|
<>
|
|
19
|
-
<Button
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
<Button
|
|
20
|
+
iconOnly
|
|
21
|
+
size="small"
|
|
22
|
+
icon={{ svgSource: svgProps }}
|
|
23
|
+
accessibilityLabel="Small size button with accessibility icon"
|
|
24
|
+
style={commonTestStyles.vmargin}
|
|
25
|
+
/>
|
|
26
|
+
<Button
|
|
27
|
+
iconOnly
|
|
28
|
+
size="medium"
|
|
29
|
+
icon={{ svgSource: svgProps }}
|
|
30
|
+
accessibilityLabel="Medium size button with accessibility icon"
|
|
31
|
+
style={commonTestStyles.vmargin}
|
|
32
|
+
/>
|
|
33
|
+
<Button
|
|
34
|
+
iconOnly
|
|
35
|
+
size="large"
|
|
36
|
+
icon={{ svgSource: svgProps }}
|
|
37
|
+
accessibilityLabel="Large size button with accessibility icon"
|
|
38
|
+
style={commonTestStyles.vmargin}
|
|
39
|
+
/>
|
|
22
40
|
<Button size="small" icon={{ svgSource: svgProps }} style={commonTestStyles.vmargin}>
|
|
23
41
|
Small Button with icon
|
|
24
42
|
</Button>
|
|
@@ -34,10 +34,13 @@ export const ToggleButtonTest: React.FunctionComponent = () => {
|
|
|
34
34
|
Unchecked Default Toggle
|
|
35
35
|
</ToggleButton>
|
|
36
36
|
<ToggleButton appearance="primary" style={commonTestStyles.vmargin}>
|
|
37
|
-
Primary Toggle
|
|
37
|
+
Checked Primary Toggle
|
|
38
|
+
</ToggleButton>
|
|
39
|
+
<ToggleButton disabled defaultChecked appearance="primary" style={commonTestStyles.vmargin}>
|
|
40
|
+
Checked Primary Toggle Disabled
|
|
38
41
|
</ToggleButton>
|
|
39
42
|
<ToggleButton defaultChecked appearance="primary" style={commonTestStyles.vmargin}>
|
|
40
|
-
Primary Toggle
|
|
43
|
+
Unchecked Primary Toggle
|
|
41
44
|
</ToggleButton>
|
|
42
45
|
<View style={styles.row}>
|
|
43
46
|
<ToggleButton appearance="subtle" onClick={onGhostClicked} checked={subtleChecked} style={commonTestStyles.vmargin}>
|
|
@@ -42,7 +42,7 @@ export class TesterThemeReference extends ThemeReference {
|
|
|
42
42
|
super(
|
|
43
43
|
baseTheme,
|
|
44
44
|
(parent) => applyTheme(parent, this._themeName, this.options.appearance),
|
|
45
|
-
() => applyBrand(this._themeName, this._brand),
|
|
45
|
+
(parent) => applyBrand(parent, this._themeName, this._brand),
|
|
46
46
|
);
|
|
47
47
|
this.baseTheme = baseTheme;
|
|
48
48
|
this.options = themeOptions;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PartialTheme } from '@fluentui-react-native/theme-types';
|
|
1
|
+
import { PartialTheme, Theme } from '@fluentui-react-native/theme-types';
|
|
2
2
|
import { getCurrentBrandAliasTokens } from '@fluentui-react-native/win32-theme';
|
|
3
3
|
|
|
4
4
|
export type OfficeBrand = 'Default' | 'Office' | 'Word' | 'Excel' | 'Powerpoint' | 'Outlook';
|
|
@@ -123,7 +123,11 @@ const brandColors: BrandRamps = {
|
|
|
123
123
|
|
|
124
124
|
export const brandOptions = Object.keys(brandColors).map((brand) => ({ label: brand, value: brand }));
|
|
125
125
|
|
|
126
|
-
export const applyBrand = (themeName: string, currentBrand: string): PartialTheme => {
|
|
126
|
+
export const applyBrand = (parent: Theme, themeName: string, currentBrand: string): PartialTheme => {
|
|
127
|
+
if (parent.name === 'HighContrast') {
|
|
128
|
+
return {};
|
|
129
|
+
}
|
|
130
|
+
|
|
127
131
|
const ramp = brandColors[currentBrand];
|
|
128
132
|
return ramp
|
|
129
133
|
? {
|