Skip to content

Commit ed31d06

Browse files
committed
tests/settings: Simplify redirection test
1 parent 2675a6a commit ed31d06

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

tests/acceptance/settings-test.js

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

44
import percySnapshot from '@percy/ember';
@@ -15,6 +15,7 @@ module('Acceptance | /crates/:name/settings', function (hooks) {
1515
this.server.loadFixtures();
1616

1717
await visit('/crates/nanomsg/settings');
18+
assert.equal(currentURL(), '/crates/nanomsg/settings');
1819

1920
assert.dom('[data-test-owners] [data-test-owner-team]').exists({ count: 2 });
2021
assert.dom('[data-test-owners] [data-test-owner-user]').exists({ count: 2 });
@@ -27,20 +28,11 @@ module('Acceptance | /crates/:name/settings', function (hooks) {
2728
await a11yAudit(axeConfig);
2829
});
2930

30-
test('redirecting and listing crate owners', async function (assert) {
31+
test('/crates/:name/owners redirects to /crates/:name/settings', async function (assert) {
3132
this.server.loadFixtures();
3233

3334
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);
35+
assert.equal(currentURL(), '/crates/nanomsg/settings');
4436
});
4537

4638
test('attempting to add owner without username', async function (assert) {

0 commit comments

Comments
 (0)