@@ -42,12 +42,27 @@ describe('Checks customer account create', () => {
4242 validation . validateFields ( test . create , validation . requiredEntry ) ;
4343 } ) ;
4444
45- it ( 'Submits valid form with random email' , ( ) => {
46- const email = cy . openmage . utils . generateRandomEmail ( ) ;
47- const firstname = 'John' ;
48- const lastname = 'Doe' ;
45+ const email = cy . openmage . utils . generateRandomEmail ( ) ;
46+ const firstname = 'John' ;
47+ const lastname = 'Doe' ;
48+
49+ it ( 'Submits invalid form with weak password' , ( ) => {
4950 const password = '12345678' ;
51+ // see PR: https://github.com/OpenMage/magento-lts/pull/4617
52+ // const message = 'Thank you for registering with Madison Island.';
53+ const message = 'Password must include both numeric and alphabetic characters.' ;
54+ const filename = 'message.customer.account.create.invalid.weakpassword' ;
55+ cy . get ( test . create . __fields . firstname . _ ) . type ( firstname ) . should ( 'have.value' , firstname ) ;
56+ cy . get ( test . create . __fields . lastname . _ ) . type ( lastname ) . should ( 'have.value' , lastname ) ;
57+ cy . get ( test . create . __fields . email_address . _ ) . type ( email ) . should ( 'have.value' , email ) ;
58+ cy . get ( test . create . __fields . password . _ ) . type ( password ) . should ( 'have.value' , password ) ;
59+ cy . get ( test . create . __fields . confirmation . _ ) . type ( password ) . should ( 'have.value' , password ) ;
60+ tools . click ( test . _buttonSubmit ) ;
61+ validation . hasErrorMessage ( message , { screenshot : false , filename : filename } ) ;
62+ } ) ;
5063
64+ it ( 'Submits invalid form' , ( ) => {
65+ const password = 'veryl0ngpassw0rd' ;
5166 // see PR: https://github.com/OpenMage/magento-lts/pull/4617
5267 // const message = 'Thank you for registering with Madison Island.';
5368 const message = 'Thank you for registering with ENV name default.' ;
0 commit comments