@fluentui-react-native/tester 0.129.5 → 0.129.7
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 +133 -34
- package/CHANGELOG.md +27 -2
- package/docs/android.md +0 -19
- package/lib/E2E/src/FocusZone/consts.d.ts +3 -2
- package/lib/E2E/src/FocusZone/consts.d.ts.map +1 -1
- package/lib/E2E/src/FocusZone/consts.js.map +1 -1
- package/lib/E2E/src/FocusZone/pages/FocusZonePageObject.d.ts +28 -0
- package/lib/E2E/src/FocusZone/pages/FocusZonePageObject.d.ts.map +1 -0
- package/lib/E2E/src/FocusZone/pages/FocusZonePageObject.js +189 -0
- package/lib/E2E/src/FocusZone/pages/FocusZonePageObject.js.map +1 -0
- package/lib/E2E/src/common/BasePage.d.ts +67 -0
- package/lib/E2E/src/common/BasePage.d.ts.map +1 -0
- package/lib/E2E/src/common/BasePage.js +654 -0
- package/lib/E2E/src/common/BasePage.js.map +1 -0
- package/lib/E2E/src/common/consts.d.ts.map +1 -1
- package/lib/E2E/src/common/consts.js.map +1 -1
- package/lib/fluent-tester/src/TestComponents/Button/ButtonSizeTestSection.d.ts.map +1 -1
- package/lib/fluent-tester/src/TestComponents/Button/ButtonSizeTestSection.js +2 -1
- package/lib/fluent-tester/src/TestComponents/Button/ButtonSizeTestSection.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 +4 -2
- package/lib/fluent-tester/src/TestComponents/Button/ButtonTest.js.map +1 -1
- package/lib/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.android.d.ts +1 -2
- package/lib/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.android.d.ts.map +1 -1
- package/lib/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.android.js +1 -22
- package/lib/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.android.js.map +1 -1
- package/lib/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.ios.d.ts +2 -0
- package/lib/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.ios.d.ts.map +1 -0
- package/lib/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.ios.js +2 -0
- package/lib/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.ios.js.map +1 -0
- package/lib/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.mobile.d.ts +3 -0
- package/lib/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.mobile.d.ts.map +1 -0
- package/lib/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.mobile.js +23 -0
- package/lib/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.mobile.js.map +1 -0
- package/lib/fluent-tester/src/TestComponents/Button/deprecated/ButtonFocusTest.d.ts.map +1 -1
- package/lib/fluent-tester/src/TestComponents/Button/deprecated/ButtonFocusTest.js +0 -3
- package/lib/fluent-tester/src/TestComponents/Button/deprecated/ButtonFocusTest.js.map +1 -1
- package/lib/fluent-tester/src/TestComponents/Common/MenuPicker.d.ts +2 -13
- package/lib/fluent-tester/src/TestComponents/Common/MenuPicker.d.ts.map +1 -1
- package/lib/fluent-tester/src/TestComponents/Common/MenuPicker.desktop.d.ts +2 -2
- package/lib/fluent-tester/src/TestComponents/Common/MenuPicker.desktop.d.ts.map +1 -1
- package/lib/fluent-tester/src/TestComponents/Common/MenuPicker.js +4 -0
- package/lib/fluent-tester/src/TestComponents/Common/MenuPicker.js.map +1 -1
- package/lib/fluent-tester/src/TestComponents/Common/MenuPicker.types.d.ts +14 -0
- package/lib/fluent-tester/src/TestComponents/Common/MenuPicker.types.d.ts.map +1 -0
- package/lib/fluent-tester/src/TestComponents/Common/MenuPicker.types.js +2 -0
- package/lib/fluent-tester/src/TestComponents/Common/MenuPicker.types.js.map +1 -0
- package/lib/fluent-tester/src/TestComponents/Common/MenuPicker.windows.d.ts +2 -1
- package/lib/fluent-tester/src/TestComponents/Common/MenuPicker.windows.d.ts.map +1 -1
- package/lib/fluent-tester/src/TestComponents/Common/MenuPicker.windows.js.map +1 -1
- package/lib/fluent-tester/src/TestComponents/FocusZone/FocusZoneE2ETest.d.ts +1 -1
- package/lib/fluent-tester/src/TestComponents/FocusZone/FocusZoneE2ETest.d.ts.map +1 -1
- package/lib/fluent-tester/src/TestComponents/FocusZone/FocusZoneE2ETest.js +5 -5
- package/lib/fluent-tester/src/TestComponents/FocusZone/FocusZoneE2ETest.js.map +1 -1
- package/lib-commonjs/E2E/src/FocusZone/consts.d.ts +3 -2
- package/lib-commonjs/E2E/src/FocusZone/consts.d.ts.map +1 -1
- package/lib-commonjs/E2E/src/FocusZone/consts.js.map +1 -1
- package/lib-commonjs/E2E/src/FocusZone/pages/FocusZonePageObject.d.ts +28 -0
- package/lib-commonjs/E2E/src/FocusZone/pages/FocusZonePageObject.d.ts.map +1 -0
- package/lib-commonjs/E2E/src/FocusZone/pages/FocusZonePageObject.js +191 -0
- package/lib-commonjs/E2E/src/FocusZone/pages/FocusZonePageObject.js.map +1 -0
- package/lib-commonjs/E2E/src/common/BasePage.d.ts +67 -0
- package/lib-commonjs/E2E/src/common/BasePage.d.ts.map +1 -0
- package/lib-commonjs/E2E/src/common/BasePage.js +658 -0
- package/lib-commonjs/E2E/src/common/BasePage.js.map +1 -0
- package/lib-commonjs/E2E/src/common/consts.d.ts.map +1 -1
- package/lib-commonjs/E2E/src/common/consts.js.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/Button/ButtonSizeTestSection.d.ts.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/Button/ButtonSizeTestSection.js +2 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/Button/ButtonSizeTestSection.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 +4 -2
- package/lib-commonjs/fluent-tester/src/TestComponents/Button/ButtonTest.js.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.android.d.ts +1 -2
- package/lib-commonjs/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.android.d.ts.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.android.js +2 -24
- package/lib-commonjs/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.android.js.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.ios.d.ts +2 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.ios.d.ts.map +1 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.ios.js +6 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.ios.js.map +1 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.mobile.d.ts +3 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.mobile.d.ts.map +1 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.mobile.js +28 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.mobile.js.map +1 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/Button/deprecated/ButtonFocusTest.d.ts.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/Button/deprecated/ButtonFocusTest.js +0 -3
- package/lib-commonjs/fluent-tester/src/TestComponents/Button/deprecated/ButtonFocusTest.js.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/Common/MenuPicker.d.ts +2 -13
- package/lib-commonjs/fluent-tester/src/TestComponents/Common/MenuPicker.d.ts.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/Common/MenuPicker.desktop.d.ts +2 -2
- package/lib-commonjs/fluent-tester/src/TestComponents/Common/MenuPicker.desktop.d.ts.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/Common/MenuPicker.js +4 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/Common/MenuPicker.js.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/Common/MenuPicker.types.d.ts +14 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/Common/MenuPicker.types.d.ts.map +1 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/Common/MenuPicker.types.js +3 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/Common/MenuPicker.types.js.map +1 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/Common/MenuPicker.windows.d.ts +2 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/Common/MenuPicker.windows.d.ts.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/Common/MenuPicker.windows.js.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/FocusZone/FocusZoneE2ETest.d.ts +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/FocusZone/FocusZoneE2ETest.d.ts.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/FocusZone/FocusZoneE2ETest.js +14 -14
- package/lib-commonjs/fluent-tester/src/TestComponents/FocusZone/FocusZoneE2ETest.js.map +1 -1
- package/package.json +9 -9
- package/src/TestComponents/Button/ButtonSizeTestSection.tsx +3 -1
- package/src/TestComponents/Button/ButtonTest.tsx +4 -2
- package/src/TestComponents/Button/ButtonVariantTestSection.android.tsx +1 -45
- package/src/TestComponents/Button/ButtonVariantTestSection.ios.tsx +1 -0
- package/src/TestComponents/Button/ButtonVariantTestSection.mobile.tsx +45 -0
- package/src/TestComponents/Button/deprecated/ButtonFocusTest.tsx +0 -3
- package/src/TestComponents/Common/MenuPicker.desktop.tsx +2 -2
- package/src/TestComponents/Common/MenuPicker.tsx +2 -15
- package/src/TestComponents/Common/MenuPicker.types.tsx +14 -0
- package/src/TestComponents/Common/MenuPicker.windows.tsx +2 -1
- package/src/TestComponents/FocusZone/FocusZoneE2ETest.tsx +15 -14
- package/tsconfig.json +2 -1
|
@@ -25,7 +25,9 @@ const buttonSections: TestSection[] = [
|
|
|
25
25
|
component: ButtonIconTest,
|
|
26
26
|
},
|
|
27
27
|
...Platform.select({
|
|
28
|
-
|
|
28
|
+
// The following sections are not supported for iOS or Android
|
|
29
|
+
ios: [],
|
|
30
|
+
android: [],
|
|
29
31
|
default: [
|
|
30
32
|
{
|
|
31
33
|
name: 'Toggle Button',
|
|
@@ -53,7 +55,7 @@ const buttonSections: TestSection[] = [
|
|
|
53
55
|
component: E2EButtonTest,
|
|
54
56
|
},
|
|
55
57
|
...Platform.select({
|
|
56
|
-
android: [
|
|
58
|
+
android: [], // Following sections are not supported from Fluent Android
|
|
57
59
|
default: [
|
|
58
60
|
{
|
|
59
61
|
name: 'Deprecated Basic Button',
|
|
@@ -1,45 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { View } from 'react-native';
|
|
4
|
-
import { commonTestStyles, testContentRootViewStyle } from '../Common/styles';
|
|
5
|
-
import { iconProps } from '../Common/iconExamples';
|
|
6
|
-
|
|
7
|
-
export const ButtonVariantTest: React.FunctionComponent = () => {
|
|
8
|
-
const [showFABText, setShowFABText] = React.useState(true);
|
|
9
|
-
const flipFABcontent = React.useCallback(() => setShowFABText(!showFABText), [showFABText]);
|
|
10
|
-
|
|
11
|
-
return (
|
|
12
|
-
<View style={testContentRootViewStyle}>
|
|
13
|
-
<Button style={commonTestStyles.vmargin}>Default</Button>
|
|
14
|
-
<Button disabled style={commonTestStyles.vmargin}>
|
|
15
|
-
Default Disabled
|
|
16
|
-
</Button>
|
|
17
|
-
<Button appearance="accent" style={commonTestStyles.vmargin}>
|
|
18
|
-
Accent
|
|
19
|
-
</Button>
|
|
20
|
-
<Button disabled appearance="accent" style={commonTestStyles.vmargin}>
|
|
21
|
-
Accent Disabled
|
|
22
|
-
</Button>
|
|
23
|
-
<Button appearance="outline" style={commonTestStyles.vmargin}>
|
|
24
|
-
Outline
|
|
25
|
-
</Button>
|
|
26
|
-
<Button appearance="outline" disabled style={commonTestStyles.vmargin}>
|
|
27
|
-
Outline Disabled
|
|
28
|
-
</Button>
|
|
29
|
-
<Button appearance="subtle" style={commonTestStyles.vmargin}>
|
|
30
|
-
Subtle
|
|
31
|
-
</Button>
|
|
32
|
-
<Button appearance="subtle" disabled style={commonTestStyles.vmargin}>
|
|
33
|
-
Subtle Disabled
|
|
34
|
-
</Button>
|
|
35
|
-
<FAB icon={iconProps} iconOnly disabled style={commonTestStyles.vmargin} />
|
|
36
|
-
<FAB icon={iconProps} style={commonTestStyles.vmargin} showContent={showFABText} onClick={flipFABcontent}>
|
|
37
|
-
Click Me!
|
|
38
|
-
</FAB>
|
|
39
|
-
<FAB appearance="subtle" iconOnly disabled icon={iconProps} style={commonTestStyles.vmargin} />
|
|
40
|
-
<FAB appearance="subtle" icon={iconProps} style={commonTestStyles.vmargin} showContent={showFABText} onClick={flipFABcontent}>
|
|
41
|
-
Click Me!
|
|
42
|
-
</FAB>
|
|
43
|
-
</View>
|
|
44
|
-
);
|
|
45
|
-
};
|
|
1
|
+
export { ButtonVariantTest } from './ButtonVariantTestSection.mobile';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ButtonVariantTest } from './ButtonVariantTestSection.mobile';
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Button, FAB } from '@fluentui-react-native/experimental-button';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { View } from 'react-native';
|
|
4
|
+
import { commonTestStyles, testContentRootViewStyle } from '../Common/styles';
|
|
5
|
+
import { iconProps } from '../Common/iconExamples';
|
|
6
|
+
|
|
7
|
+
export const ButtonVariantTest: React.FunctionComponent = () => {
|
|
8
|
+
const [showFABText, setShowFABText] = React.useState(true);
|
|
9
|
+
const flipFABcontent = React.useCallback(() => setShowFABText(!showFABText), [showFABText]);
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<View style={testContentRootViewStyle}>
|
|
13
|
+
<Button style={commonTestStyles.vmargin}>Default</Button>
|
|
14
|
+
<Button disabled style={commonTestStyles.vmargin}>
|
|
15
|
+
Default Disabled
|
|
16
|
+
</Button>
|
|
17
|
+
<Button appearance="accent" style={commonTestStyles.vmargin}>
|
|
18
|
+
Accent
|
|
19
|
+
</Button>
|
|
20
|
+
<Button disabled appearance="accent" style={commonTestStyles.vmargin}>
|
|
21
|
+
Accent Disabled
|
|
22
|
+
</Button>
|
|
23
|
+
<Button appearance="outline" style={commonTestStyles.vmargin}>
|
|
24
|
+
Outline
|
|
25
|
+
</Button>
|
|
26
|
+
<Button appearance="outline" disabled style={commonTestStyles.vmargin}>
|
|
27
|
+
Outline Disabled
|
|
28
|
+
</Button>
|
|
29
|
+
<Button appearance="subtle" style={commonTestStyles.vmargin}>
|
|
30
|
+
Subtle
|
|
31
|
+
</Button>
|
|
32
|
+
<Button appearance="subtle" disabled style={commonTestStyles.vmargin}>
|
|
33
|
+
Subtle Disabled
|
|
34
|
+
</Button>
|
|
35
|
+
<FAB icon={iconProps} iconOnly disabled style={commonTestStyles.vmargin} />
|
|
36
|
+
<FAB icon={iconProps} style={commonTestStyles.vmargin} showContent={showFABText} onClick={flipFABcontent}>
|
|
37
|
+
Click Me!
|
|
38
|
+
</FAB>
|
|
39
|
+
<FAB appearance="subtle" iconOnly disabled icon={iconProps} style={commonTestStyles.vmargin} />
|
|
40
|
+
<FAB appearance="subtle" icon={iconProps} style={commonTestStyles.vmargin} showContent={showFABText} onClick={flipFABcontent}>
|
|
41
|
+
Click Me!
|
|
42
|
+
</FAB>
|
|
43
|
+
</View>
|
|
44
|
+
);
|
|
45
|
+
};
|
|
@@ -2,7 +2,6 @@ import { Button } from '@fluentui/react-native';
|
|
|
2
2
|
import type { IFocusable } from '@fluentui-react-native/interactive-hooks';
|
|
3
3
|
import { Stack } from '@fluentui-react-native/stack';
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import { findNodeHandle } from 'react-native';
|
|
6
5
|
import { stackStyle } from '../../Common/styles';
|
|
7
6
|
|
|
8
7
|
export const ButtonFocusTest_deprecated: React.FunctionComponent = () => {
|
|
@@ -14,8 +13,6 @@ export const ButtonFocusTest_deprecated: React.FunctionComponent = () => {
|
|
|
14
13
|
const onFocus = React.useCallback(() => {
|
|
15
14
|
setState({ focused: !state.focused });
|
|
16
15
|
if (buttonRef.current && !state.focused) {
|
|
17
|
-
const node = findNodeHandle(buttonRef.current);
|
|
18
|
-
console.log(node);
|
|
19
16
|
buttonRef.current.focus();
|
|
20
17
|
}
|
|
21
18
|
}, [state, setState]);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { View, StyleSheet } from 'react-native';
|
|
3
3
|
import { Menu, MenuItem, MenuTrigger, MenuPopover, MenuList } from '@fluentui-react-native/menu';
|
|
4
|
-
import type { MenuPickerProps, CollectionItem } from './MenuPicker';
|
|
5
|
-
export
|
|
4
|
+
import type { MenuPickerProps, CollectionItem } from './MenuPicker.types';
|
|
5
|
+
export { MenuPickerProps, CollectionItem };
|
|
6
6
|
import { ButtonV1 as Button, Text } from '@fluentui/react-native';
|
|
7
7
|
import { SvgXml } from 'react-native-svg';
|
|
8
8
|
|
|
@@ -1,27 +1,14 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Picker } from '@react-native-picker/picker';
|
|
3
3
|
import { testProps } from './TestProps';
|
|
4
|
+
import type { CollectionItem, MenuPickerProps } from './MenuPicker.types';
|
|
5
|
+
export { CollectionItem, MenuPickerProps };
|
|
4
6
|
|
|
5
7
|
/*
|
|
6
8
|
* The MenuPicker was created because the RN Core Picker was deprecated (preventing us from updating to RN 0.66).
|
|
7
9
|
* MenuPicker uses the community Picker package for iOS/Win32 and our own Picker for Win32/MacOS.
|
|
8
10
|
*/
|
|
9
11
|
|
|
10
|
-
export interface CollectionItem<T = string> {
|
|
11
|
-
label: string;
|
|
12
|
-
value?: T;
|
|
13
|
-
testID?: string;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface MenuPickerProps {
|
|
17
|
-
prompt?: string;
|
|
18
|
-
selected?: string;
|
|
19
|
-
onChange?: (value: any, index?: number) => void;
|
|
20
|
-
collection?: CollectionItem[];
|
|
21
|
-
style?: any;
|
|
22
|
-
testID?: string;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
12
|
export const MenuPicker: React.FunctionComponent<MenuPickerProps> = (props: MenuPickerProps) => {
|
|
26
13
|
const { prompt, selected, onChange, collection, style, testID } = props;
|
|
27
14
|
let selectedItemKey;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface CollectionItem<T = string> {
|
|
2
|
+
label: string;
|
|
3
|
+
value?: T;
|
|
4
|
+
testID?: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface MenuPickerProps {
|
|
8
|
+
prompt?: string;
|
|
9
|
+
selected?: string;
|
|
10
|
+
onChange?: (value: any, index?: number) => void;
|
|
11
|
+
collection?: CollectionItem[];
|
|
12
|
+
style?: any;
|
|
13
|
+
testID?: string;
|
|
14
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export * from './MenuPicker.desktop';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { Button, Text, View, StyleSheet } from 'react-native';
|
|
4
|
-
import type { MenuPickerProps, CollectionItem } from './MenuPicker';
|
|
4
|
+
import type { MenuPickerProps, CollectionItem } from './MenuPicker.types';
|
|
5
|
+
export { MenuPickerProps, CollectionItem };
|
|
5
6
|
|
|
6
7
|
export const MenuPicker: React.FunctionComponent<MenuPickerProps> = (props: MenuPickerProps) => {
|
|
7
8
|
const { prompt, onChange, collection } = props;
|
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { View } from 'react-native';
|
|
3
|
-
import type { FocusZoneDirection } from '@fluentui/react-native';
|
|
4
|
-
import { FocusZone, MenuButton, Text } from '@fluentui/react-native';
|
|
5
|
-
import { Switch } from '@fluentui-react-native/switch';
|
|
6
1
|
import type { ButtonProps } from '@fluentui-react-native/button';
|
|
7
2
|
import { ButtonV1 as Button } from '@fluentui-react-native/button';
|
|
8
|
-
import {
|
|
3
|
+
import { Switch } from '@fluentui-react-native/switch';
|
|
4
|
+
import type { FocusZoneDirection } from '@fluentui/react-native';
|
|
5
|
+
import { FocusZone, MenuButton, Text } from '@fluentui/react-native';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import { View } from 'react-native';
|
|
9
8
|
import {
|
|
10
|
-
FOCUSZONE_TEST_COMPONENT,
|
|
11
|
-
FOCUSZONE_DIRECTION_ID,
|
|
12
|
-
FOCUSZONE_TWO_DIM_SWITCH,
|
|
13
|
-
FOCUSZONE_DISABLED_SWITCH,
|
|
14
9
|
FOCUSZONE_CIRCLE_NAV_SWITCH,
|
|
15
10
|
FOCUSZONE_DEFAULT_TABBABLE_SWITCH,
|
|
16
|
-
|
|
11
|
+
FOCUSZONE_DIRECTION_ID,
|
|
12
|
+
FOCUSZONE_DIRECTION_PICKER,
|
|
13
|
+
FOCUSZONE_DISABLED_SWITCH,
|
|
17
14
|
FOCUSZONE_GRID_AFTER,
|
|
15
|
+
FOCUSZONE_GRID_BEFORE,
|
|
18
16
|
FOCUSZONE_GRID_BUTTON,
|
|
19
|
-
|
|
17
|
+
FOCUSZONE_TEST_COMPONENT,
|
|
18
|
+
FOCUSZONE_TWO_DIM_SWITCH,
|
|
20
19
|
} from '../../../../E2E/src/FocusZone/consts';
|
|
21
|
-
import {
|
|
20
|
+
import type { GridButton as GridButtonIndex } from '../../../../E2E/src/FocusZone/pages/FocusZonePageObject';
|
|
21
|
+
import { commonTestStyles } from '../Common/styles';
|
|
22
22
|
import { testProps } from '../Common/TestProps';
|
|
23
|
+
import { focusZoneTestStyles, GridButton } from './styles';
|
|
23
24
|
|
|
24
25
|
export const FocusZoneDirections: FocusZoneDirection[] = ['bidirectional', 'horizontal', 'vertical', 'none'];
|
|
25
26
|
|
|
@@ -68,7 +69,7 @@ export const GridOfButtons: React.FunctionComponent<GridOfButtonsProps> = (props
|
|
|
68
69
|
style={focusZoneTestStyles.focusZoneButton}
|
|
69
70
|
componentRef={gridIndex === props.tabbableIdx ? props.tabRef : undefined}
|
|
70
71
|
/* For Android E2E testing purposes, testProps must be passed in after accessibilityLabel. */
|
|
71
|
-
{...testProps(props.e2etesting ? FOCUSZONE_GRID_BUTTON(gridIndex) : undefined)}
|
|
72
|
+
{...testProps(props.e2etesting ? FOCUSZONE_GRID_BUTTON(gridIndex as GridButtonIndex) : undefined)}
|
|
72
73
|
>
|
|
73
74
|
<Text>{gridIndex}</Text>
|
|
74
75
|
</GridButton>
|