2019-09-23 14:29:53 +00:00
|
|
|
import { Selector, t } from "testcafe";
|
2019-09-11 12:21:19 +00:00
|
|
|
|
2019-09-23 14:29:53 +00:00
|
|
|
export default class LoginPage {
|
|
|
|
constructor() {
|
|
|
|
this.email = Selector('[data-tc="email"]');
|
|
|
|
this.password = Selector('[data-tc="password"]');
|
|
|
|
this.submitButton = Selector('[data-tc="submit"]');
|
|
|
|
}
|
2019-09-11 12:21:19 +00:00
|
|
|
|
2019-09-23 14:29:53 +00:00
|
|
|
async performLogin(putEmail, putPassword) {
|
|
|
|
await t
|
|
|
|
.typeText(this.email, putEmail)
|
|
|
|
.typeText(this.password, putPassword)
|
|
|
|
.click(this.submitButton);
|
|
|
|
}
|
|
|
|
}
|