Skip to content

Instantly share code, notes, and snippets.

@nottyo
Last active May 1, 2022 03:26
Show Gist options
  • Save nottyo/62b6036c9fa5bf3c34c1d6b673f73103 to your computer and use it in GitHub Desktop.
Save nottyo/62b6036c9fa5bf3c34c1d6b673f73103 to your computer and use it in GitHub Desktop.
login-custom-command
describe('simple login', () => {
beforeEach(() => {
// do login before each test case so number of login = number of test cases
cy.lineLoginWithoutSession(Cypress.env('email'), Cypress.env('password'));
});
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