@@ -5,6 +5,7 @@ import { click, fillIn, currentURL, currentRouteName, visit } from '@ember/test-
5
5
import a11yAudit from 'ember-a11y-testing/test-support/audit' ;
6
6
import axeConfig from '../axe-config' ;
7
7
import setupMirage from '../helpers/setup-mirage' ;
8
+ import { title } from '../helpers/dom' ;
8
9
import { percySnapshot } from 'ember-percy' ;
9
10
10
11
module ( 'Acceptance | crate page' , function ( hooks ) {
@@ -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 - Cargo: packages for Rust' ) ;
70
+ assert . equal ( title ( ) , 'nanomsg - Cargo: packages for Rust' ) ;
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 - Cargo: packages for Rust' ) ;
82
+ assert . equal ( title ( ) , 'nanomsg - Cargo: packages for Rust' ) ;
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 - Cargo: packages for Rust' ) ;
97
+ assert . equal ( title ( ) , 'nanomsg - Cargo: packages for Rust' ) ;
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 - Cargo: packages for Rust' ) ;
112
+ assert . equal ( title ( ) , 'nanomsg - Cargo: packages for Rust' ) ;
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