File tree Expand file tree Collapse file tree 3 files changed +6
-22
lines changed Expand file tree Collapse file tree 3 files changed +6
-22
lines changed Original file line number Diff line number Diff line change @@ -16,10 +16,9 @@ module('Acceptance - Todo Index', function(hooks) {
16
16
server . shutdown ( ) ;
17
17
} ) ;
18
18
19
- test ( 'Should showo todos' , function ( assert ) {
20
- assert . expect ( 1 ) ;
21
- visit ( "/todos/remote" ) . then ( function ( ) {
22
- assert . equal ( findAll ( ".todo" ) . length , 10 ) ;
23
- } ) ;
19
+ test ( 'Should showo todos' , async function ( assert ) {
20
+ await visit ( "/todos/remote" ) ;
21
+
22
+ assert . equal ( findAll ( ".todo" ) . length , 10 )
24
23
} ) ;
25
24
} ) ;
Original file line number Diff line number Diff line change @@ -10,15 +10,15 @@ let todosTestLocal = function(name, f) {
10
10
test ( name , async function ( assert ) {
11
11
await visit ( "/todos/infinite" ) ;
12
12
13
- f ( assert ) ;
13
+ await f ( assert ) ;
14
14
} ) ;
15
15
} ;
16
16
17
17
let todosTestRemote = function ( name , f ) {
18
18
test ( name , async function ( assert ) {
19
19
await visit ( "/todos/infinite-remote" ) ;
20
20
21
- f ( assert ) ;
21
+ await f ( assert ) ;
22
22
} ) ;
23
23
} ;
24
24
@@ -28,7 +28,6 @@ let runTests = function(todosTest) {
28
28
} ) ;
29
29
30
30
todosTest ( "next page" , async function ( assert ) {
31
- assert . expect ( 2 ) ;
32
31
hasTodos ( assert , 10 ) ;
33
32
34
33
await click ( ".infinite .next a" ) ;
Original file line number Diff line number Diff line change @@ -48,17 +48,13 @@ let createTests = function(todosTest) {
48
48
} ) ;
49
49
50
50
todosTest ( "clicking page 2" , async function ( assert ) {
51
- assert . expect ( 5 ) ;
52
-
53
51
await clickPage ( 2 ) ;
54
52
hasTodos ( assert , 10 ) ;
55
53
hasActivePage ( assert , 2 ) ;
56
54
} ) ;
57
55
58
56
59
57
todosTest ( "clicking page 4" , async function ( assert ) {
60
- assert . expect ( 7 ) ;
61
-
62
58
await clickPage ( 4 ) ;
63
59
hasTodos ( assert , 3 ) ;
64
60
hasActivePage ( assert , 4 ) ;
@@ -82,8 +78,6 @@ let createTests = function(todosTest) {
82
78
// },2);
83
79
84
80
todosTest ( "next button - proper buttons visible" , function ( assert ) {
85
- assert . expect ( 6 ) ;
86
-
87
81
hasActivePage ( assert , 1 ) ;
88
82
hasButtons ( assert , {
89
83
prev : false ,
@@ -92,8 +86,6 @@ let createTests = function(todosTest) {
92
86
} ) ;
93
87
94
88
todosTest ( "click next" , async function ( assert ) {
95
- assert . expect ( 7 ) ;
96
-
97
89
await clickPage ( "next" ) ;
98
90
hasButtons ( assert , {
99
91
prev : true ,
@@ -104,8 +96,6 @@ let createTests = function(todosTest) {
104
96
} ) ;
105
97
106
98
todosTest ( "click prev" , async function ( assert ) {
107
- assert . expect ( 7 ) ;
108
-
109
99
await clickPage ( 2 ) ;
110
100
await clickPage ( "prev" ) ;
111
101
hasButtons ( assert , {
@@ -117,8 +107,6 @@ let createTests = function(todosTest) {
117
107
} ) ;
118
108
119
109
todosTest ( "click next on last page and not increment" , async function ( assert ) {
120
- //assert.expect(5);
121
-
122
110
await clickPage ( 4 ) ;
123
111
await clickPage ( "next" ) ;
124
112
await clickPage ( "next" ) ;
@@ -130,8 +118,6 @@ let createTests = function(todosTest) {
130
118
} ) ;
131
119
132
120
todosTest ( "click prev on first page and not decrement" , async function ( assert ) {
133
- assert . expect ( 5 ) ;
134
-
135
121
await clickPage ( "prev" ) ;
136
122
await clickPage ( "prev" ) ;
137
123
hasTodos ( assert , 10 ) ;
You can’t perform that action at this time.
0 commit comments