Skip to content

Commit 2336aee

Browse files
0xPoeTurbo87
authored andcommitted
Add a UI test case for regenerate button
1 parent 6183b2e commit 2336aee

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/acceptance/api-token-test.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,17 @@ module('Acceptance | api-tokens', function (hooks) {
103103
assert.dom('[data-test-error]').doesNotExist();
104104
});
105105

106+
test('API tokens can be regenerated', async function (assert) {
107+
prepare(this);
108+
109+
await visit('/settings/tokens');
110+
assert.strictEqual(currentURL(), '/settings/tokens');
111+
assert.dom('[data-test-api-token]').exists({ count: 3 });
112+
113+
await click('[data-test-api-token="1"] [data-test-regenerate-token-button]');
114+
assert.strictEqual(currentURL(), '/settings/tokens/new?from=1');
115+
});
116+
106117
test('failed API tokens revocation shows an error', async function (assert) {
107118
prepare(this);
108119

0 commit comments

Comments
 (0)