|
@@ -8,31 +8,37 @@ describe('screen style', () => {
|
8
|
8
|
await device.relaunchApp();
|
9
|
9
|
});
|
10
|
10
|
|
11
|
|
- it('declare a options on component component', async () => {
|
|
11
|
+ test('declare a options on component component', async () => {
|
12
|
12
|
await elementById(testIDs.PUSH_OPTIONS_BUTTON).tap();
|
13
|
13
|
await expect(elementByLabel('Static Title')).toBeVisible();
|
14
|
14
|
});
|
15
|
15
|
|
16
|
|
- it('change title on component component', async () => {
|
|
16
|
+ test('change title on component component', async () => {
|
17
|
17
|
await elementById(testIDs.PUSH_OPTIONS_BUTTON).tap();
|
18
|
18
|
await expect(elementByLabel('Static Title')).toBeVisible();
|
19
|
19
|
await elementById(testIDs.DYNAMIC_OPTIONS_BUTTON).tap();
|
20
|
20
|
await expect(elementByLabel('Dynamic Title')).toBeVisible();
|
21
|
21
|
});
|
22
|
22
|
|
23
|
|
- it('set dynamic options with valid options will do something and not crash', async () => {
|
24
|
|
- await elementById(testIDs.PUSH_OPTIONS_BUTTON).tap();
|
25
|
|
- await elementById(testIDs.DYNAMIC_OPTIONS_BUTTON).tap();
|
26
|
|
- await expect(elementById(testIDs.OPTIONS_SCREEN_HEADER)).toBeVisible();
|
27
|
|
- });
|
28
|
|
-
|
29
|
|
- it('hides Tab Bar when pressing on Hide Top Bar and shows it when pressing on Show Top Bar', async () => {
|
30
|
|
- await elementById(testIDs.PUSH_OPTIONS_BUTTON).tap();
|
31
|
|
- await elementById(testIDs.HIDE_TOP_BAR_BUTTON).tap();
|
32
|
|
- await expect(elementById(testIDs.TOP_BAR_ELEMENT)).toBeNotVisible();
|
33
|
|
- await elementById(testIDs.SHOW_TOP_BAR_BUTTON).tap();
|
34
|
|
- await expect(elementById(testIDs.TOP_BAR_ELEMENT)).toBeVisible();
|
35
|
|
- });
|
|
23
|
+ test(
|
|
24
|
+ 'set dynamic options with valid options will do something and not crash',
|
|
25
|
+ async () => {
|
|
26
|
+ await elementById(testIDs.PUSH_OPTIONS_BUTTON).tap();
|
|
27
|
+ await elementById(testIDs.DYNAMIC_OPTIONS_BUTTON).tap();
|
|
28
|
+ await expect(elementById(testIDs.OPTIONS_SCREEN_HEADER)).toBeVisible();
|
|
29
|
+ }
|
|
30
|
+ );
|
|
31
|
+
|
|
32
|
+ test(
|
|
33
|
+ 'hides Tab Bar when pressing on Hide Top Bar and shows it when pressing on Show Top Bar',
|
|
34
|
+ async () => {
|
|
35
|
+ await elementById(testIDs.PUSH_OPTIONS_BUTTON).tap();
|
|
36
|
+ await elementById(testIDs.HIDE_TOP_BAR_BUTTON).tap();
|
|
37
|
+ await expect(elementById(testIDs.TOP_BAR_ELEMENT)).toBeNotVisible();
|
|
38
|
+ await elementById(testIDs.SHOW_TOP_BAR_BUTTON).tap();
|
|
39
|
+ await expect(elementById(testIDs.TOP_BAR_ELEMENT)).toBeVisible();
|
|
40
|
+ }
|
|
41
|
+ );
|
36
|
42
|
|
37
|
43
|
xit('hides topBar onScroll down and shows it on scroll up', async () => {
|
38
|
44
|
await elementById(testIDs.PUSH_OPTIONS_BUTTON).tap();
|
|
@@ -45,20 +51,20 @@ describe('screen style', () => {
|
45
|
51
|
await expect(elementById(testIDs.TOP_BAR_ELEMENT)).toBeVisible();
|
46
|
52
|
});
|
47
|
53
|
|
48
|
|
- it('set Tab Bar badge on a current Tab', async () => {
|
|
54
|
+ test('set Tab Bar badge on a current Tab', async () => {
|
49
|
55
|
await elementById(testIDs.TAB_BASED_APP_BUTTON).tap();
|
50
|
56
|
await elementById(testIDs.SET_TAB_BADGE_BUTTON).tap();
|
51
|
57
|
await expect(element(by.text('TeSt'))).toBeVisible();
|
52
|
58
|
});
|
53
|
59
|
|
54
|
|
- it('hide Tab Bar', async () => {
|
|
60
|
+ test('hide Tab Bar', async () => {
|
55
|
61
|
await elementById(testIDs.TAB_BASED_APP_BUTTON).tap();
|
56
|
62
|
await expect(elementById(testIDs.BOTTOM_TABS_ELEMENT)).toBeVisible();
|
57
|
63
|
await elementById(testIDs.HIDE_BOTTOM_TABS_BUTTON).tap();
|
58
|
64
|
await expect(elementById(testIDs.BOTTOM_TABS_ELEMENT)).toBeNotVisible();
|
59
|
65
|
});
|
60
|
66
|
|
61
|
|
- it('show Tab Bar', async () => {
|
|
67
|
+ test('show Tab Bar', async () => {
|
62
|
68
|
await elementById(testIDs.TAB_BASED_APP_BUTTON).tap();
|
63
|
69
|
await elementById(testIDs.HIDE_BOTTOM_TABS_BUTTON).tap();
|
64
|
70
|
await expect(elementById(testIDs.BOTTOM_TABS_ELEMENT)).toBeNotVisible();
|
|
@@ -66,7 +72,7 @@ describe('screen style', () => {
|
66
|
72
|
await expect(elementById(testIDs.BOTTOM_TABS_ELEMENT)).toBeVisible();
|
67
|
73
|
});
|
68
|
74
|
|
69
|
|
- it('side menu visibility - left', async () => {
|
|
75
|
+ test('side menu visibility - left', async () => {
|
70
|
76
|
await elementById(testIDs.TAB_BASED_APP_SIDE_BUTTON).tap();
|
71
|
77
|
await elementById(testIDs.SHOW_LEFT_SIDE_MENU_BUTTON).tap();
|
72
|
78
|
await expect(elementById(testIDs.HIDE_LEFT_SIDE_MENU_BUTTON)).toBeVisible();
|
|
@@ -74,7 +80,7 @@ describe('screen style', () => {
|
74
|
80
|
await expect(elementById(testIDs.CENTERED_TEXT_HEADER)).toBeVisible();
|
75
|
81
|
});
|
76
|
82
|
|
77
|
|
- it('side menu visibility - right', async () => {
|
|
83
|
+ test('side menu visibility - right', async () => {
|
78
|
84
|
await elementById(testIDs.TAB_BASED_APP_SIDE_BUTTON).tap();
|
79
|
85
|
await elementById(testIDs.SHOW_RIGHT_SIDE_MENU_BUTTON).tap();
|
80
|
86
|
await expect(elementById(testIDs.HIDE_RIGHT_SIDE_MENU_BUTTON)).toBeVisible();
|
|
@@ -82,7 +88,7 @@ describe('screen style', () => {
|
82
|
88
|
await expect(elementById(testIDs.CENTERED_TEXT_HEADER)).toBeVisible();
|
83
|
89
|
});
|
84
|
90
|
|
85
|
|
- it('set right buttons', async () => {
|
|
91
|
+ test('set right buttons', async () => {
|
86
|
92
|
await elementById(testIDs.PUSH_OPTIONS_BUTTON).tap();
|
87
|
93
|
await expect(elementById('buttonOne')).toBeVisible();
|
88
|
94
|
await elementById('buttonOne').tap();
|
|
@@ -91,18 +97,18 @@ describe('screen style', () => {
|
91
|
97
|
await expect(elementById('buttonOne')).toBeVisible();
|
92
|
98
|
});
|
93
|
99
|
|
94
|
|
- it('set left buttons', async () => {
|
|
100
|
+ test('set left buttons', async () => {
|
95
|
101
|
await elementById(testIDs.PUSH_OPTIONS_BUTTON).tap();
|
96
|
102
|
await expect(elementById('buttonLeft')).toBeVisible();
|
97
|
103
|
});
|
98
|
104
|
|
99
|
|
- it('tab bar items visibility', async () => {
|
|
105
|
+ test('tab bar items visibility', async () => {
|
100
|
106
|
await elementById(testIDs.TAB_BASED_APP_BUTTON).tap();
|
101
|
107
|
await expect(elementById(testIDs.FIRST_TAB_BAR_BUTTON)).toBeVisible();
|
102
|
108
|
await expect(elementById(testIDs.SECOND_TAB_BAR_BUTTON)).toBeVisible();
|
103
|
109
|
});
|
104
|
110
|
|
105
|
|
- it('default options should apply to all screens in stack', async () => {
|
|
111
|
+ test('default options should apply to all screens in stack', async () => {
|
106
|
112
|
await elementById(testIDs.PUSH_OPTIONS_BUTTON).tap();
|
107
|
113
|
await elementById(testIDs.PUSH_DEFAULT_OPTIONS_BUTTON).tap();
|
108
|
114
|
await expect(elementById(testIDs.TOP_BAR_ELEMENT)).toBeNotVisible();
|
|
@@ -110,7 +116,7 @@ describe('screen style', () => {
|
110
|
116
|
await expect(elementById(testIDs.TOP_BAR_ELEMENT)).toBeNotVisible();
|
111
|
117
|
});
|
112
|
118
|
|
113
|
|
- it('default options should not override static options', async () => {
|
|
119
|
+ test('default options should not override static options', async () => {
|
114
|
120
|
await elementById(testIDs.PUSH_OPTIONS_BUTTON).tap();
|
115
|
121
|
await elementById(testIDs.PUSH_DEFAULT_OPTIONS_BUTTON).tap();
|
116
|
122
|
await expect(elementById(testIDs.TOP_BAR_ELEMENT)).toBeNotVisible();
|
|
@@ -118,23 +124,23 @@ describe('screen style', () => {
|
118
|
124
|
await expect(elementById(testIDs.TOP_BAR_ELEMENT)).toBeVisible();
|
119
|
125
|
});
|
120
|
126
|
|
121
|
|
- it('supports user-provided id', async () => {
|
|
127
|
+ test('supports user-provided id', async () => {
|
122
|
128
|
await elementById(testIDs.PROVIDED_ID).tap();
|
123
|
129
|
await expect(elementByLabel('User provided id')).toBeVisible();
|
124
|
130
|
});
|
125
|
131
|
|
126
|
|
- it('stack options should not override component options', async () => {
|
|
132
|
+ test('stack options should not override component options', async () => {
|
127
|
133
|
await elementById(testIDs.TAB_BASED_APP_BUTTON).tap();
|
128
|
134
|
await expect(elementById(testIDs.TOP_BAR_ELEMENT)).toBeVisible();
|
129
|
135
|
});
|
130
|
136
|
|
131
|
|
- it('set title component', async () => {
|
|
137
|
+ test('set title component', async () => {
|
132
|
138
|
await elementById(testIDs.PUSH_OPTIONS_BUTTON).tap();
|
133
|
139
|
await elementById(testIDs.SHOW_TOPBAR_REACT_VIEW).tap();
|
134
|
140
|
await expect(elementByLabel('Press Me')).toBeVisible();
|
135
|
141
|
});
|
136
|
142
|
|
137
|
|
- it(':ios: set searchBar and handle onSearchUpdated event', async () => {
|
|
143
|
+ test(':ios: set searchBar and handle onSearchUpdated event', async () => {
|
138
|
144
|
await elementById(testIDs.SHOW_TOPBAR_SEARCHBAR).tap();
|
139
|
145
|
await expect(elementByLabel('Start Typing')).toBeVisible();
|
140
|
146
|
await elementByLabel('Start Typing').tap();
|