Created
February 1, 2021 23:38
-
-
Save filiphric/8fb54a00bbd40280cd30b134c897dc44 to your computer and use it in GitHub Desktop.
Login page object
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const app = new Vue({ | |
// ... | |
}).$mount('#trello-app'); | |
window.app = app; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Login } from '../support/pageObjects/login'; | |
const login = new Login(); | |
beforeEach(() => { | |
cy | |
.visit('/'); | |
}); | |
it('opens signup form', () => { | |
login | |
.open() | |
.goToSignup(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class Login { | |
open() { | |
cy | |
.get('[data-cy=login-menu]') | |
.click(); | |
return this; | |
} | |
goToSignup() { | |
cy | |
.contains('Sign up here') | |
.click(); | |
return this; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it('opens signup form', () => { | |
cy | |
.window() | |
.then(({ app }) => { | |
app.showLoginModule = true; | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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