Commit a5f57be5 authored by Ben Hayward's avatar Ben Hayward

Update commands.js

parent 95676310
Pipeline #95938654 passed with stages
in 88 minutes and 49 seconds
......@@ -74,15 +74,16 @@ const poster = {
Cypress.Commands.add('login', (canary = false, username, password) => {
cy.clearCookies();
cy.setCookie('staging', "1"); // Run in staging mode. Note: does not impact review sites
cy.server();
cy.route("POST", "/api/v1/authenticate").as("postLogin");
username = username ? username : Cypress.env().username;
password = password ? password : Cypress.env().password;
cy.visit('/login')
.location('pathname')
.should('eq', '/newsfeed/subscriptions');
cy.server();
cy.route("POST", "/api/v1/authenticate").as("postLogin");
.should('eq', '/login');
cy.get(loginForm.username).focus().type(username);
cy.get(loginForm.password).focus().type(password);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment