@fluentui-react-native/tester 0.129.6 → 0.129.8

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.
Files changed (95) hide show
  1. package/CHANGELOG.json +280 -1
  2. package/CHANGELOG.md +57 -2
  3. package/lib/E2E/src/FocusZone/consts.d.ts +3 -2
  4. package/lib/E2E/src/FocusZone/consts.d.ts.map +1 -1
  5. package/lib/E2E/src/FocusZone/consts.js.map +1 -1
  6. package/lib/E2E/src/FocusZone/pages/FocusZonePageObject.d.ts +28 -0
  7. package/lib/E2E/src/FocusZone/pages/FocusZonePageObject.d.ts.map +1 -0
  8. package/lib/E2E/src/FocusZone/pages/FocusZonePageObject.js +189 -0
  9. package/lib/E2E/src/FocusZone/pages/FocusZonePageObject.js.map +1 -0
  10. package/lib/E2E/src/TabsV1/consts.d.ts +7 -2
  11. package/lib/E2E/src/TabsV1/consts.d.ts.map +1 -1
  12. package/lib/E2E/src/TabsV1/consts.js +7 -2
  13. package/lib/E2E/src/TabsV1/consts.js.map +1 -1
  14. package/lib/E2E/src/common/BasePage.d.ts +67 -0
  15. package/lib/E2E/src/common/BasePage.d.ts.map +1 -0
  16. package/lib/E2E/src/common/BasePage.js +654 -0
  17. package/lib/E2E/src/common/BasePage.js.map +1 -0
  18. package/lib/E2E/src/common/consts.d.ts.map +1 -1
  19. package/lib/E2E/src/common/consts.js.map +1 -1
  20. package/lib/fluent-tester/src/TestComponents/Button/ButtonSizeTestSection.d.ts.map +1 -1
  21. package/lib/fluent-tester/src/TestComponents/Button/ButtonSizeTestSection.js +2 -1
  22. package/lib/fluent-tester/src/TestComponents/Button/ButtonSizeTestSection.js.map +1 -1
  23. package/lib/fluent-tester/src/TestComponents/Button/ButtonTest.d.ts.map +1 -1
  24. package/lib/fluent-tester/src/TestComponents/Button/ButtonTest.js +4 -2
  25. package/lib/fluent-tester/src/TestComponents/Button/ButtonTest.js.map +1 -1
  26. package/lib/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.android.d.ts +1 -2
  27. package/lib/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.android.d.ts.map +1 -1
  28. package/lib/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.android.js +1 -22
  29. package/lib/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.android.js.map +1 -1
  30. package/lib/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.ios.d.ts +2 -0
  31. package/lib/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.ios.d.ts.map +1 -0
  32. package/lib/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.ios.js +2 -0
  33. package/lib/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.ios.js.map +1 -0
  34. package/lib/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.mobile.d.ts +3 -0
  35. package/lib/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.mobile.d.ts.map +1 -0
  36. package/lib/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.mobile.js +23 -0
  37. package/lib/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.mobile.js.map +1 -0
  38. package/lib/fluent-tester/src/TestComponents/FocusZone/FocusZoneE2ETest.d.ts +1 -1
  39. package/lib/fluent-tester/src/TestComponents/FocusZone/FocusZoneE2ETest.d.ts.map +1 -1
  40. package/lib/fluent-tester/src/TestComponents/FocusZone/FocusZoneE2ETest.js +5 -5
  41. package/lib/fluent-tester/src/TestComponents/FocusZone/FocusZoneE2ETest.js.map +1 -1
  42. package/lib/fluent-tester/src/TestComponents/TabsV1/TabsV1E2ETest.d.ts.map +1 -1
  43. package/lib/fluent-tester/src/TestComponents/TabsV1/TabsV1E2ETest.js +7 -7
  44. package/lib/fluent-tester/src/TestComponents/TabsV1/TabsV1E2ETest.js.map +1 -1
  45. package/lib-commonjs/E2E/src/FocusZone/consts.d.ts +3 -2
  46. package/lib-commonjs/E2E/src/FocusZone/consts.d.ts.map +1 -1
  47. package/lib-commonjs/E2E/src/FocusZone/consts.js.map +1 -1
  48. package/lib-commonjs/E2E/src/FocusZone/pages/FocusZonePageObject.d.ts +28 -0
  49. package/lib-commonjs/E2E/src/FocusZone/pages/FocusZonePageObject.d.ts.map +1 -0
  50. package/lib-commonjs/E2E/src/FocusZone/pages/FocusZonePageObject.js +191 -0
  51. package/lib-commonjs/E2E/src/FocusZone/pages/FocusZonePageObject.js.map +1 -0
  52. package/lib-commonjs/E2E/src/TabsV1/consts.d.ts +7 -2
  53. package/lib-commonjs/E2E/src/TabsV1/consts.d.ts.map +1 -1
  54. package/lib-commonjs/E2E/src/TabsV1/consts.js +8 -3
  55. package/lib-commonjs/E2E/src/TabsV1/consts.js.map +1 -1
  56. package/lib-commonjs/E2E/src/common/BasePage.d.ts +67 -0
  57. package/lib-commonjs/E2E/src/common/BasePage.d.ts.map +1 -0
  58. package/lib-commonjs/E2E/src/common/BasePage.js +658 -0
  59. package/lib-commonjs/E2E/src/common/BasePage.js.map +1 -0
  60. package/lib-commonjs/E2E/src/common/consts.d.ts.map +1 -1
  61. package/lib-commonjs/E2E/src/common/consts.js.map +1 -1
  62. package/lib-commonjs/fluent-tester/src/TestComponents/Button/ButtonSizeTestSection.d.ts.map +1 -1
  63. package/lib-commonjs/fluent-tester/src/TestComponents/Button/ButtonSizeTestSection.js +2 -1
  64. package/lib-commonjs/fluent-tester/src/TestComponents/Button/ButtonSizeTestSection.js.map +1 -1
  65. package/lib-commonjs/fluent-tester/src/TestComponents/Button/ButtonTest.d.ts.map +1 -1
  66. package/lib-commonjs/fluent-tester/src/TestComponents/Button/ButtonTest.js +4 -2
  67. package/lib-commonjs/fluent-tester/src/TestComponents/Button/ButtonTest.js.map +1 -1
  68. package/lib-commonjs/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.android.d.ts +1 -2
  69. package/lib-commonjs/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.android.d.ts.map +1 -1
  70. package/lib-commonjs/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.android.js +2 -24
  71. package/lib-commonjs/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.android.js.map +1 -1
  72. package/lib-commonjs/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.ios.d.ts +2 -0
  73. package/lib-commonjs/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.ios.d.ts.map +1 -0
  74. package/lib-commonjs/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.ios.js +6 -0
  75. package/lib-commonjs/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.ios.js.map +1 -0
  76. package/lib-commonjs/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.mobile.d.ts +3 -0
  77. package/lib-commonjs/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.mobile.d.ts.map +1 -0
  78. package/lib-commonjs/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.mobile.js +28 -0
  79. package/lib-commonjs/fluent-tester/src/TestComponents/Button/ButtonVariantTestSection.mobile.js.map +1 -0
  80. package/lib-commonjs/fluent-tester/src/TestComponents/FocusZone/FocusZoneE2ETest.d.ts +1 -1
  81. package/lib-commonjs/fluent-tester/src/TestComponents/FocusZone/FocusZoneE2ETest.d.ts.map +1 -1
  82. package/lib-commonjs/fluent-tester/src/TestComponents/FocusZone/FocusZoneE2ETest.js +14 -14
  83. package/lib-commonjs/fluent-tester/src/TestComponents/FocusZone/FocusZoneE2ETest.js.map +1 -1
  84. package/lib-commonjs/fluent-tester/src/TestComponents/TabsV1/TabsV1E2ETest.d.ts.map +1 -1
  85. package/lib-commonjs/fluent-tester/src/TestComponents/TabsV1/TabsV1E2ETest.js +6 -6
  86. package/lib-commonjs/fluent-tester/src/TestComponents/TabsV1/TabsV1E2ETest.js.map +1 -1
  87. package/package.json +33 -33
  88. package/src/TestComponents/Button/ButtonSizeTestSection.tsx +3 -1
  89. package/src/TestComponents/Button/ButtonTest.tsx +4 -2
  90. package/src/TestComponents/Button/ButtonVariantTestSection.android.tsx +1 -45
  91. package/src/TestComponents/Button/ButtonVariantTestSection.ios.tsx +1 -0
  92. package/src/TestComponents/Button/ButtonVariantTestSection.mobile.tsx +45 -0
  93. package/src/TestComponents/FocusZone/FocusZoneE2ETest.tsx +15 -14
  94. package/src/TestComponents/TabsV1/TabsV1E2ETest.tsx +14 -9
  95. package/tsconfig.json +2 -1
