feat(Cypress):Add tests for parts of /settings page (#39622)

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
Twaha Rahman
2020-11-22 00:09:38 +06:00
committed by GitHub
parent 4c242505b7
commit 625b12c4f2
4 changed files with 390 additions and 72 deletions

View File

@ -37,3 +37,18 @@ Cypress.Commands.add('login', () => {
cy.visit('/');
cy.contains("Get started (it's free)").click({ force: true });
});
Cypress.Commands.add('resetUsername', () => {
cy.login();
cy.visit('/settings');
cy.get('@usernameInput')
.clear({ force: true })
.type('developmentuser', { force: true });
cy.contains('Username is available.');
cy.get('@usernameInput').type('{enter}', { force: true, release: false });
cy.contains('Account Settings for developmentuser').should('be.visible');
});