@@ -5,15 +5,15 @@ module.exports = {
55 'Verify error messages on empty giftaid submission' : function ( client ) {
66 client . url ( process . env . BASE_URL ) . maximizeWindow ( ) . waitForElementVisible ( 'body' , 1000 ) ;
77 client . click ( 'button[type=submit]' ) ;
8- client . assert . containsText ( '#field-error--giftaid>span' , 'To Gift Aid your donation you need to tick the checkbox' ) ;
9- client . assert . containsText ( '#field-error--mobile>span' , 'Please fill in your mobile number' ) ;
10- client . assert . containsText ( '#field-error--firstname>span' , 'Please fill in your first name' ) ;
11- client . assert . containsText ( '#field-error--lastname>span' , 'Please fill in your last name' ) ;
12- client . assert . containsText ( '#field-error--postcode>span' , 'Please enter your postcode' ) ;
13- client . assert . containsText ( '#field-error--addressDetails>span' , 'Please fill in your address' ) ;
8+ client . assert . textContains ( '#field-error--giftaid>span' , 'To Gift Aid your donation you need to tick the checkbox' ) ;
9+ client . assert . textContains ( '#field-error--mobile>span' , 'Please fill in your mobile number' ) ;
10+ client . assert . textContains ( '#field-error--firstname>span' , 'Please fill in your first name' ) ;
11+ client . assert . textContains ( '#field-error--lastname>span' , 'Please fill in your last name' ) ;
12+ client . assert . textContains ( '#field-error--postcode>span' , 'Please enter your postcode' ) ;
13+ client . assert . textContains ( '#field-error--addressDetails>span' , 'Please fill in your address' ) ;
1414 client . click ( 'a[aria-describedby=field-error--addressDetails]' ) ;
15- client . assert . containsText ( '#field-error--address1>span' , 'Please fill in your address line 1' ) ;
16- client . assert . containsText ( '#field-error--town>span' , 'Please fill in your town/city' ) ;
15+ client . assert . textContains ( '#field-error--address1>span' , 'Please fill in your address line 1' ) ;
16+ client . assert . textContains ( '#field-error--town>span' , 'Please fill in your town/city' ) ;
1717 client . end ( ) ;
1818 } ,
1919
@@ -47,7 +47,7 @@ module.exports = {
4747 client . click ( 'button[type=submit]' ) ;
4848 client . pause ( 2000 ) ;
4949 client . expect . element ( 'div > h1' ) . text . to . not . equal ( 'Sorry!' ) ;
50- client . assert . containsText ( '#field-error--mobile>span' , 'Please fill in your mobile number' ) ;
50+ client . assert . textContains ( '#field-error--mobile>span' , 'Please fill in your mobile number' ) ;
5151 client . end ( ) ;
5252 } ,
5353
@@ -64,7 +64,7 @@ module.exports = {
6464 client . click ( 'button[type=submit]' ) ;
6565 client . pause ( 2000 ) ;
6666 client . expect . element ( 'div > h1' ) . text . to . not . equal ( 'Sorry!' ) ;
67- client . assert . containsText ( '#field-error--firstname' , 'Please fill in your first name' ) ;
67+ client . assert . textContains ( '#field-error--firstname' , 'Please fill in your first name' ) ;
6868 client . end ( ) ;
6969 } ,
7070
@@ -81,7 +81,7 @@ module.exports = {
8181 client . click ( 'button[type=submit]' ) ;
8282 client . pause ( 2000 ) ;
8383 client . expect . element ( 'div > h1' ) . text . to . not . equal ( 'Sorry!' ) ;
84- client . assert . containsText ( '#field-error--lastname' , 'Please fill in your last name' ) ;
84+ client . assert . textContains ( '#field-error--lastname' , 'Please fill in your last name' ) ;
8585 client . end ( ) ;
8686 } ,
8787
@@ -95,7 +95,7 @@ module.exports = {
9595 client . click ( 'button[type=submit]' ) ;
9696 client . pause ( 2000 ) ;
9797 client . expect . element ( 'div > h1' ) . text . to . not . equal ( 'Sorry!' ) ;
98- client . assert . containsText ( '#field-error--postcode' , 'Please enter your postcode' ) ;
98+ client . assert . textContains ( '#field-error--postcode' , 'Please enter your postcode' ) ;
9999 client . end ( ) ;
100100 } ,
101101
@@ -113,7 +113,7 @@ module.exports = {
113113 client . click ( 'button[type=submit]' ) ;
114114 client . pause ( 2000 ) ;
115115 client . expect . element ( 'div > h1' ) . text . to . not . equal ( 'Sorry!' ) ;
116- client . assert . containsText ( '#field-error--town' , 'Please fill in your town/city' ) ;
116+ client . assert . textContains ( '#field-error--town' , 'Please fill in your town/city' ) ;
117117 client . end ( ) ;
118118 } ,
119119} ;
0 commit comments