@fluentui-react-native/tester 0.133.1 → 0.134.1
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 +115 -1
- package/CHANGELOG.md +32 -2
- package/lib/E2E/src/common/BasePage.d.ts +31 -10
- package/lib/E2E/src/common/BasePage.d.ts.map +1 -1
- package/lib/E2E/src/common/BasePage.js +147 -110
- package/lib/E2E/src/common/BasePage.js.map +1 -1
- package/lib/E2E/src/common/consts.d.ts +2 -0
- package/lib/E2E/src/common/consts.d.ts.map +1 -1
- package/lib/E2E/src/common/consts.js +2 -0
- package/lib/E2E/src/common/consts.js.map +1 -1
- package/lib/fluent-tester/src/FluentTester.js +1 -1
- package/lib/fluent-tester/src/FluentTester.js.map +1 -1
- package/lib/fluent-tester/src/TestComponents/Avatar/AvatarTest.d.ts.map +1 -1
- package/lib/fluent-tester/src/TestComponents/Avatar/AvatarTest.js +7 -5
- package/lib/fluent-tester/src/TestComponents/Avatar/AvatarTest.js.map +1 -1
- package/lib/fluent-tester/src/TestComponents/Button/ButtonTest.d.ts.map +1 -1
- package/lib/fluent-tester/src/TestComponents/Button/ButtonTest.js +11 -5
- package/lib/fluent-tester/src/TestComponents/Button/ButtonTest.js.map +1 -1
- package/lib/fluent-tester/src/TestComponents/Callout/CalloutTest.d.ts.map +1 -1
- package/lib/fluent-tester/src/TestComponents/Callout/CalloutTest.js +3 -1
- package/lib/fluent-tester/src/TestComponents/Callout/CalloutTest.js.map +1 -1
- package/lib/fluent-tester/src/TestComponents/CheckboxLegacy/CheckboxLegacyTest.d.ts.map +1 -1
- package/lib/fluent-tester/src/TestComponents/CheckboxLegacy/CheckboxLegacyTest.js +3 -1
- package/lib/fluent-tester/src/TestComponents/CheckboxLegacy/CheckboxLegacyTest.js.map +1 -1
- package/lib/fluent-tester/src/TestComponents/CheckboxV1/CheckboxV1Test.d.ts.map +1 -1
- package/lib/fluent-tester/src/TestComponents/CheckboxV1/CheckboxV1Test.js +3 -1
- package/lib/fluent-tester/src/TestComponents/CheckboxV1/CheckboxV1Test.js.map +1 -1
- package/lib/fluent-tester/src/TestComponents/ContextualMenu/ContextualMenuTest.d.ts.map +1 -1
- package/lib/fluent-tester/src/TestComponents/ContextualMenu/ContextualMenuTest.js +3 -1
- package/lib/fluent-tester/src/TestComponents/ContextualMenu/ContextualMenuTest.js.map +1 -1
- package/lib/fluent-tester/src/TestComponents/FocusZone/FocusZoneTest.d.ts.map +1 -1
- package/lib/fluent-tester/src/TestComponents/FocusZone/FocusZoneTest.js +3 -1
- package/lib/fluent-tester/src/TestComponents/FocusZone/FocusZoneTest.js.map +1 -1
- package/lib/fluent-tester/src/TestComponents/Icon/IconTest.d.ts.map +1 -1
- package/lib/fluent-tester/src/TestComponents/Icon/IconTest.js +3 -1
- package/lib/fluent-tester/src/TestComponents/Icon/IconTest.js.map +1 -1
- package/lib/fluent-tester/src/TestComponents/LinkLegacy/LinkLegacyTest.d.ts.map +1 -1
- package/lib/fluent-tester/src/TestComponents/LinkLegacy/LinkLegacyTest.js +3 -1
- package/lib/fluent-tester/src/TestComponents/LinkLegacy/LinkLegacyTest.js.map +1 -1
- package/lib/fluent-tester/src/TestComponents/LinkV1/LinkV1Test.d.ts.map +1 -1
- package/lib/fluent-tester/src/TestComponents/LinkV1/LinkV1Test.js +3 -1
- package/lib/fluent-tester/src/TestComponents/LinkV1/LinkV1Test.js.map +1 -1
- package/lib/fluent-tester/src/TestComponents/Menu/MenuTest.d.ts.map +1 -1
- package/lib/fluent-tester/src/TestComponents/Menu/MenuTest.js +3 -1
- package/lib/fluent-tester/src/TestComponents/Menu/MenuTest.js.map +1 -1
- package/lib/fluent-tester/src/TestComponents/MenuButtonLegacy/MenuButtonLegacyTest.d.ts.map +1 -1
- package/lib/fluent-tester/src/TestComponents/MenuButtonLegacy/MenuButtonLegacyTest.js +3 -1
- package/lib/fluent-tester/src/TestComponents/MenuButtonLegacy/MenuButtonLegacyTest.js.map +1 -1
- package/lib/fluent-tester/src/TestComponents/MenuButtonV1/MenuButtonV1Test.d.ts.map +1 -1
- package/lib/fluent-tester/src/TestComponents/MenuButtonV1/MenuButtonV1Test.js +3 -1
- package/lib/fluent-tester/src/TestComponents/MenuButtonV1/MenuButtonV1Test.js.map +1 -1
- package/lib/fluent-tester/src/TestComponents/RadioGroupLegacy/RadioGroupLegacyTest.d.ts.map +1 -1
- package/lib/fluent-tester/src/TestComponents/RadioGroupLegacy/RadioGroupLegacyTest.js +3 -1
- package/lib/fluent-tester/src/TestComponents/RadioGroupLegacy/RadioGroupLegacyTest.js.map +1 -1
- package/lib/fluent-tester/src/TestComponents/RadioGroupV1/RadioGroupV1Test.d.ts.map +1 -1
- package/lib/fluent-tester/src/TestComponents/RadioGroupV1/RadioGroupV1Test.js +5 -4
- package/lib/fluent-tester/src/TestComponents/RadioGroupV1/RadioGroupV1Test.js.map +1 -1
- package/lib/fluent-tester/src/TestComponents/Switch/SwitchTest.d.ts.map +1 -1
- package/lib/fluent-tester/src/TestComponents/Switch/SwitchTest.js +4 -2
- package/lib/fluent-tester/src/TestComponents/Switch/SwitchTest.js.map +1 -1
- package/lib/fluent-tester/src/TestComponents/TabsLegacy/TabsLegacyTest.d.ts.map +1 -1
- package/lib/fluent-tester/src/TestComponents/TabsLegacy/TabsLegacyTest.js +3 -1
- package/lib/fluent-tester/src/TestComponents/TabsLegacy/TabsLegacyTest.js.map +1 -1
- package/lib/fluent-tester/src/TestComponents/TabsV1/TabsV1Test.d.ts.map +1 -1
- package/lib/fluent-tester/src/TestComponents/TabsV1/TabsV1Test.js +7 -5
- package/lib/fluent-tester/src/TestComponents/TabsV1/TabsV1Test.js.map +1 -1
- package/lib/fluent-tester/src/TestComponents/Test.d.ts +2 -1
- package/lib/fluent-tester/src/TestComponents/Test.d.ts.map +1 -1
- package/lib/fluent-tester/src/TestComponents/Test.js +36 -3
- package/lib/fluent-tester/src/TestComponents/Test.js.map +1 -1
- package/lib/fluent-tester/src/TestComponents/TextLegacy/TextLegacyTest.d.ts.map +1 -1
- package/lib/fluent-tester/src/TestComponents/TextLegacy/TextLegacyTest.js +3 -1
- package/lib/fluent-tester/src/TestComponents/TextLegacy/TextLegacyTest.js.map +1 -1
- package/lib/fluent-tester/src/TestComponents/TextV1/TextV1Test.d.ts.map +1 -1
- package/lib/fluent-tester/src/TestComponents/TextV1/TextV1Test.js +3 -1
- package/lib/fluent-tester/src/TestComponents/TextV1/TextV1Test.js.map +1 -1
- package/lib/fluent-tester/src/testPages.js +1 -1
- package/lib/fluent-tester/src/testPages.js.map +1 -1
- package/lib/fluent-tester/src/theme/ThemePickers.android.d.ts.map +1 -1
- package/lib/fluent-tester/src/theme/ThemePickers.android.js +4 -10
- package/lib/fluent-tester/src/theme/ThemePickers.android.js.map +1 -1
- package/lib-commonjs/E2E/src/common/BasePage.d.ts +31 -10
- package/lib-commonjs/E2E/src/common/BasePage.d.ts.map +1 -1
- package/lib-commonjs/E2E/src/common/BasePage.js +149 -112
- package/lib-commonjs/E2E/src/common/BasePage.js.map +1 -1
- package/lib-commonjs/E2E/src/common/consts.d.ts +2 -0
- package/lib-commonjs/E2E/src/common/consts.d.ts.map +1 -1
- package/lib-commonjs/E2E/src/common/consts.js +3 -1
- package/lib-commonjs/E2E/src/common/consts.js.map +1 -1
- package/lib-commonjs/fluent-tester/src/FluentTester.js +2 -2
- package/lib-commonjs/fluent-tester/src/FluentTester.js.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/Avatar/AvatarTest.d.ts.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/Avatar/AvatarTest.js +7 -5
- package/lib-commonjs/fluent-tester/src/TestComponents/Avatar/AvatarTest.js.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/Button/ButtonTest.d.ts.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/Button/ButtonTest.js +11 -5
- package/lib-commonjs/fluent-tester/src/TestComponents/Button/ButtonTest.js.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/Callout/CalloutTest.d.ts.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/Callout/CalloutTest.js +3 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/Callout/CalloutTest.js.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/CheckboxLegacy/CheckboxLegacyTest.d.ts.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/CheckboxLegacy/CheckboxLegacyTest.js +3 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/CheckboxLegacy/CheckboxLegacyTest.js.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/CheckboxV1/CheckboxV1Test.d.ts.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/CheckboxV1/CheckboxV1Test.js +3 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/CheckboxV1/CheckboxV1Test.js.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/ContextualMenu/ContextualMenuTest.d.ts.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/ContextualMenu/ContextualMenuTest.js +3 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/ContextualMenu/ContextualMenuTest.js.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/FocusZone/FocusZoneTest.d.ts.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/FocusZone/FocusZoneTest.js +3 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/FocusZone/FocusZoneTest.js.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/Icon/IconTest.d.ts.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/Icon/IconTest.js +3 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/Icon/IconTest.js.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/LinkLegacy/LinkLegacyTest.d.ts.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/LinkLegacy/LinkLegacyTest.js +3 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/LinkLegacy/LinkLegacyTest.js.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/LinkV1/LinkV1Test.d.ts.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/LinkV1/LinkV1Test.js +3 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/LinkV1/LinkV1Test.js.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/Menu/MenuTest.d.ts.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/Menu/MenuTest.js +3 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/Menu/MenuTest.js.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/MenuButtonLegacy/MenuButtonLegacyTest.d.ts.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/MenuButtonLegacy/MenuButtonLegacyTest.js +3 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/MenuButtonLegacy/MenuButtonLegacyTest.js.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/MenuButtonV1/MenuButtonV1Test.d.ts.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/MenuButtonV1/MenuButtonV1Test.js +3 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/MenuButtonV1/MenuButtonV1Test.js.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/RadioGroupLegacy/RadioGroupLegacyTest.d.ts.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/RadioGroupLegacy/RadioGroupLegacyTest.js +3 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/RadioGroupLegacy/RadioGroupLegacyTest.js.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/RadioGroupV1/RadioGroupV1Test.d.ts.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/RadioGroupV1/RadioGroupV1Test.js +5 -4
- package/lib-commonjs/fluent-tester/src/TestComponents/RadioGroupV1/RadioGroupV1Test.js.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/Switch/SwitchTest.d.ts.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/Switch/SwitchTest.js +4 -2
- package/lib-commonjs/fluent-tester/src/TestComponents/Switch/SwitchTest.js.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/TabsLegacy/TabsLegacyTest.d.ts.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/TabsLegacy/TabsLegacyTest.js +3 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/TabsLegacy/TabsLegacyTest.js.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/TabsV1/TabsV1Test.d.ts.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/TabsV1/TabsV1Test.js +7 -5
- package/lib-commonjs/fluent-tester/src/TestComponents/TabsV1/TabsV1Test.js.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/Test.d.ts +2 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/Test.d.ts.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/Test.js +35 -2
- package/lib-commonjs/fluent-tester/src/TestComponents/Test.js.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/TextLegacy/TextLegacyTest.d.ts.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/TextLegacy/TextLegacyTest.js +3 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/TextLegacy/TextLegacyTest.js.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/TextV1/TextV1Test.d.ts.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/TextV1/TextV1Test.js +3 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/TextV1/TextV1Test.js.map +1 -1
- package/lib-commonjs/fluent-tester/src/testPages.js +1 -1
- package/lib-commonjs/fluent-tester/src/testPages.js.map +1 -1
- package/lib-commonjs/fluent-tester/src/theme/ThemePickers.android.d.ts.map +1 -1
- package/lib-commonjs/fluent-tester/src/theme/ThemePickers.android.js +4 -10
- package/lib-commonjs/fluent-tester/src/theme/ThemePickers.android.js.map +1 -1
- package/package.json +15 -15
- package/src/FluentTester.tsx +1 -1
- package/src/TestComponents/Avatar/AvatarTest.tsx +10 -5
- package/src/TestComponents/Button/ButtonTest.tsx +14 -5
- package/src/TestComponents/Callout/CalloutTest.tsx +4 -1
- package/src/TestComponents/CheckboxLegacy/CheckboxLegacyTest.tsx +13 -1
- package/src/TestComponents/CheckboxV1/CheckboxV1Test.tsx +4 -1
- package/src/TestComponents/ContextualMenu/ContextualMenuTest.tsx +12 -1
- package/src/TestComponents/FocusZone/FocusZoneTest.tsx +6 -1
- package/src/TestComponents/Icon/IconTest.tsx +4 -1
- package/src/TestComponents/LinkLegacy/LinkLegacyTest.tsx +4 -1
- package/src/TestComponents/LinkV1/LinkV1Test.tsx +3 -1
- package/src/TestComponents/Menu/MenuTest.tsx +4 -1
- package/src/TestComponents/MenuButtonLegacy/MenuButtonLegacyTest.tsx +6 -1
- package/src/TestComponents/MenuButtonV1/MenuButtonV1Test.tsx +6 -1
- package/src/TestComponents/RadioGroupLegacy/RadioGroupLegacyTest.tsx +6 -1
- package/src/TestComponents/RadioGroupV1/RadioGroupV1Test.tsx +13 -1
- package/src/TestComponents/Switch/SwitchTest.tsx +7 -2
- package/src/TestComponents/TabsLegacy/TabsLegacyTest.tsx +4 -1
- package/src/TestComponents/TabsV1/TabsV1Test.tsx +8 -5
- package/src/TestComponents/Test.tsx +55 -9
- package/src/TestComponents/TextLegacy/TextLegacyTest.tsx +4 -1
- package/src/TestComponents/TextV1/TextV1Test.tsx +4 -1
- package/src/testPages.ts +1 -1
- package/src/theme/ThemePickers.android.tsx +3 -13
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Platform, StyleSheet, View } from 'react-native';
|
|
2
|
+
import { Platform, StyleSheet, Switch, View } from 'react-native';
|
|
3
3
|
import { Text, ToggleButton, Separator, Link } from '@fluentui/react-native';
|
|
4
4
|
import { Stack } from '@fluentui-react-native/stack';
|
|
5
5
|
import { stackStyle } from './Common/styles';
|
|
@@ -9,12 +9,13 @@ import Svg, { G, Path } from 'react-native-svg';
|
|
|
9
9
|
import type { SvgIconProps } from '@fluentui-react-native/icon';
|
|
10
10
|
import { Button } from '@fluentui-react-native/experimental-button';
|
|
11
11
|
import { testProps } from './Common/TestProps';
|
|
12
|
+
import { E2E_MODE_SWITCH, E2E_TEST_SECTION } from '../../../E2E/src/index.consts';
|
|
12
13
|
|
|
13
14
|
export type TestSection = {
|
|
14
15
|
name: string;
|
|
15
16
|
testID?: string;
|
|
16
17
|
component: React.FunctionComponent;
|
|
17
|
-
};
|
|
18
|
+
} | null;
|
|
18
19
|
|
|
19
20
|
export type Status = 'Production' | 'Beta' | 'Experimental' | 'Backlog' | 'N/A' | 'Deprecated';
|
|
20
21
|
export type PlatformStatus = {
|
|
@@ -31,6 +32,7 @@ export interface TestProps {
|
|
|
31
32
|
spec?: string;
|
|
32
33
|
status: PlatformStatus;
|
|
33
34
|
sections: TestSection[];
|
|
35
|
+
e2eSections?: TestSection[];
|
|
34
36
|
}
|
|
35
37
|
|
|
36
38
|
const definitions = {
|
|
@@ -45,6 +47,7 @@ const definitions = {
|
|
|
45
47
|
const styles = StyleSheet.create({
|
|
46
48
|
name: {
|
|
47
49
|
marginTop: 4,
|
|
50
|
+
flex: Platform.select({ ios: 0, android: 0, default: 1 }),
|
|
48
51
|
},
|
|
49
52
|
definitionHeader: {
|
|
50
53
|
marginTop: 12,
|
|
@@ -58,6 +61,7 @@ const styles = StyleSheet.create({
|
|
|
58
61
|
alignItems: 'center',
|
|
59
62
|
flexDirection: 'row',
|
|
60
63
|
justifyContent: 'space-between',
|
|
64
|
+
flexWrap: 'wrap',
|
|
61
65
|
},
|
|
62
66
|
section: {
|
|
63
67
|
marginTop: 12,
|
|
@@ -79,10 +83,24 @@ const styles = StyleSheet.create({
|
|
|
79
83
|
e2eFocusButton: {
|
|
80
84
|
opacity: 0,
|
|
81
85
|
},
|
|
86
|
+
e2eSection: {
|
|
87
|
+
marginBottom: 4,
|
|
88
|
+
},
|
|
89
|
+
e2eSwitch: {
|
|
90
|
+
display: 'flex',
|
|
91
|
+
flexDirection: 'row',
|
|
92
|
+
alignItems: 'center',
|
|
93
|
+
justifyContent: 'center',
|
|
94
|
+
},
|
|
95
|
+
e2eSwitchLabel: {
|
|
96
|
+
marginRight: 4,
|
|
97
|
+
textAlignVertical: 'center',
|
|
98
|
+
},
|
|
82
99
|
});
|
|
83
100
|
|
|
84
101
|
export const Test = (props: TestProps): React.ReactElement<Record<string, never>> => {
|
|
85
102
|
const [showStatus, setShowStatus] = React.useState(false);
|
|
103
|
+
const [showE2E, setShowE2E] = React.useState(false);
|
|
86
104
|
|
|
87
105
|
const toggleSvg: React.FunctionComponent<SvgProps> = () => {
|
|
88
106
|
const plusPath =
|
|
@@ -114,6 +132,9 @@ export const Test = (props: TestProps): React.ReactElement<Record<string, never>
|
|
|
114
132
|
};
|
|
115
133
|
|
|
116
134
|
const toggleIconProps = Platform.OS === 'windows' ? { fontSource: fontIconProps } : { svgSource: svgProps, width: 12, height: 12 };
|
|
135
|
+
const { e2eSections } = props;
|
|
136
|
+
|
|
137
|
+
const isMobile = Platform.OS === 'ios' || Platform.OS === 'android';
|
|
117
138
|
|
|
118
139
|
return (
|
|
119
140
|
<View>
|
|
@@ -121,16 +142,41 @@ export const Test = (props: TestProps): React.ReactElement<Record<string, never>
|
|
|
121
142
|
<Text style={styles.name} variant="heroSemibold">
|
|
122
143
|
{props.name}
|
|
123
144
|
</Text>
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
145
|
+
{!isMobile && (
|
|
146
|
+
<Button
|
|
147
|
+
/* For Android E2E testing purposes, testProps must be passed in after accessibilityLabel. */
|
|
148
|
+
{...testProps('Focus_Button')}
|
|
149
|
+
style={styles.e2eFocusButton}
|
|
150
|
+
>
|
|
151
|
+
E2E Button
|
|
152
|
+
</Button>
|
|
153
|
+
)}
|
|
154
|
+
{props.e2eSections && (
|
|
155
|
+
<View style={styles.e2eSwitch}>
|
|
156
|
+
<Text style={styles.e2eSwitchLabel} {...(isMobile ? {} : { variant: 'body1Strong' })}>
|
|
157
|
+
E2E Mode
|
|
158
|
+
</Text>
|
|
159
|
+
<Switch onValueChange={setShowE2E} value={showE2E} {...testProps(E2E_MODE_SWITCH)} />
|
|
160
|
+
</View>
|
|
161
|
+
)}
|
|
131
162
|
{props.spec && <Link url={props.spec} content="SPEC" />}
|
|
132
163
|
</View>
|
|
133
164
|
<Separator />
|
|
165
|
+
{e2eSections && showE2E && (
|
|
166
|
+
// We can check if the E2E section renders by checking if the "E2E Tests" header has rendered for each spec
|
|
167
|
+
<>
|
|
168
|
+
<Text variant="headerSemibold" {...testProps(E2E_TEST_SECTION)}>
|
|
169
|
+
E2E Tests
|
|
170
|
+
</Text>
|
|
171
|
+
{e2eSections.map((section, i) => {
|
|
172
|
+
if (section === null) {
|
|
173
|
+
return null;
|
|
174
|
+
}
|
|
175
|
+
const { component: E2EComponent } = section;
|
|
176
|
+
return <E2EComponent key={i} />;
|
|
177
|
+
})}
|
|
178
|
+
</>
|
|
179
|
+
)}
|
|
134
180
|
<Stack style={stackStyle}>
|
|
135
181
|
<Text style={styles.description}>{props.description}</Text>
|
|
136
182
|
</Stack>
|
|
@@ -21,6 +21,9 @@ const textSections: TestSection[] = [
|
|
|
21
21
|
name: 'Pressable Usage',
|
|
22
22
|
component: PressableUsage,
|
|
23
23
|
},
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
const e2eSections: TestSection[] = [
|
|
24
27
|
{
|
|
25
28
|
name: 'E2E Text Tests',
|
|
26
29
|
component: TextLegacyE2ETest,
|
|
@@ -40,5 +43,5 @@ export const TextLegacyTest: React.FunctionComponent = () => {
|
|
|
40
43
|
|
|
41
44
|
const spec = 'https://github.com/microsoft/fluentui-react-native/blob/main/packages/components/text/SPEC.md';
|
|
42
45
|
|
|
43
|
-
return <Test name="Text Test" description={description} spec={spec} sections={textSections} status={status} />;
|
|
46
|
+
return <Test name="Text Test" description={description} spec={spec} sections={textSections} status={status} e2eSections={e2eSections} />;
|
|
44
47
|
};
|
|
@@ -31,6 +31,9 @@ const textSections: TestSection[] = [
|
|
|
31
31
|
name: 'Pressable Usage',
|
|
32
32
|
component: PressableUsage,
|
|
33
33
|
},
|
|
34
|
+
];
|
|
35
|
+
|
|
36
|
+
const e2eSections: TestSection[] = [
|
|
34
37
|
{
|
|
35
38
|
name: 'E2E Testing for TextV1',
|
|
36
39
|
component: TextV1E2ETest,
|
|
@@ -48,5 +51,5 @@ export const TextV1Test: React.FunctionComponent = () => {
|
|
|
48
51
|
|
|
49
52
|
const description = 'Text is a component for displaying text. You can use Text to standardize text across your app.';
|
|
50
53
|
|
|
51
|
-
return <Test name="TextV1 Test" description={description} sections={textSections} status={status} />;
|
|
54
|
+
return <Test name="TextV1 Test" description={description} sections={textSections} status={status} e2eSections={e2eSections} />;
|
|
52
55
|
};
|
package/src/testPages.ts
CHANGED
|
@@ -223,7 +223,7 @@ export const tests: TestDescription[] = [
|
|
|
223
223
|
name: 'RadioGroup V1',
|
|
224
224
|
component: RadioGroupV1Test,
|
|
225
225
|
testPageButton: Constants.HOMEPAGE_RADIOGROUPV1_BUTTON,
|
|
226
|
-
platforms: ['android', 'macos', 'win32'],
|
|
226
|
+
platforms: ['android', 'ios', 'macos', 'win32'],
|
|
227
227
|
},
|
|
228
228
|
{
|
|
229
229
|
name: 'Separator',
|
|
@@ -4,8 +4,6 @@ import { TextV1 as Text } from '@fluentui-react-native/text';
|
|
|
4
4
|
import { lightnessOptions, testerTheme } from './CustomThemes';
|
|
5
5
|
import type { ThemeNames } from './applyTheme';
|
|
6
6
|
import { themeChoices } from './applyTheme';
|
|
7
|
-
import type { OfficeBrand } from './applyBrand';
|
|
8
|
-
import { brandOptions } from './applyBrand';
|
|
9
7
|
import type { Theme } from '@fluentui-react-native/framework';
|
|
10
8
|
import { useTheme } from '@fluentui-react-native/framework';
|
|
11
9
|
import { themedStyleSheet } from '@fluentui-react-native/themed-stylesheet';
|
|
@@ -16,15 +14,15 @@ const getThemedDropdownStyles = themedStyleSheet((t: Theme) => {
|
|
|
16
14
|
return {
|
|
17
15
|
pickerRoot: {
|
|
18
16
|
flexDirection: 'row',
|
|
17
|
+
width: '100%',
|
|
19
18
|
},
|
|
20
19
|
picker: {
|
|
21
20
|
flexDirection: 'column',
|
|
22
21
|
alignItems: 'center',
|
|
22
|
+
width: '50%',
|
|
23
23
|
padding: 4,
|
|
24
24
|
},
|
|
25
25
|
dropdown: {
|
|
26
|
-
height: 30,
|
|
27
|
-
width: 120,
|
|
28
26
|
fontSize: 12,
|
|
29
27
|
color: t.colors.bodyText,
|
|
30
28
|
},
|
|
@@ -32,6 +30,7 @@ const getThemedDropdownStyles = themedStyleSheet((t: Theme) => {
|
|
|
32
30
|
borderStyle: 'solid',
|
|
33
31
|
borderColor: t.colors.disabledBodyText,
|
|
34
32
|
borderWidth: 1,
|
|
33
|
+
width: '100%',
|
|
35
34
|
},
|
|
36
35
|
};
|
|
37
36
|
});
|
|
@@ -39,10 +38,6 @@ const getThemedDropdownStyles = themedStyleSheet((t: Theme) => {
|
|
|
39
38
|
const PickerLabel = Text.customize({ variant: 'subheaderSemibold' });
|
|
40
39
|
|
|
41
40
|
export const ThemePickers: React.FunctionComponent = () => {
|
|
42
|
-
const onBrandChange = React.useCallback((newBrand: string) => {
|
|
43
|
-
testerTheme.brand = newBrand as OfficeBrand;
|
|
44
|
-
}, []);
|
|
45
|
-
|
|
46
41
|
const onThemeSelected = React.useCallback((newTheme: string) => {
|
|
47
42
|
testerTheme.themeName = newTheme as ThemeNames;
|
|
48
43
|
}, []);
|
|
@@ -87,11 +82,6 @@ export const ThemePickers: React.FunctionComponent = () => {
|
|
|
87
82
|
<PickerLabel>Light/Dark: </PickerLabel>
|
|
88
83
|
<Dropdown initial={testerTheme.appearance} onValueChange={onAppearanceChange} options={lightnessOptions} />
|
|
89
84
|
</View>
|
|
90
|
-
|
|
91
|
-
<View style={themedPickerStyles.picker}>
|
|
92
|
-
<PickerLabel>Brand: </PickerLabel>
|
|
93
|
-
<Dropdown initial={testerTheme.brand} onValueChange={onBrandChange} options={brandOptions} />
|
|
94
|
-
</View>
|
|
95
85
|
</View>
|
|
96
86
|
);
|
|
97
87
|
};
|