@@ -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
+ };
@@ -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 { commonTestStyles } from '../Common/styles';
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
- FOCUSZONE_GRID_BEFORE,
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
- FOCUSZONE_DIRECTION_PICKER,
17
+ FOCUSZONE_TEST_COMPONENT,
18
+ FOCUSZONE_TWO_DIM_SWITCH,
20
19
  } from '../../../../E2E/src/FocusZone/consts';
21
- import { focusZoneTestStyles, GridButton } from './styles';
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>
@@ -8,8 +8,13 @@ import {
8
8
  TABSV1_ACCESSIBILITY_LABEL,
9
9
  TABSV1_NO_A11Y_LABEL_COMPONENT,
10
10
  TABSV1_TEST_COMPONENT_LABEL,
11
- TABSITEMV1_TEST_COMPONENT,
12
- TABSITEMV1_ACCESSIBILITY_LABEL,
11
+ TABSITEMV1_ITEM_1,
12
+ TABSITEMV1_ITEM_2,
13
+ TABSITEMV1_ITEM_3,
14
+ TABSITEMV1_CONTENT_1,
15
+ TABSITEMV1_CONTENT_2,
16
+ TABSITEMV1_CONTENT_3,
17
+ TABSITEMV1_ITEM_1_ACCESSIBILITY_LABEL,
13
18
  TABSITEMV1_NO_A11Y_LABEL_COMPONENT,
14
19
  TABSITEMV1_TEST_COMPONENT_LABEL,
15
20
  } from '../../../../E2E/src/TabsV1/consts';
