@@ -4,6 +4,7 @@ import { setupApplicationTest } from 'ember-qunit';
4
4
import { click , fillIn , currentURL , currentRouteName , visit } from '@ember/test-helpers' ;
5
5
import a11yAudit from 'ember-a11y-testing/test-support/audit' ;
6
6
import axeConfig from '../axe-config' ;
7
+ import { title } from '../helpers/dom' ;
7
8
import setupMirage from '../helpers/setup-mirage' ;
8
9
import { percySnapshot } from 'ember-percy' ;
9
10
@@ -66,7 +67,7 @@ module('Acceptance | crate page', function(hooks) {
66
67
await click ( '[data-test-just-updated] [data-test-crate-link="0"]' ) ;
67
68
68
69
assert . equal ( currentURL ( ) , '/crates/nanomsg' ) ;
69
- assert . equal ( document . title , 'nanomsg - crates.io: Rust Package Registry' ) ;
70
+ assert . equal ( title ( ) , 'nanomsg - crates.io: Rust Package Registry' ) ;
70
71
} ) ;
71
72
72
73
test ( 'visiting /crates/nanomsg' , async function ( assert ) {
@@ -78,7 +79,7 @@ module('Acceptance | crate page', function(hooks) {
78
79
79
80
assert . equal ( currentURL ( ) , '/crates/nanomsg' ) ;
80
81
assert . equal ( currentRouteName ( ) , 'crate.index' ) ;
81
- assert . equal ( document . title , 'nanomsg - crates.io: Rust Package Registry' ) ;
82
+ assert . equal ( title ( ) , 'nanomsg - crates.io: Rust Package Registry' ) ;
82
83
83
84
assert . dom ( '[data-test-heading] [data-test-crate-name]' ) . hasText ( 'nanomsg' ) ;
84
85
assert . dom ( '[data-test-heading] [data-test-crate-version]' ) . hasText ( '0.6.1' ) ;
@@ -93,7 +94,7 @@ module('Acceptance | crate page', function(hooks) {
93
94
94
95
assert . equal ( currentURL ( ) , '/crates/nanomsg/' ) ;
95
96
assert . equal ( currentRouteName ( ) , 'crate.index' ) ;
96
- assert . equal ( document . title , 'nanomsg - crates.io: Rust Package Registry' ) ;
97
+ assert . equal ( title ( ) , 'nanomsg - crates.io: Rust Package Registry' ) ;
97
98
98
99
assert . dom ( '[data-test-heading] [data-test-crate-name]' ) . hasText ( 'nanomsg' ) ;
99
100
assert . dom ( '[data-test-heading] [data-test-crate-version]' ) . hasText ( '0.6.1' ) ;
@@ -108,7 +109,7 @@ module('Acceptance | crate page', function(hooks) {
108
109
109
110
assert . equal ( currentURL ( ) , '/crates/nanomsg/0.6.0' ) ;
110
111
assert . equal ( currentRouteName ( ) , 'crate.version' ) ;
111
- assert . equal ( document . title , 'nanomsg - crates.io: Rust Package Registry' ) ;
112
+ assert . equal ( title ( ) , 'nanomsg - crates.io: Rust Package Registry' ) ;
112
113
113
114
assert . dom ( '[data-test-heading] [data-test-crate-name]' ) . hasText ( 'nanomsg' ) ;
114
115
assert . dom ( '[data-test-heading] [data-test-crate-version]' ) . hasText ( '0.6.0' ) ;
0 commit comments