@@ -24,6 +24,25 @@ describe("Toast general interaction", () => {
24
24
"Toast's content div should be displayed in the viewport after its opening." )
25
25
} ) ;
26
26
27
+ it ( "tests domRendered property" , ( ) => {
28
+ const button = browser . $ ( "#wcBtnShowToastBS" ) ;
29
+ const toast = browser . $ ( "#wcToastBS" ) ;
30
+ const toastShadowContent = toast . shadow$ ( ".ui5-toast-root" ) ;
31
+
32
+ assert . notOk ( toastShadowContent . isDisplayedInViewport ( ) ,
33
+ "Toast's content div should be displayed in the viewport after its opening." ) ;
34
+ assert . notOk ( toast . getProperty ( "domRendered" ) ,
35
+ "domRendered property value should be false before Toast is shown" ) ;
36
+
37
+ button . click ( ) ;
38
+
39
+ assert . strictEqual ( toast . getProperty ( "domRendered" ) , true ,
40
+ "domRendered property value should be true when Toast is shown" ) ;
41
+
42
+ assert . ok ( toastShadowContent . isDisplayedInViewport ( ) ,
43
+ "Toast's content div should be displayed in the viewport after its opening." )
44
+ } ) ;
45
+
27
46
it ( "tests duration property" , ( ) => {
28
47
const button = browser . $ ( "#wcBtnShowToastTC" ) ;
29
48
const toast = browser . $ ( "#wcToastTC" ) ;
@@ -45,8 +64,11 @@ describe("Toast general interaction", () => {
45
64
} ) ;
46
65
47
66
it ( "tests shadow content div role" , ( ) => {
67
+ const button = browser . $ ( "#wcBtnShowToastBE" ) ;
48
68
const toastShadowContent = browser . $ ( "#wcToastBE" ) . shadow$ ( ".ui5-toast-root" ) ;
49
69
70
+ button . click ( ) ;
71
+
50
72
assert . strictEqual ( toastShadowContent . getAttribute ( "role" ) , "alert" ,
51
73
"The role of the shadow ui5-toast-root div should be alert" ) ;
52
74
} ) ;
@@ -111,6 +133,8 @@ describe("Toast general interaction", () => {
111
133
112
134
assert . notOk ( toast . getProperty ( "open" ) ,
113
135
"Open property should be false after Toast is closed" ) ;
136
+ assert . notOk ( toast . getProperty ( "domRendered" ) ,
137
+ "domRendered property value should be false after Toast is closed" ) ;
114
138
} ) ;
115
139
116
140
it ( "tests minimum allowed duration" , ( ) => {
0 commit comments