Skip to content

Commit 3069867

Browse files
committed
Fix flaky test
1 parent 179f51f commit 3069867

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ui/src/tests/plugin.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import axios from 'axios';
55
import * as auth from './authentication';
66
import * as selector from './selector';
77
import {GotifyTest, newTest, newPluginDir} from './setup';
8-
import {count, innerText, waitForExists} from './utils';
8+
import {innerText, waitForCount, waitForExists} from './utils';
99

1010
const pluginSupported = ['linux', 'darwin'].indexOf(os.platform()) !== -1;
1111

@@ -94,7 +94,7 @@ describe('plugin', () => {
9494
describe('functionality test', () => {
9595
describe('initial status', () => {
9696
it('has echo plugin', async () => {
97-
expect(await count(page, $table.rows())).toBe(1);
97+
await waitForCount(page, $table.rows(), 1);
9898
expect(await innerText(page, $table.cell(1, Col.Name))).toEqual('test plugin');
9999
expect(await innerText(page, $table.cell(1, Col.Token))).toBe(hiddenToken);
100100
expect(parseInt(await innerText(page, $table.cell(1, Col.ID)), 10)).toBeGreaterThan(

0 commit comments

Comments
 (0)