@@ -5,28 +5,68 @@ test('select: basic', async () => {
5
5
url : '/src/components/select/test/basic?ionic:_testing=true'
6
6
} ) ;
7
7
8
- let compare = await page . compareScreenshot ( ) ;
9
- expect ( compare ) . toMatchScreenshot ( ) ;
8
+ const compares = [ ] ;
9
+ compares . push ( await page . compareScreenshot ( ) ) ;
10
10
11
+ // Gender Alert Select
11
12
let select = await page . find ( '#gender' ) ;
12
13
await select . click ( ) ;
13
14
14
- const alert = await page . find ( 'ion-alert' ) ;
15
+ let alert = await page . find ( 'ion-alert' ) ;
15
16
await alert . waitForVisible ( ) ;
16
17
await page . waitFor ( 250 ) ;
17
18
18
- compare = await page . compareScreenshot ( 'should open gender single select' ) ;
19
- expect ( compare ) . toMatchScreenshot ( ) ;
19
+ compares . push ( await page . compareScreenshot ( 'should open gender single select' ) ) ;
20
20
21
21
await alert . callMethod ( 'dismiss' ) ;
22
22
23
- select = await page . find ( '#customSelect' ) ;
23
+ // Skittles Action Sheet Select
24
+ select = await page . find ( '#skittles' ) ;
24
25
await select . click ( ) ;
25
26
26
- const actionSheet = await page . find ( 'ion-action-sheet' ) ;
27
+ let actionSheet = await page . find ( 'ion-action-sheet' ) ;
27
28
await actionSheet . waitForVisible ( ) ;
28
29
await page . waitFor ( 250 ) ;
29
30
30
- compare = await page . compareScreenshot ( 'should open custom action sheet select' ) ;
31
- expect ( compare ) . toMatchScreenshot ( ) ;
31
+ compares . push ( await page . compareScreenshot ( 'should open skittles action sheet select' ) ) ;
32
+
33
+ await actionSheet . callMethod ( 'dismiss' ) ;
34
+
35
+ // Custom Alert Select
36
+ select = await page . find ( '#customAlertSelect' ) ;
37
+ await select . click ( ) ;
38
+
39
+ alert = await page . find ( 'ion-alert' ) ;
40
+ await alert . waitForVisible ( ) ;
41
+ await page . waitFor ( 250 ) ;
42
+
43
+ compares . push ( await page . compareScreenshot ( 'should open custom alert select' ) ) ;
44
+
45
+ await alert . callMethod ( 'dismiss' ) ;
46
+
47
+ // Custom Popover Select
48
+ select = await page . find ( '#customPopoverSelect' ) ;
49
+ await select . click ( ) ;
50
+
51
+ const popover = await page . find ( 'ion-popover' ) ;
52
+ await popover . waitForVisible ( ) ;
53
+ await page . waitFor ( 250 ) ;
54
+
55
+ compares . push ( await page . compareScreenshot ( 'should open custom popover select' ) ) ;
56
+
57
+ // Custom Action Sheet Select
58
+ select = await page . find ( '#customActionSheetSelect' ) ;
59
+ await select . click ( ) ;
60
+
61
+ actionSheet = await page . find ( 'ion-action-sheet' ) ;
62
+ await actionSheet . waitForVisible ( ) ;
63
+ await page . waitFor ( 250 ) ;
64
+
65
+ compares . push ( await page . compareScreenshot ( 'should open custom action sheet select' ) ) ;
66
+
67
+ await actionSheet . callMethod ( 'dismiss' ) ;
68
+
69
+ for ( const compare of compares ) {
70
+ expect ( compare ) . toMatchScreenshot ( ) ;
71
+ }
32
72
} ) ;
0 commit comments