Tests: Update page model and testcafe config

This commit is contained in:
theresa 2021-08-13 21:19:19 +02:00
parent fb42113207
commit 7b4c2d2fb2
3 changed files with 10 additions and 3 deletions

View file

@ -6,6 +6,10 @@ fixture`Test albums`.page`${testcafeconfig.url}`;
const page = new Page();
test.meta("testID", "authentication-000")("Time to start instance (will be marked as unstable)", async (t) => {
await t.wait(5000);
});
test.meta("testID", "albums-001")("Create/delete album on /albums", async (t) => {
await page.openNav();
await t.click(Selector(".nav-albums"));

View file

@ -205,8 +205,11 @@ export default class Page {
}
}
async login(password) {
await t.typeText(Selector('input[type="password"]'), password).pressKey("enter");
async login(username, password) {
await t
.typeText(Selector(".input-name input"), username, { replace: true, timeout: 5000 })
.typeText(Selector(".input-password input"), password, { replace: true })
.click(Selector(".action-confirm"));
}
async logout() {

View file

@ -1,4 +1,4 @@
{
"url": "localhost:2343/photos"
"url": "localhost:2343/browse"
}