1
- import { click , fillIn , visit } from '@ember/test-helpers' ;
1
+ import { click , currentURL , fillIn , visit } from '@ember/test-helpers' ;
2
2
import { module , test } from 'qunit' ;
3
3
4
4
import percySnapshot from '@percy/ember' ;
@@ -15,6 +15,7 @@ module('Acceptance | /crates/:name/settings', function (hooks) {
15
15
this . server . loadFixtures ( ) ;
16
16
17
17
await visit ( '/crates/nanomsg/settings' ) ;
18
+ assert . equal ( currentURL ( ) , '/crates/nanomsg/settings' ) ;
18
19
19
20
assert . dom ( '[data-test-owners] [data-test-owner-team]' ) . exists ( { count : 2 } ) ;
20
21
assert . dom ( '[data-test-owners] [data-test-owner-user]' ) . exists ( { count : 2 } ) ;
@@ -27,20 +28,11 @@ module('Acceptance | /crates/:name/settings', function (hooks) {
27
28
await a11yAudit ( axeConfig ) ;
28
29
} ) ;
29
30
30
- test ( 'redirecting and listing crate owners ' , async function ( assert ) {
31
+ test ( '/crates/:name/owners redirects to /crates/:name/settings ' , async function ( assert ) {
31
32
this . server . loadFixtures ( ) ;
32
33
33
34
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' ) ;
44
36
} ) ;
45
37
46
38
test ( 'attempting to add owner without username' , async function ( assert ) {
0 commit comments