File tree Expand file tree Collapse file tree 3 files changed +25
-11
lines changed
src/components/modal/test/basic Expand file tree Collapse file tree 3 files changed +25
-11
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,22 @@ export class E2EPage {
77
77
}
78
78
79
79
presentModalChildNav ( ) {
80
+ this . modalCtrl . create ( ContactUs ) . present ( ) ;
81
+ }
82
+
83
+ presentToolbarModal ( ) {
84
+ this . modalCtrl . create ( ToolbarModal ) . present ( ) ;
85
+ }
86
+
87
+ presentModalWithInputs ( ) {
88
+ let modal = this . modalCtrl . create ( ModalWithInputs ) ;
89
+ modal . onDidDismiss ( ( data : any ) => {
90
+ console . log ( 'Modal with inputs data:' , data ) ;
91
+ } ) ;
92
+ modal . present ( ) ;
93
+ }
94
+
95
+ presentNavModalWithToast ( ) {
80
96
this . toastCtrl . create ( {
81
97
message : 'Will present a modal with child nav...' ,
82
98
duration : 1000 ,
@@ -87,7 +103,7 @@ export class E2EPage {
87
103
} , 500 ) ;
88
104
}
89
105
90
- presentToolbarModal ( ) {
106
+ presentToolbarModalWithToast ( ) {
91
107
this . toastCtrl . create ( {
92
108
message : 'Will present a modal with toolbars...' ,
93
109
duration : 1000 ,
@@ -98,14 +114,6 @@ export class E2EPage {
98
114
} , 500 ) ;
99
115
}
100
116
101
- presentModalWithInputs ( ) {
102
- let modal = this . modalCtrl . create ( ModalWithInputs ) ;
103
- modal . onDidDismiss ( ( data : any ) => {
104
- console . log ( 'Modal with inputs data:' , data ) ;
105
- } ) ;
106
- modal . present ( ) ;
107
- }
108
-
109
117
ionViewDidLoad ( ) {
110
118
console . log ( 'E2EPage ionViewDidLoad fired' ) ;
111
119
}
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ it('should open modal', function() {
4
4
} ) ;
5
5
6
6
it ( 'should close alert with button click' , function ( ) {
7
- element ( by . css ( '.alert-button:last-child ' ) ) . click ( ) ;
7
+ element ( by . css ( '.alert-button' ) ) . click ( ) ;
8
8
} ) ;
9
9
10
10
it ( 'should close with close button click' , function ( ) {
@@ -16,7 +16,7 @@ it('should open toolbar modal', function() {
16
16
} ) ;
17
17
18
18
it ( 'should close alert with button click' , function ( ) {
19
- element ( by . css ( '.alert-button:last-child ' ) ) . click ( ) ;
19
+ element ( by . css ( '.alert-button' ) ) . click ( ) ;
20
20
} ) ;
21
21
22
22
it ( 'should close toolbar modal' , function ( ) {
Original file line number Diff line number Diff line change 21
21
< p >
22
22
< button ion-button (click) ="presentModalWithInputs() "> Present modal w/ inputs</ button >
23
23
</ p >
24
+ < p >
25
+ < button ion-button (click) ="presentNavModalWithToast() "> Present toast then child ion-nav modal</ button >
26
+ </ p >
27
+ < p >
28
+ < button ion-button (click) ="presentToolbarModalWithToast() "> Present toast then toolbar modal</ button >
29
+ </ p >
24
30
< p >
25
31
{{platforms | json}}
26
32
</ p >
You can’t perform that action at this time.
0 commit comments