Skip to content

Commit

Permalink
Add settled() to failing browserstack tests (hashicorp#12210)
Browse files Browse the repository at this point in the history
* adds await settled
  • Loading branch information
hellobontempo authored and jartek committed Sep 11, 2021
1 parent aef6a98 commit 524cd58
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ui/tests/acceptance/secrets/backend/kv/secret-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,14 @@ module('Acceptance | secrets/secret/create', function(hooks) {
test('it creates a secret and redirects', async function(assert) {
const path = `kv-path-${new Date().getTime()}`;
await listPage.visitRoot({ backend: 'secret' });
await settled();
assert.equal(currentRouteName(), 'vault.cluster.secrets.backend.list-root', 'navigates to the list page');

await listPage.create();
await settled();
assert.ok(editPage.hasMetadataFields, 'shows the metadata form');
await editPage.createSecret(path, 'foo', 'bar');
await settled();

assert.equal(currentRouteName(), 'vault.cluster.secrets.backend.show', 'redirects to the show page');
assert.ok(showPage.editIsPresent, 'shows the edit button');
Expand All @@ -70,6 +73,7 @@ module('Acceptance | secrets/secret/create', function(hooks) {
let maxVersions = 101;
await mountSecrets.visit();
await mountSecrets.enable('kv', enginePath);
await settled();
await click('[data-test-secret-create="true"]');
await fillIn('[data-test-secret-path="true"]', secretPath);
await fillIn('[data-test-input="maxVersions"]', maxVersions);
Expand All @@ -90,6 +94,7 @@ module('Acceptance | secrets/secret/create', function(hooks) {
let enginePath = `kv-${new Date().getTime()}`;
await mountSecrets.visit();
await mountSecrets.enable('kv', enginePath);
await settled();
await click('[data-test-secret-create="true"]');
await fillIn('[data-test-secret-path="true"]', 'beep');
await triggerKeyEvent('[data-test-secret-path="true"]', 'keyup', 65);
Expand Down

0 comments on commit 524cd58

Please sign in to comment.