Tests: Update photoview page-model
This commit is contained in:
parent
e3ecfb5a94
commit
3dff2efbb0
1 changed files with 31 additions and 0 deletions
|
@ -45,6 +45,37 @@ export default class Page {
|
|||
}
|
||||
}
|
||||
|
||||
async checkHoverActionState(mode, uidOrNth, action, set) {
|
||||
if (mode === "uid") {
|
||||
await t.hover(Selector("div.is-photo").withAttribute("data-uid", uidOrNth));
|
||||
if (set) {
|
||||
await t.expect(Selector(`div.uid-${uidOrNth}`).hasClass("is-" + action)).ok();
|
||||
} else {
|
||||
await t.expect(Selector(`div.uid-${uidOrNth}`).hasClass("is-" + action)).notOk();
|
||||
}
|
||||
}
|
||||
if (mode === "nth") {
|
||||
await t.hover(Selector("div.is-photo").nth(uidOrNth));
|
||||
if (set) {
|
||||
await t
|
||||
.expect(
|
||||
Selector("div.is-photo")
|
||||
.nth(uidOrNth)
|
||||
.hasClass("is-" + action)
|
||||
)
|
||||
.ok();
|
||||
} else {
|
||||
await t
|
||||
.expect(
|
||||
Selector("div.is-photo")
|
||||
.nth(uidOrNth)
|
||||
.hasClass("is-" + action)
|
||||
)
|
||||
.notOk();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async triggerListViewActions(nth, action) {
|
||||
await t.click(Selector(`td button.input-` + action).nth(nth));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue