123456789101112131415161718192021222324252627 |
- // import 'cypress';
- import {fileIndex} from '../util';
- class LoginPage {
- visit() {
- cy.visit(`${fileIndex}#/pages/index/index`);
- }
- getUsernameInput() {
- return cy.get('[data-testid="login-username-input"]');
- }
- getPasswordInput() {
- return cy.get('[data-testid="login-password-input"]');
- }
- getSubmitButton() {
- return cy.get('[data-testid="login-submit-button"]');
- }
- login(username: string, password: string) {
- this.getUsernameInput().type(username);
- this.getPasswordInput().type(password);
- this.getSubmitButton().click();
- }
- }
- export default LoginPage;
|