Tests: Test select photo from fullscreen

This commit is contained in:
Theresa Gresch 2020-12-28 13:02:29 +01:00
parent 2c7f06e64e
commit 1a3bb2dab4
2 changed files with 15 additions and 1 deletions

View file

@ -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))

View file

@ -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")