Tests: Refactor tests

This commit is contained in:
theresa 2021-02-15 15:57:28 +01:00
parent 222923422d
commit 720df549bb
4 changed files with 8 additions and 8 deletions

View file

@ -15,7 +15,7 @@ test.meta("testID", "components-001")("Test filter options", async (t) => {
test.meta("testID", "components-002")("Fullscreen mode", async (t) => {
await t
.click(Selector("div.v-image__image").nth(0))
.expect(Selector("#p-photo-viewer").visible)
.expect(Selector("#photo-viewer").visible)
.ok()
.expect(Selector("img.pswp__img").visible)
.ok();
@ -30,7 +30,7 @@ test.meta("testID", "components-003")("Mosaic view", async (t) => {
.ok()
.expect(Selector("div.is-photo div.caption").exists)
.notOk()
.expect(Selector("#p-photo-viewer").visible)
.expect(Selector("#photo-viewer").visible)
.notOk();
});
@ -50,6 +50,6 @@ test.meta("testID", "components-005")("#Card view", async (t) => {
.ok()
.expect(Selector("div.is-photo div.caption").visible)
.ok()
.expect(Selector("#p-photo-viewer").visible)
.expect(Selector("#photo-viewer").visible)
.notOk();
});

View file

@ -31,7 +31,7 @@ test.meta("testID", "photos-download-001")(
await page.search("name:IMG_20200711_174006.jpg");
const SecondPhoto = await Selector("div.is-photo").nth(0).getAttribute("data-uid");
await t.click(Selector("div").withAttribute("data-uid", SecondPhoto));
await t.expect(Selector("#p-photo-viewer").visible).ok().hover(Selector(".action-download"));
await t.expect(Selector("#photo-viewer").visible).ok().hover(Selector(".action-download"));
await logger.clear();
await t.click(Selector(".action-download"));
const requestInfo2 = await logger.requests[1].response;
@ -100,7 +100,7 @@ test.meta("testID", "photos-download-004")(
await logger.clear();
await page.clearSelection();
await t.click(Selector("div").withAttribute("data-uid", Photo));
await t.expect(Selector("#p-photo-viewer").visible).ok().hover(Selector(".action-download"));
await t.expect(Selector("#photo-viewer").visible).ok().hover(Selector(".action-download"));
await logger.clear();
await t.click(Selector(".action-download"));
const requestInfo3 = await logger.requests[1].response;

View file

@ -40,7 +40,7 @@ test.meta("testID", "places-002")("Open photo from places", async (t) => {
.pressKey("enter")
.wait(30000)
.click(Selector("div.marker").nth(0), { timeout: 9000 })
.expect(Selector("#p-photo-viewer").visible)
.expect(Selector("#photo-viewer").visible)
.ok();
}
});

View file

@ -29,7 +29,7 @@ test.meta("testID", "settings-general-001")("General Settings", async (t) => {
await page.clearSelection();
await t.click(Selector("div.is-photo").nth(0));
await t
.expect(Selector("#p-photo-viewer").visible)
.expect(Selector("#photo-viewer").visible)
.ok()
.expect(Selector(".action-download").exists)
.ok()
@ -154,7 +154,7 @@ test.meta("testID", "settings-general-001")("General Settings", async (t) => {
.hover(Selector(".is-photo.type-image").nth(0))
.click(Selector(".is-photo.type-image .action-fullscreen").nth(0));
await t
.expect(Selector("#p-photo-viewer", { timeout: 5000 }).visible)
.expect(Selector("#photo-viewer", { timeout: 5000 }).visible)
.ok()
.expect(Selector(".action-download").exists)
.notOk()