From 720df549bb0de79880aaa24a38079332d0c87c68 Mon Sep 17 00:00:00 2001 From: theresa Date: Mon, 15 Feb 2021 15:57:28 +0100 Subject: [PATCH] Tests: Refactor tests --- frontend/tests/acceptance/components.js | 6 +++--- frontend/tests/acceptance/photos-download.js | 4 ++-- frontend/tests/acceptance/places.js | 2 +- frontend/tests/acceptance/settings/general.js | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/frontend/tests/acceptance/components.js b/frontend/tests/acceptance/components.js index 38b6048d3..2cc49312f 100644 --- a/frontend/tests/acceptance/components.js +++ b/frontend/tests/acceptance/components.js @@ -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(); }); diff --git a/frontend/tests/acceptance/photos-download.js b/frontend/tests/acceptance/photos-download.js index 3a85d67d6..a83877186 100644 --- a/frontend/tests/acceptance/photos-download.js +++ b/frontend/tests/acceptance/photos-download.js @@ -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; diff --git a/frontend/tests/acceptance/places.js b/frontend/tests/acceptance/places.js index c1f3088e7..80154d849 100644 --- a/frontend/tests/acceptance/places.js +++ b/frontend/tests/acceptance/places.js @@ -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(); } }); diff --git a/frontend/tests/acceptance/settings/general.js b/frontend/tests/acceptance/settings/general.js index a220c3dda..892732686 100644 --- a/frontend/tests/acceptance/settings/general.js +++ b/frontend/tests/acceptance/settings/general.js @@ -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()