@@ -8,12 +8,13 @@ describe('Checks customer account create', () => {
88 } ) ;
99
1010 it ( 'Submits empty form' , ( ) => {
11+ const error = 'This is a required field.' ;
1112 cy . get ( '#form-validate button[type="submit"]' ) . click ( ) ;
12- cy . get ( '#advice-required-entry-firstname' ) . should ( 'include.text' , 'This is a required field.' ) ;
13- cy . get ( '#advice-required-entry-lastname' ) . should ( 'include.text' , 'This is a required field.' ) ;
14- cy . get ( '#advice-required-entry-email_address' ) . should ( 'include.text' , 'This is a required field.' ) ;
15- cy . get ( '#advice-required-entry-password' ) . should ( 'include.text' , 'This is a required field.' ) ;
16- cy . get ( '#advice-required-entry-confirmation' ) . should ( 'include.text' , 'This is a required field.' ) ;
13+ cy . get ( '#advice-required-entry-firstname' ) . should ( 'include.text' , error ) ;
14+ cy . get ( '#advice-required-entry-lastname' ) . should ( 'include.text' , error ) ;
15+ cy . get ( '#advice-required-entry-email_address' ) . should ( 'include.text' , error ) ;
16+ cy . get ( '#advice-required-entry-password' ) . should ( 'include.text' , error ) ;
17+ cy . get ( '#advice-required-entry-confirmation' ) . should ( 'include.text' , error ) ;
1718 } ) ;
1819
1920 it ( 'Submits form with short password and wrong confirmation' , ( ) => {
@@ -25,10 +26,10 @@ describe('Checks customer account create', () => {
2526 } ) ;
2627
2728 it ( 'Submits valid form with random email' , ( ) => {
28- const randomEmail = cy . generateRandomEmail ( ) ;
29+ const email = cy . openmage . generateRandomEmail ( ) ;
2930 cy . get ( '#firstname' ) . type ( 'John' ) . should ( 'have.value' , 'John' ) ;
3031 cy . get ( '#lastname' ) . type ( 'Doe' ) . should ( 'have.value' , 'Doe' ) ;
31- cy . get ( '#email_address' ) . type ( randomEmail ) . should ( 'have.value' , randomEmail ) ;
32+ cy . get ( '#email_address' ) . type ( email ) . should ( 'have.value' , email ) ;
3233 cy . get ( '#password' ) . type ( '12345678' ) . should ( 'have.value' , '12345678' ) ;
3334 cy . get ( '#confirmation' ) . type ( '12345678' ) . should ( 'have.value' , '12345678' ) ;
3435 cy . get ( '#form-validate button[type="submit"]' ) . click ( ) ;
0 commit comments