Skip to content

Commit 3a1eb3d

Browse files
authored
tests/acceptance/support-test: Fix flaky tests by waiting for the button to exist (#10743)
1 parent 959168d commit 3a1eb3d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/acceptance/support-test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { click, currentURL, fillIn, findAll } from '@ember/test-helpers';
1+
import { click, currentURL, fillIn, findAll, waitFor } from '@ember/test-helpers';
22
import { module, test } from 'qunit';
33

44
import percySnapshot from '@percy/ember';
@@ -205,6 +205,8 @@ test detail
205205
};
206206

207207
await visit('/crates/nanomsg');
208+
assert.strictEqual(currentURL(), '/crates/nanomsg');
209+
await waitFor('[data-test-id="link-crate-report"]');
208210
await click('[data-test-id="link-crate-report"]');
209211
assert.strictEqual(currentURL(), '/support?crate=nanomsg&inquire=crate-violation');
210212
assert.dom('[data-test-id="crate-input"]').hasValue('nanomsg');

0 commit comments

Comments
 (0)