Skip to content

Commit b4e576b

Browse files
committed
fixed screenshot tests
1 parent dc53ddf commit b4e576b

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
@@ -353,6 +353,28 @@ export class HistoryTestPage {
353353
await expect(selected).toHaveCount(1);
354354
}
355355

356+
/**
357+
* @param {number} nth
358+
*/
359+
async hoversRowIndex(nth) {
360+
const rows = this.page.locator('main').locator('[aria-selected]');
361+
await rows.nth(nth).hover();
362+
await rows.nth(nth).locator('[data-action="entries_menu"]').waitFor({ state: 'visible' });
363+
}
364+
/**
365+
* @param {number} nth
366+
*/
367+
async hoversRowIndexBtn(nth) {
368+
const rows = this.page.locator('main').locator('[aria-selected]');
369+
await rows.nth(nth).locator('[data-action="entries_menu"]').hover();
370+
}
371+
/**
372+
*
373+
*/
374+
async hoversDeleteAllBtn() {
375+
await this.page.getByRole('button', { name: 'Delete All', exact: true }).hover();
376+
}
377+
356378
/**
357379
* @param {number} nth
358380
*/
@@ -532,6 +554,14 @@ export class HistoryTestPage {
532554
return this.page.locator('header');
533555
}
534556

557+
async hoversRange(range) {
558+
await this.page.getByLabel(`Show history for ${range}`).hover();
559+
}
560+
async hoversRangeDelete(range) {
561+
// await this.page.pause();
562+
await this.page.getByRole('button', { name: `Delete history for ${range}` }).hover();
563+
}
564+
535565
/**
536566
* @param {number[]} indexes
537567
*/

0 commit comments

Comments
 (0)