Skip to content

Commit 7890fcd

Browse files
committed
fixed screenshot tests
1 parent e52c0b4 commit 7890fcd

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

special-pages/pages/history/integration-tests/history.page.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,28 @@ export class HistoryTestPage {
340340
await expect(selected).toHaveCount(1);
341341
}
342342

343+
/**
344+
* @param {number} nth
345+
*/
346+
async hoversRowIndex(nth) {
347+
const rows = this.page.locator('main').locator('[aria-selected]');
348+
await rows.nth(nth).hover();
349+
await rows.nth(nth).locator('[data-action="entries_menu"]').waitFor({ state: 'visible' });
350+
}
351+
/**
352+
* @param {number} nth
353+
*/
354+
async hoversRowIndexBtn(nth) {
355+
const rows = this.page.locator('main').locator('[aria-selected]');
356+
await rows.nth(nth).locator('[data-action="entries_menu"]').hover();
357+
}
358+
/**
359+
*
360+
*/
361+
async hoversDeleteAllBtn() {
362+
await this.page.getByRole('button', { name: 'Delete All', exact: true }).hover();
363+
}
364+
343365
/**
344366
* @param {number} nth
345367
*/
@@ -519,6 +541,14 @@ export class HistoryTestPage {
519541
return this.page.locator('header');
520542
}
521543

544+
async hoversRange(range) {
545+
await this.page.getByLabel(`Show history for ${range}`).hover();
546+
}
547+
async hoversRangeDelete(range) {
548+
// await this.page.pause();
549+
await this.page.getByRole('button', { name: `Delete history for ${range}` }).hover();
550+
}
551+
522552
/**
523553
* @param {number[]} indexes
524554
*/

0 commit comments

Comments
 (0)