Merge pull request #672 from hashicorp/del-test

test: Credential library deletion error test
This commit is contained in:
Dharini Jeeva authored and GitHub committed 2021-07-27 09:11:03 -07:00
commit 6f85419675
1 file changed
+18
@@ -147,4 +147,22 @@ module('Acceptance | credential-library', function (hooks) {
assert.equal(getCredentialLibraryCount(), count);
assert.ok(confirmService.confirm.calledOnce);
});
test('deleting a credential library which errors displays error messages', async function (assert) {
assert.expect(1);
this.server.del('/credential-libraries/:id', () => {
return new Response(
490,
{},
{
status: 490,
code: 'error',
message: 'Oops.',
}
);
});
await visit(urls.credentialLibrary);
await click('.rose-layout-page-actions .rose-dropdown-button-danger');
assert.ok(find('[role="alert"]').textContent.trim(), 'Oops.');
});
});