Skip to content

Commit 2c7ac19

Browse files
committed
test: add cases
1 parent d86aa71 commit 2c7ac19

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

tests/acceptance/crate-test.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -212,12 +212,4 @@ module('Acceptance | crate page', function (hooks) {
212212

213213
assert.equal(currentURL(), '/crates/nanomsg/settings');
214214
});
215-
216-
test('owners redirecting to the settings page', async function (assert) {
217-
this.server.loadFixtures();
218-
219-
await visit('/crates/nanomsg/owners');
220-
221-
assert.equal(currentURL(), '/crates/nanomsg/settings');
222-
});
223215
});

tests/acceptance/settings-test.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,22 @@ module('Acceptance | /crates/:name/settings', function (hooks) {
2727
await a11yAudit(axeConfig);
2828
});
2929

30+
test('redirecting and listing crate owners', async function (assert) {
31+
this.server.loadFixtures();
32+
33+
await visit('/crates/nanomsg/owners');
34+
35+
assert.dom('[data-test-owners] [data-test-owner-team]').exists({ count: 2 });
36+
assert.dom('[data-test-owners] [data-test-owner-user]').exists({ count: 2 });
37+
assert.dom('a[href="/teams/github:org:thehydroimpulse"]').exists();
38+
assert.dom('a[href="/teams/github:org:blabaere"]').exists();
39+
assert.dom('a[href="/users/thehydroimpulse"]').exists();
40+
assert.dom('a[href="/users/blabaere"]').exists();
41+
42+
await percySnapshot(assert);
43+
await a11yAudit(axeConfig);
44+
});
45+
3046
test('attempting to add owner without username', async function (assert) {
3147
this.server.loadFixtures();
3248

0 commit comments

Comments
 (0)