diff --git a/frontend/tests/acceptance/page-model.js b/frontend/tests/acceptance/page-model.js index e2abf96eb..9736731e9 100644 --- a/frontend/tests/acceptance/page-model.js +++ b/frontend/tests/acceptance/page-model.js @@ -61,6 +61,20 @@ export default class Page { .click(Selector('.t-select.t-off')); } + async selectFromUIDInFullscreen(uid) { + await t + .hover(Selector('div').withAttribute('data-uid', uid)); + if (await Selector('button.p-photo-fullscreen').exists) { + await t.click(Selector('button.p-photo-fullscreen')); + } else { + await t.click(Selector('div').withAttribute('data-uid', uid)); + } + await t + .expect(Selector('#p-photo-viewer').visible).ok() + .click(Selector('button[title="Select"]')) + .click(Selector('.action-close')); + } + async unselectFromUID(uid) { await t .hover(Selector('div').withAttribute('data-uid', uid)) diff --git a/frontend/tests/acceptance/photos.js b/frontend/tests/acceptance/photos.js index a0a70948b..0fd1164f2 100644 --- a/frontend/tests/acceptance/photos.js +++ b/frontend/tests/acceptance/photos.js @@ -220,7 +220,7 @@ test('#5 Private/unprivate photo/video using clipboard and list', async t => { .expect(Selector('div').withAttribute('data-uid', SecondVideo).exists, {timeout: 5000}).notOk() .click(Selector('.nav-photos')); await page.selectFromUID(FirstPhoto); - await page.selectFromUID(SecondPhoto); + await page.selectFromUIDInFullscreen(SecondPhoto); const clipboardCount = await Selector('span.count-clipboard', {timeout: 5000}); await t .expect(clipboardCount.textContent).eql("2")