Tests: Test select photo from fullscreen
This commit is contained in:
parent
2c7f06e64e
commit
1a3bb2dab4
2 changed files with 15 additions and 1 deletions
|
@ -61,6 +61,20 @@ export default class Page {
|
||||||
.click(Selector('.t-select.t-off'));
|
.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) {
|
async unselectFromUID(uid) {
|
||||||
await t
|
await t
|
||||||
.hover(Selector('div').withAttribute('data-uid', uid))
|
.hover(Selector('div').withAttribute('data-uid', uid))
|
||||||
|
|
|
@ -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()
|
.expect(Selector('div').withAttribute('data-uid', SecondVideo).exists, {timeout: 5000}).notOk()
|
||||||
.click(Selector('.nav-photos'));
|
.click(Selector('.nav-photos'));
|
||||||
await page.selectFromUID(FirstPhoto);
|
await page.selectFromUID(FirstPhoto);
|
||||||
await page.selectFromUID(SecondPhoto);
|
await page.selectFromUIDInFullscreen(SecondPhoto);
|
||||||
const clipboardCount = await Selector('span.count-clipboard', {timeout: 5000});
|
const clipboardCount = await Selector('span.count-clipboard', {timeout: 5000});
|
||||||
await t
|
await t
|
||||||
.expect(clipboardCount.textContent).eql("2")
|
.expect(clipboardCount.textContent).eql("2")
|
||||||
|
|
Loading…
Reference in a new issue