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,20 @@ 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 . not (
44+ ExpectedConditions . presenceOf ( element ( by . css ( 'div.mat-ripple-element' ) ) ) ) )
45+ . then ( ( ) => screenshot ( 'water' ) ) ;
3646 } ) ;
37- element ( by . css ( 'input[id=water-input]' ) ) . getAttribute ( 'disabled' ) . then ( ( value : string ) => {
47+ element ( by . css ( 'input[id=water-input]' ) ) . getAttribute ( 'disabled' ) . then ( ( value : string ) => {
3848 expect ( value ) . toBeTruthy ( ) ;
3949 } ) ;
4050
4151 element ( by . id ( 'leaf' ) ) . click ( ) ;
4252 element ( by . id ( 'leaf' ) ) . getAttribute ( 'class' ) . then ( ( value : string ) => {
4353 expect ( value ) . toContain ( 'mat-radio-disabled' ) ;
54+ browser . wait ( ExpectedConditions . not (
55+ ExpectedConditions . presenceOf ( element ( by . css ( 'div.mat-ripple-element' ) ) ) ) )
56+ . then ( ( ) => screenshot ( 'leaf' ) ) ;
4457 } ) ;
4558 element ( by . css ( 'input[id=leaf-input]' ) ) . getAttribute ( 'disabled' ) . then ( ( value : string ) => {
4659 expect ( value ) . toBeTruthy ( ) ;
0 commit comments