@@ -12,7 +12,7 @@ describe('MDC-based dialog', () => {
12
12
13
13
it ( 'should open a dialog' , async ( ) => {
14
14
await element ( by . id ( 'default' ) ) . click ( ) ;
15
- await expectToExist ( 'mat-mdc- dialog-container' ) ;
15
+ await expectToExist ( 'mat-dialog-container' ) ;
16
16
} ) ;
17
17
18
18
it ( 'should open a template dialog' , async ( ) => {
@@ -26,39 +26,39 @@ describe('MDC-based dialog', () => {
26
26
27
27
await waitForDialog ( ) ;
28
28
await clickOnBackdrop ( ) ;
29
- await expectToExist ( 'mat-mdc- dialog-container' , false ) ;
29
+ await expectToExist ( 'mat-dialog-container' , false ) ;
30
30
} ) ;
31
31
32
32
it ( 'should close by pressing escape' , async ( ) => {
33
33
await element ( by . id ( 'default' ) ) . click ( ) ;
34
34
35
35
await waitForDialog ( ) ;
36
36
await pressKeys ( Key . ESCAPE ) ;
37
- await expectToExist ( 'mat-mdc- dialog-container' , false ) ;
37
+ await expectToExist ( 'mat-dialog-container' , false ) ;
38
38
} ) ;
39
39
40
40
it ( 'should close by pressing escape when the first tabbable element has lost focus' , async ( ) => {
41
41
await element ( by . id ( 'default' ) ) . click ( ) ;
42
42
43
43
await waitForDialog ( ) ;
44
- await clickElementAtPoint ( 'mat-mdc- dialog-container' , { x : 0 , y : 0 } ) ;
44
+ await clickElementAtPoint ( 'mat-dialog-container' , { x : 0 , y : 0 } ) ;
45
45
await pressKeys ( Key . ESCAPE ) ;
46
- await expectToExist ( 'mat-mdc- dialog-container' , false ) ;
46
+ await expectToExist ( 'mat-dialog-container' , false ) ;
47
47
} ) ;
48
48
49
49
it ( 'should close by clicking on the "close" button' , async ( ) => {
50
50
await element ( by . id ( 'default' ) ) . click ( ) ;
51
51
52
52
await waitForDialog ( ) ;
53
53
await element ( by . id ( 'close' ) ) . click ( ) ;
54
- await expectToExist ( 'mat-mdc- dialog-container' , false ) ;
54
+ await expectToExist ( 'mat-dialog-container' , false ) ;
55
55
} ) ;
56
56
57
57
it ( 'should focus the first focusable element' , async ( ) => {
58
58
await element ( by . id ( 'default' ) ) . click ( ) ;
59
59
60
60
await waitForDialog ( ) ;
61
- await expectFocusOn ( 'mat-mdc- dialog-container input' ) ;
61
+ await expectFocusOn ( 'mat-dialog-container input' ) ;
62
62
} ) ;
63
63
64
64
it ( 'should restore focus to the element that opened the dialog' , async ( ) => {
@@ -84,19 +84,19 @@ describe('MDC-based dialog', () => {
84
84
85
85
await waitForDialog ( ) ;
86
86
await clickOnBackdrop ( ) ;
87
- await expectToExist ( 'mat-mdc- dialog-container' ) ;
87
+ await expectToExist ( 'mat-dialog-container' ) ;
88
88
} ) ;
89
89
90
90
it ( 'should be able to prevent closing by pressing escape' , async ( ) => {
91
91
await element ( by . id ( 'disabled' ) ) . click ( ) ;
92
92
93
93
await waitForDialog ( ) ;
94
94
await pressKeys ( Key . ESCAPE ) ;
95
- await expectToExist ( 'mat-mdc- dialog-container' ) ;
95
+ await expectToExist ( 'mat-dialog-container' ) ;
96
96
} ) ;
97
97
98
98
async function waitForDialog ( ) {
99
- await waitForElement ( 'mat-mdc- dialog-container' ) ;
99
+ await waitForElement ( 'mat-dialog-container' ) ;
100
100
}
101
101
102
102
async function clickOnBackdrop ( ) {
0 commit comments