1- import  { browser ,  by ,  element }  from  'protractor' ; 
1+ import  { browser ,  by ,  element ,  ExpectedConditions }  from  'protractor' ; 
2+ import  { screenshot }  from  '../../screenshot' ; 
23
34describe ( 'radio' ,  ( )  =>  { 
45  describe ( 'disabling behavior' ,  ( )  =>  { 
@@ -8,6 +9,9 @@ describe('radio', () => {
89      element ( by . id ( 'water' ) ) . click ( ) ; 
910      element ( by . id ( 'water' ) ) . getAttribute ( 'class' ) . then ( ( value : string )  =>  { 
1011        expect ( value ) . toContain ( 'mat-radio-checked' ) ; 
12+         browser . wait ( ExpectedConditions . not ( 
13+           ExpectedConditions . presenceOf ( element ( by . css ( 'div.mat-ripple-element' ) ) ) ) ) 
14+           . then ( ( )  =>  screenshot ( 'water' ) ) ; 
1115      } ) ; 
1216      element ( by . css ( 'input[id=water-input]' ) ) . getAttribute ( 'checked' ) . then ( ( value : string )  =>  { 
1317        expect ( value ) . toBeTruthy ( ) ; 
@@ -19,6 +23,9 @@ describe('radio', () => {
1923      element ( by . id ( 'leaf' ) ) . click ( ) ; 
2024      element ( by . id ( 'leaf' ) ) . getAttribute ( 'class' ) . then ( ( value : string )  =>  { 
2125        expect ( value ) . toContain ( 'mat-radio-checked' ) ; 
26+         browser . wait ( ExpectedConditions . not ( 
27+           ExpectedConditions . presenceOf ( element ( by . css ( 'div.mat-ripple-element' ) ) ) ) ) 
28+           . then ( ( )  =>  screenshot ( 'leaf' ) ) ; 
2229      } ) ; 
2330      element ( by . css ( 'input[id=leaf-input]' ) ) . getAttribute ( 'checked' ) . then ( ( value : string )  =>  { 
2431        expect ( value ) . toBeTruthy ( ) ; 
@@ -33,14 +40,19 @@ describe('radio', () => {
3340      element ( by . id ( 'water' ) ) . click ( ) ; 
3441      element ( by . id ( 'water' ) ) . getAttribute ( 'class' ) . then ( ( value : string )  =>  { 
3542        expect ( value ) . toContain ( 'mat-radio-disabled' ) ; 
43+         browser . wait ( ExpectedConditions . presenceOf ( element ( by . css ( '.mat-radio-disabled' ) ) ) ) 
44+           . then ( ( )  =>  screenshot ( 'water' ) ) ; 
3645      } ) ; 
37-          element ( by . css ( 'input[id=water-input]' ) ) . getAttribute ( 'disabled' ) . then ( ( value : string )  =>  { 
46+       element ( by . css ( 'input[id=water-input]' ) ) . getAttribute ( 'disabled' ) . then ( ( value : string )  =>  { 
3847        expect ( value ) . toBeTruthy ( ) ; 
3948      } ) ; 
4049
4150      element ( by . id ( 'leaf' ) ) . click ( ) ; 
4251      element ( by . id ( 'leaf' ) ) . getAttribute ( 'class' ) . then ( ( value : string )  =>  { 
4352        expect ( value ) . toContain ( 'mat-radio-disabled' ) ; 
53+         browser . wait ( ExpectedConditions . not ( 
54+           ExpectedConditions . presenceOf ( element ( by . css ( 'div.mat-ripple-element' ) ) ) ) ) 
55+           . then ( ( )  =>  screenshot ( 'leaf' ) ) ; 
4456      } ) ; 
4557      element ( by . css ( 'input[id=leaf-input]' ) ) . getAttribute ( 'disabled' ) . then ( ( value : string )  =>  { 
4658        expect ( value ) . toBeTruthy ( ) ; 
0 commit comments