diff --git a/frontend/tests/acceptance/page-model.js b/frontend/tests/acceptance/page-model.js index 453a21ead..1b43dc17d 100644 --- a/frontend/tests/acceptance/page-model.js +++ b/frontend/tests/acceptance/page-model.js @@ -155,10 +155,6 @@ export default class Page { .click(Selector("button.action-" + type)) .typeText(Selector(".input-album input"), name, { replace: true }) .pressKey("enter"); - /*if (await Selector('div[role="listitem"]').withText(name).visible) { - await t.click(Selector('div[role="listitem"]').withText(name)); - } - await t.click(Selector("button.action-confirm"));*/ } async turnSwitchOff(type) { diff --git a/frontend/tests/acceptance/settings/general.js b/frontend/tests/acceptance/settings/general.js index f99092f5f..a62a9213a 100644 --- a/frontend/tests/acceptance/settings/general.js +++ b/frontend/tests/acceptance/settings/general.js @@ -33,8 +33,10 @@ test.meta("testID", "settings-general-001")("General Settings", async (t) => { .ok() .expect(Selector(".action-download").exists) .ok() - .click(Selector(".action-close")) .click(Selector(".action-close")); + if (await Selector(".action-close").exists) { + await t.click(Selector(".action-close")); + } await t .expect(Selector("button.action-location").visible) .ok() @@ -157,8 +159,10 @@ test.meta("testID", "settings-general-001")("General Settings", async (t) => { .ok() .expect(Selector(".action-download").exists) .notOk() - .click(Selector(".action-close")) .click(Selector(".action-close")); + if (await Selector(".action-close").exists) { + await t.click(Selector(".action-close")); + } await page.toggleSelectNthPhoto(0); await t .expect(Selector("button.action-location").exists)