Skip to content

Instantly share code, notes, and snippets.

@nottyo
Created May 1, 2022 03:36
Show Gist options
  • Save nottyo/41b2cf5de63b3aeb0858f632bbcfefba to your computer and use it in GitHub Desktop.
Save nottyo/41b2cf5de63b3aeb0858f632bbcfefba to your computer and use it in GitHub Desktop.
login with session
describe('login with session', () => {
beforeEach(() => {
// login once for all test cases and preserve its login session.
cy.lineLoginWithSession(Cypress.env('email'), Cypress.env('password'));
cy.visit(Cypress.config('baseUrl'));
});
it('render profileUrl', () => {
cy.get('img[alt="profileUrl"]').should('be.visible');
});
it('render displayName', () => {
cy.get('[data-testid="displayName"]').should('have.text', 'displayName: Nott');
});
it('render logout button', () => {
cy.get('[data-testid="logout"]').should('be.visible');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment