test: login more directly (#44467)
* test: login more directly * test: separate login from other visits In a single test, Cypress can only visit within a single domain, hence the separation. * chore: fail slowly for all strategies * test: user certified user for showing cert * test: fix and cleanup certifications
This commit is contained in:
committed by
GitHub
parent
8fb945c5a8
commit
48f88428e8
@ -33,14 +33,7 @@
|
||||
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => {});
|
||||
|
||||
Cypress.Commands.add('login', () => {
|
||||
cy.visit('/');
|
||||
cy.contains("Get started (it's free)").click();
|
||||
cy.location({ timeout: 10000 }).should(loc => {
|
||||
// I'm not 100% sure why logins get redirected to /learn/ via 301 in
|
||||
// development, but not in production, but they do. Hence to make it easier
|
||||
// work on tests, we'll just allow for both.
|
||||
expect(loc.pathname).to.match(/^\/learn\/?$/);
|
||||
});
|
||||
cy.visit('http://localhost:3000/signin');
|
||||
cy.contains('Welcome back');
|
||||
});
|
||||
|
||||
@ -60,7 +53,6 @@ Cypress.Commands.add('toggleAll', () => {
|
||||
});
|
||||
|
||||
Cypress.Commands.add('resetUsername', () => {
|
||||
cy.login();
|
||||
cy.visit('/settings');
|
||||
|
||||
cy.get('@usernameInput')
|
||||
|
Reference in New Issue
Block a user