Skip to content

Instantly share code, notes, and snippets.

@filiphric
Created February 1, 2021 23:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save filiphric/8fb54a00bbd40280cd30b134c897dc44 to your computer and use it in GitHub Desktop.
Save filiphric/8fb54a00bbd40280cd30b134c897dc44 to your computer and use it in GitHub Desktop.
Login page object
const app = new Vue({
// ...
}).$mount('#trello-app');
window.app = app;
import { Login } from '../support/pageObjects/login';
const login = new Login();
beforeEach(() => {
cy
.visit('/');
});
it('opens signup form', () => {
login
.open()
.goToSignup();
});
export class Login {
open() {
cy
.get('[data-cy=login-menu]')
.click();
return this;
}
goToSignup() {
cy
.contains('Sign up here')
.click();
return this;
}
}
it('opens signup form', () => {
cy
.window()
.then(({ app }) => {
app.showLoginModule = true;
});
});
cy
.component('Login')
.then(login => {
login.logSignSwitch();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment