[Sprint/KiltedKoala](feat): Added e2e test for registration
Closes #1638
0/3 threads resolved
added MR::Awaiting Review Squad::Green scoped labels
approved this merge request
added 9 commits
- 1b662ff0...6d942fb6 - 8 commits from branch
master
- 39ba0928 - Merge branch 'master' into feat/registration-e2e-1638
- 1b662ff0...6d942fb6 - 8 commits from branch
added 105 commits
- 39ba0928...2be70043 - 102 commits from branch
master
- 81a263c1 - Updated registration tests
- 516f7281 - Merge branch 'master' of gitlab.com:minds/front into feat/registration-e2e-1638
- bbd3d77a - Fixed up registration test
Toggle commit list- 39ba0928...2be70043 - 102 commits from branch
approved this merge request
unapproved this merge request
38 //type values 39 cy.get(usernameField).focus().type(username); 40 cy.get(emailField).focus().type(email); 41 cy.get(passwordField).focus().type(password); 42 43 cy.get(password2Field).focus().type(password); 44 cy.get(checkbox).click(); 45 46 //submit 47 cy.get(submitButton).click() 48 .wait('@register').then((xhr) => { 49 expect(xhr.status).to.equal(200); 50 }); 51 52 //onboarding modal shown 53 cy.get('m-onboarding--topics > div > h2:nth-child(1)') - Developer
Let's stop using these nth child selectors
3 const username = Math.random().toString(36).replace('0.', ''); 4 const email = 'test@minds.com'; 5 const password = `${Math.random().toString(36).replace('0.', '')}0oA!`; 6 const noSymbolPass = 'Passw0rd'; 7 8 const welcomeText = "Welcome to Minds!"; 9 const passwordDontMatch = "Passwords must match."; 10 const passwordInvalid = " Password must have more than 8 characters. Including uppercase, numbers, special characters (ie. !,#,@), and cannot have spaces. "; 11 12 const usernameField = 'minds-form-register #username'; 13 const emailField = 'minds-form-register #email'; 14 const passwordField = 'minds-form-register #password'; 15 const password2Field = 'minds-form-register #password2'; 16 const checkbox = 'minds-form-register label:nth-child(2) .mdl-ripple--center'; 17 const submitButton = 'minds-form-register .mdl-card__actions button'; 18 const errorContainer = 'div:nth-child(2) > minds-form-register > div > div'; - Developer
Nth child selector
1 context('Registration', () => { 2 3 const username = Math.random().toString(36).replace('0.', ''); 4 const email = 'test@minds.com'; 5 const password = `${Math.random().toString(36).replace('0.', '')}0oA!`; 6 const noSymbolPass = 'Passw0rd'; 7 8 const welcomeText = "Welcome to Minds!"; 9 const passwordDontMatch = "Passwords must match."; 10 const passwordInvalid = " Password must have more than 8 characters. Including uppercase, numbers, special characters (ie. !,#,@), and cannot have spaces. "; 11 12 const usernameField = 'minds-form-register #username'; 13 const emailField = 'minds-form-register #email'; 14 const passwordField = 'minds-form-register #password'; 15 const password2Field = 'minds-form-register #password2'; 16 const checkbox = 'minds-form-register label:nth-child(2) .mdl-ripple--center'; - Developer
nth child selector