@@ -28,17 +33,17 @@ export const TabsV1E2ETest: React.FunctionComponent = () => {
28
33
  <TabsItem
29
34
  headerText="Home"
30
35
  itemKey="A"
31
- accessibilityLabel={TABSITEMV1_ACCESSIBILITY_LABEL}
36
+ accessibilityLabel={TABSITEMV1_ITEM_1_ACCESSIBILITY_LABEL}
32
37
  /* For Android E2E testing purposes, testProps must be passed in after accessibilityLabel. */
33
- {...testProps(TABSITEMV1_TEST_COMPONENT)}
38
+ {...testProps(TABSITEMV1_ITEM_1)}
34
39
  >
35
- <Text>Tabs #1</Text>
40
+ <Text {...testProps(TABSITEMV1_CONTENT_1)}>Tabs #1</Text>
36
41
  </TabsItem>
37
- <TabsItem headerText="Files" itemKey="B">
38
- <Text>Tabs #2</Text>
42
+ <TabsItem headerText="Files" itemKey="B" {...testProps(TABSITEMV1_ITEM_2)}>
43
+ <Text {...testProps(TABSITEMV1_CONTENT_2)}>Tabs #2</Text>
39
44
  </TabsItem>
40
- <TabsItem headerText="Settings" itemKey="C">
41
- <Text>Tabs #3</Text>
45
+ <TabsItem headerText="Settings" itemKey="C" {...testProps(TABSITEMV1_ITEM_3)}>
46
+ <Text {...testProps(TABSITEMV1_CONTENT_3)}>Tabs #3</Text>
42
47
  </TabsItem>
43
48
  </Tabs>
44
49
  </View>
package/tsconfig.json CHANGED
@@ -7,7 +7,8 @@
7
7
  "paths": {
8
8
  "*": ["*", "*.win32", "./*"],
9
9
  "src/*": ["./src/*", "src"]
10
- }
10
+ },
11
+ "types": ["webdriverio/async", "@wdio/jasmine-framework", "node", "@types/jasmine"]
11
12
  },
12
13
  "include": ["src"]
13
14
  }