Skip to content

Instantly share code, notes, and snippets.

@filiphric
Created Feb 1, 2021
Embed
What would you like to do?
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