Tests: Adapt page model
This commit is contained in:
parent
c52a176e61
commit
5586f1fab9
4 changed files with 6 additions and 6 deletions
frontend/tests/acceptance
|
@ -52,7 +52,7 @@ test.meta("testID", "albums-002")("Update album", async (t) => {
|
|||
const SecondPhotoUid = await Selector("div.is-photo.type-image").nth(1).getAttribute("data-uid");
|
||||
await page.selectPhotoFromUID(SecondPhotoUid);
|
||||
await page.selectFromUIDInFullscreen(FirstPhotoUid);
|
||||
await page.addSelectedToAlbum("Animals");
|
||||
await page.addSelectedToAlbum("Animals", "album");
|
||||
await page.openNav();
|
||||
await t.click(Selector(".nav-albums"));
|
||||
if (t.browser.platform === "mobile") {
|
||||
|
@ -204,7 +204,7 @@ test.meta("testID", "albums-007")("Create/delete album during add to album", asy
|
|||
const SecondPhotoUid = await Selector("div.is-photo.type-image").nth(1).getAttribute("data-uid");
|
||||
await page.selectPhotoFromUID(SecondPhotoUid);
|
||||
await page.selectFromUIDInFullscreen(FirstPhotoUid);
|
||||
await page.addSelectedToAlbum("NotYetExistingAlbum");
|
||||
await page.addSelectedToAlbum("NotYetExistingAlbum", "album");
|
||||
await page.openNav();
|
||||
await t.click(Selector(".nav-albums"));
|
||||
const countAlbumsAfterCreation = await Selector("a.is-album").count;
|
||||
|
|
|
@ -152,7 +152,7 @@ test.meta("testID", "labels-003")("Add label to album", async (t) => {
|
|||
|
||||
const clipboardCount = await Selector("span.count-clipboard");
|
||||
await t.expect(clipboardCount.textContent).eql("1");
|
||||
await page.addSelectedToAlbum("Christmas");
|
||||
await page.addSelectedToAlbum("Christmas", "album");
|
||||
await page.openNav();
|
||||
await t
|
||||
.click(Selector(".nav-albums"))
|
||||
|
|
|
@ -38,7 +38,7 @@ test.meta("testID", "originals-001")("Add original files to album", async (t) =>
|
|||
await page.selectPhotoFromUID(KanadaUid);
|
||||
const clipboardCount = await Selector("span.count-clipboard", { timeout: 5000 });
|
||||
await t.expect(clipboardCount.textContent).eql("1");
|
||||
await page.addSelectedToAlbum("KanadaVacation");
|
||||
await page.addSelectedToAlbum("KanadaVacation", "album");
|
||||
await page.openNav();
|
||||
await t
|
||||
.click(Selector(".nav-albums"));
|
||||
|
|
|
@ -145,10 +145,10 @@ export default class Page {
|
|||
await t.click(Selector("button.action-menu")).click(Selector("button.action-remove"));
|
||||
}
|
||||
|
||||
async addSelectedToAlbum(name) {
|
||||
async addSelectedToAlbum(name, type) {
|
||||
await t
|
||||
.click(Selector("button.action-menu"))
|
||||
.click(Selector("button.action-album"))
|
||||
.click(Selector("button.action-"+type))
|
||||
.typeText(Selector(".input-album input"), name, { replace: true })
|
||||
.pressKey("enter");
|
||||
if (await Selector('div[role="listitem"]').withText(name).visible) {
|
||||
|
|
Loading…
Reference in a new issue