mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-04-08 02:31:36 +02:00
address lint-frontend errors & warnings in actions.test.e2e.ts
This commit is contained in:
parent
4e903b1f82
commit
bd8c09aa00
1 changed files with 7 additions and 3 deletions
|
@ -67,6 +67,8 @@ test.describe('Workflow Authenticated user2', () => {
|
|||
await save_visual(page);
|
||||
});
|
||||
|
||||
// no assertions as the login in this test case is extracted for reuse
|
||||
// eslint-disable-next-line playwright/expect-expect
|
||||
test('dispatch success', async ({page}, testInfo) => {
|
||||
await dispatchSuccess(page, testInfo);
|
||||
});
|
||||
|
@ -94,9 +96,11 @@ test.describe('workflow list dynamic refresh', () => {
|
|||
// Mirror the `Workflow Authenticated user2 > dispatch success` test:
|
||||
await dispatchSuccess(page, testInfo);
|
||||
|
||||
await backgroundPage.$eval("html", () => {
|
||||
const ev = new Event("visibilitychange");
|
||||
document.dispatchEvent(ev)
|
||||
// No other way to trigger a visibilitychange event other than using browser-side eval:
|
||||
// eslint-disable-next-line playwright/no-eval
|
||||
await backgroundPage.$eval('html', () => {
|
||||
const ev = new Event('visibilitychange');
|
||||
document.dispatchEvent(ev);
|
||||
});
|
||||
await expect(backgroundPage.locator('.run-list>:first-child .run-list-meta', {hasText: 'now'})).toBeVisible();
|
||||
await save_visual(backgroundPage);
|
||||
|
|
Loading…
Add table
Reference in a new issue