|
@@ -10,14 +10,14 @@ describe('screen style', () => {
|
10
|
10
|
|
11
|
11
|
it('declare a navigationOptions on container component', async () => {
|
12
|
12
|
await elementById(testIDs.PUSH_OPTIONS_BUTTON).tap();
|
13
|
|
- await expect(element(by.label('Static Title').and(by.type('UILabel')))).toBeVisible();
|
|
13
|
+ await expect(element(by.label('Static Title'))).toBeVisible();
|
14
|
14
|
});
|
15
|
15
|
|
16
|
16
|
it('change title on container component', async () => {
|
17
|
17
|
await elementById(testIDs.PUSH_OPTIONS_BUTTON).tap();
|
18
|
|
- await expect(element(by.label('Static Title').and(by.type('UILabel')))).toBeVisible();
|
|
18
|
+ await expect(element(by.label('Static Title'))).toBeVisible();
|
19
|
19
|
await elementById(testIDs.DYNAMIC_OPTIONS_BUTTON).tap();
|
20
|
|
- await expect(element(by.label('Dynamic Title').and(by.type('UILabel')))).toBeVisible();
|
|
20
|
+ await expect(element(by.label('Dynamic Title'))).toBeVisible();
|
21
|
21
|
});
|
22
|
22
|
|
23
|
23
|
it('set dynamic options with valid options will do something and not crash', async () => {
|
|
@@ -30,20 +30,20 @@ describe('screen style', () => {
|
30
|
30
|
it('hides Tab Bar when pressing on Hide Top Bar and shows it when pressing on Show Top Bar', async () => {
|
31
|
31
|
await elementById(testIDs.PUSH_OPTIONS_BUTTON).tap();
|
32
|
32
|
await elementById(testIDs.HIDE_TOP_BAR_BUTTON).tap();
|
33
|
|
- await expect(element(by.type('UINavigationBar'))).toBeNotVisible();
|
|
33
|
+ await expect(elementById(testIDs.TOP_BAR_ELEMENT)).toBeNotVisible();
|
34
|
34
|
await elementById(testIDs.SHOW_TOP_BAR_BUTTON).tap();
|
35
|
|
- await expect(element(by.type('UINavigationBar'))).toBeVisible();
|
|
35
|
+ await expect(elementById(testIDs.TOP_BAR_ELEMENT)).toBeVisible();
|
36
|
36
|
});
|
37
|
37
|
|
38
|
38
|
it('hides topBar onScroll down and shows it on scroll up', async () => {
|
39
|
39
|
await elementById(testIDs.PUSH_OPTIONS_BUTTON).tap();
|
40
|
40
|
await elementById(testIDs.SCROLLVIEW_SCREEN_BUTTON).tap();
|
41
|
41
|
await elementById(testIDs.TOGGLE_TOP_BAR_HIDE_ON_SCROLL).tap();
|
42
|
|
- await expect(element(by.type('UINavigationBar'))).toBeVisible();
|
|
42
|
+ await expect(elementById(testIDs.TOP_BAR_ELEMENT)).toBeVisible();
|
43
|
43
|
await element(by.id(testIDs.SCROLLVIEW_ELEMENT)).swipe('up', 'fast');
|
44
|
|
- await expect(element(by.type('UINavigationBar'))).toBeNotVisible();
|
|
44
|
+ await expect(elementById(testIDs.TOP_BAR_ELEMENT)).toBeNotVisible();
|
45
|
45
|
await element(by.id(testIDs.SCROLLVIEW_ELEMENT)).swipe('down', 'fast');
|
46
|
|
- await expect(element(by.type('UINavigationBar'))).toBeVisible();
|
|
46
|
+ await expect(elementById(testIDs.TOP_BAR_ELEMENT)).toBeVisible();
|
47
|
47
|
});
|
48
|
48
|
|
49
|
49
|
it('makes topBar transparent and opaque', async () => {
|
|
@@ -61,18 +61,18 @@ describe('screen style', () => {
|
61
|
61
|
});
|
62
|
62
|
|
63
|
63
|
it('hide Tab Bar', async () => {
|
64
|
|
- await elementByLabel('Switch to tab based app').tap();
|
65
|
|
- await expect(element(by.type('UITabBar'))).toBeVisible();
|
66
|
|
- await elementByLabel('Hide Tab Bar').tap();
|
67
|
|
- await expect(element(by.type('UITabBar'))).toBeNotVisible();
|
|
64
|
+ await elementById(testIDs.TAB_BASED_APP_BUTTON).tap();
|
|
65
|
+ await expect(elementById(testIDs.BOTTOM_TABS_ELEMENT)).toBeVisible();
|
|
66
|
+ await elementById(testIDs.HIDE_BOTTOM_TABS_BUTTON).tap();
|
|
67
|
+ await expect(elementById(testIDs.BOTTOM_TABS_ELEMENT)).toBeNotVisible();
|
68
|
68
|
});
|
69
|
69
|
|
70
|
70
|
it('show Tab Bar', async () => {
|
71
|
|
- await elementByLabel('Switch to tab based app').tap();
|
72
|
|
- await elementByLabel('Hide Tab Bar').tap();
|
73
|
|
- await expect(element(by.type('UITabBar'))).toBeNotVisible();
|
74
|
|
- await elementByLabel('Show Tab Bar').tap();
|
75
|
|
- await expect(element(by.type('UITabBar'))).toBeVisible();
|
|
71
|
+ await elementById(testIDs.TAB_BASED_APP_BUTTON).tap();
|
|
72
|
+ await elementById(testIDs.HIDE_BOTTOM_TABS_BUTTON).tap();
|
|
73
|
+ await expect(elementById(testIDs.BOTTOM_TABS_ELEMENT)).toBeNotVisible();
|
|
74
|
+ await elementById(testIDs.SHOW_BOTTOM_TABS_BUTTON).tap();
|
|
75
|
+ await expect(elementById(testIDs.BOTTOM_TABS_ELEMENT)).toBeVisible();
|
76
|
76
|
});
|
77
|
77
|
|
78
|
78
|
it('side menu visibility - left', async () => {
|