@@ -93,7 +93,7 @@ moduleFor('ember-testing Acceptance', class extends AutobootApplicationTestCase
93
93
window . visit ( '/posts' ) . then ( ( ) => {
94
94
assert . equal ( this . currentRoute , 'posts' , 'Successfully visited posts route' ) ;
95
95
assert . equal ( window . currentURL ( ) , '/posts' , 'posts URL is correct' ) ;
96
- return window . click ( 'a:contains("Comments") ' ) ;
96
+ return window . click ( 'div#comments-link a ' ) ;
97
97
} ) . then ( ( ) => {
98
98
assert . equal ( this . currentRoute , 'comments' , 'visit chained with click' ) ;
99
99
return window . fillIn ( '.ember-text-field' , 'yeah' ) ;
@@ -112,13 +112,13 @@ moduleFor('ember-testing Acceptance', class extends AutobootApplicationTestCase
112
112
assert . expect ( 7 ) ;
113
113
114
114
window . visit ( '/posts' )
115
- . click ( 'a:first ' , '#comments-link' )
115
+ . click ( 'a' , '#comments-link' )
116
116
. fillIn ( '.ember-text-field' , 'hello' )
117
117
. then ( ( ) => {
118
118
assert . equal ( this . currentRoute , 'comments' , 'Successfully visited comments route' ) ;
119
119
assert . equal ( window . currentURL ( ) , '/comments' , 'Comments URL is correct' ) ;
120
120
assert . equal ( document . querySelector ( '.ember-text-field' ) . value , 'hello' , 'Fillin successfully works' ) ;
121
- window . find ( '.ember-text-field' ) . one ( 'keypress' , e => {
121
+ window . find ( '.ember-text-field' ) [ 0 ] . addEventListener ( 'keypress' , e => {
122
122
assert . equal ( e . keyCode , 13 , 'keyevent chained with correct keyCode.' ) ;
123
123
assert . equal ( e . which , 13 , 'keyevent chained with correct which.' ) ;
124
124
} ) ;
@@ -136,14 +136,14 @@ moduleFor('ember-testing Acceptance', class extends AutobootApplicationTestCase
136
136
137
137
window . visit ( '/posts' ) ;
138
138
139
- window . click ( 'a:first ' , '#comments-link' ) ;
139
+ window . click ( 'a' , '#comments-link' ) ;
140
140
141
141
window . fillIn ( '.ember-text-field' , 'hello' ) ;
142
142
143
143
window . andThen ( ( ) => {
144
144
assert . equal ( this . currentRoute , 'comments' , 'Successfully visited comments route' ) ;
145
145
assert . equal ( window . currentURL ( ) , '/comments' , 'Comments URL is correct' ) ;
146
- assert . equal ( window . find ( '.ember-text-field' ) . val ( ) , 'hello' , 'Fillin successfully works' ) ;
146
+ assert . equal ( window . find ( '.ember-text-field' ) [ 0 ] . value , 'hello' , 'Fillin successfully works' ) ;
147
147
} ) ;
148
148
149
149
window . visit ( '/posts' ) ;
@@ -160,14 +160,14 @@ moduleFor('ember-testing Acceptance', class extends AutobootApplicationTestCase
160
160
window . visit ( '/posts' ) ;
161
161
162
162
window . andThen ( ( ) => {
163
- window . click ( 'a:first ' , '#comments-link' ) ;
163
+ window . click ( 'a' , '#comments-link' ) ;
164
164
window . fillIn ( '.ember-text-field' , 'hello' ) ;
165
165
} ) ;
166
166
167
167
window . andThen ( ( ) => {
168
168
assert . equal ( this . currentRoute , 'comments' , 'Successfully visited comments route' ) ;
169
169
assert . equal ( window . currentURL ( ) , '/comments' , 'Comments URL is correct' ) ;
170
- assert . equal ( window . find ( '.ember-text-field' ) . val ( ) , 'hello' , 'Fillin successfully works' ) ;
170
+ assert . equal ( window . find ( '.ember-text-field' ) [ 0 ] . value , 'hello' , 'Fillin successfully works' ) ;
171
171
} ) ;
172
172
173
173
window . visit ( '/posts' ) ;
@@ -184,14 +184,14 @@ moduleFor('ember-testing Acceptance', class extends AutobootApplicationTestCase
184
184
window . visit ( '/posts' ) ;
185
185
186
186
window . andThen ( ( ) => {
187
- window . click ( 'a:first ' , '#comments-link' ) ;
187
+ window . click ( 'a' , '#comments-link' ) ;
188
188
189
189
window . fillIn ( '.ember-text-field' , 'hello' ) ;
190
190
window . fillIn ( '.ember-text-field' , 'goodbye' ) ;
191
191
} ) ;
192
192
193
193
window . andThen ( ( ) => {
194
- assert . equal ( window . find ( '.ember-text-field' ) . val ( ) , 'goodbye' , 'Fillin successfully works' ) ;
194
+ assert . equal ( window . find ( '.ember-text-field' ) [ 0 ] . value , 'goodbye' , 'Fillin successfully works' ) ;
195
195
assert . equal ( this . currentRoute , 'comments' , 'Successfully visited comments route' ) ;
196
196
assert . equal ( window . currentURL ( ) , '/comments' , 'Comments URL is correct' ) ;
197
197
} ) ;
@@ -201,7 +201,7 @@ moduleFor('ember-testing Acceptance', class extends AutobootApplicationTestCase
201
201
assert . expect ( 5 ) ;
202
202
203
203
window . visit ( '/posts' ) . then ( ( ) => {
204
- window . click ( 'a:first ' , '#comments-link' ) ;
204
+ window . click ( 'a' , '#comments-link' ) ;
205
205
} ) ;
206
206
207
207
window . andThen ( ( ) => {
@@ -211,7 +211,7 @@ moduleFor('ember-testing Acceptance', class extends AutobootApplicationTestCase
211
211
window . andThen ( ( ) => {
212
212
assert . equal ( this . currentRoute , 'comments' , 'Successfully visited comments route' ) ;
213
213
assert . equal ( window . currentURL ( ) , '/comments' , 'Comments URL is correct' ) ;
214
- assert . equal ( window . find ( '.ember-text-field' ) . val ( ) , 'hello' , 'Fillin successfully works' ) ;
214
+ assert . equal ( window . find ( '.ember-text-field' ) [ 0 ] . value , 'hello' , 'Fillin successfully works' ) ;
215
215
} ) ;
216
216
217
217
window . visit ( '/posts' ) ;
0 commit comments