Skip to content

Instantly share code, notes, and snippets.

@nottyo
Created April 30, 2022 11:14
Show Gist options
  • Save nottyo/c29767bdd39c57626e440c0080b0d27c to your computer and use it in GitHub Desktop.
Save nottyo/c29767bdd39c57626e440c0080b0d27c to your computer and use it in GitHub Desktop.
cypress - line login - simple
describe('Simple Line Login', () => {
it('login without optimization', () => {
const args = { email: Cypress.env('email'), password: Cypress.env('password') };
cy.visit(Cypress.config('baseUrl'));
cy.get('[data-testid="login"]').click();
cy.origin('https://access.line.me', { args }, ({ email, password }) => {
cy.get('input[type="text"]').type(email);
cy.get('input[type="password"]').type(password);
cy.get('button[type="submit"]').click();
});
cy.get('[data-testid="displayName"]').should('have.text', 'displayName: Nott');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment