enough-summer-50273
03/08/2023, 5:37 PMJavaScript
beforeEach(() => {
cy.login();
cy.visit("/");
});
it('Correct user is logged in', () => {
cy.log(JSON.stringify(Cypress.env()));
// the token set in the cy.login() command is present
});
This doesn't.
JavaScript
it.only('Correct user is logged in', () => {
cy.login();
cy.visit("/");
cy.log(JSON.stringify(Cypress.env()));
// the token set in the cy.login() command is not present
// but all of the hardcoded enviroment variables are
});gray-kilobyte-89541
03/08/2023, 5:57 PMenough-summer-50273
03/08/2023, 6:00 PMenough-summer-50273
03/08/2023, 6:40 PMgray-kilobyte-89541
03/08/2023, 8:14 PMjs
it.only('Correct user is logged in', () => {
cy.login();
cy.visit("/").then(() => {
// by now previous commands have finished
cy.log(JSON.stringify(Cypress.env()));
})
});enough-summer-50273
03/09/2023, 12:20 PM