File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -66,25 +66,29 @@ module('Acceptance | crates page', function (hooks) {
66
66
assert . dom ( '[data-test-crates-nav] [data-test-total-rows]' ) . hasText ( `${ total } ` ) ;
67
67
} ) ;
68
68
69
- test ( 'crates default sort is alphabetical ' , async function ( assert ) {
69
+ test ( 'crates default sort is by recent downloads ' , async function ( assert ) {
70
70
this . server . loadFixtures ( ) ;
71
71
72
72
await visit ( '/crates' ) ;
73
73
74
- assert . dom ( '[data-test-crates-sort] [data-test-current-order]' ) . hasText ( 'Alphabetical ' ) ;
74
+ assert . dom ( '[data-test-crates-sort] [data-test-current-order]' ) . hasText ( 'Recent Downloads ' ) ;
75
75
} ) ;
76
76
77
77
test ( 'downloads appears for each crate on crate list' , async function ( assert ) {
78
78
this . server . loadFixtures ( ) ;
79
79
80
80
await visit ( '/crates' ) ;
81
- assert . dom ( '[data-test-crate-row="0"] [data-test-downloads]' ) . hasText ( 'All-Time: 497' ) ;
81
+
82
+ let formatted = Number ( 21_573 ) . toLocaleString ( ) ;
83
+ assert . dom ( '[data-test-crate-row="0"] [data-test-downloads]' ) . hasText ( `All-Time: ${ formatted } ` ) ;
82
84
} ) ;
83
85
84
86
test ( 'recent downloads appears for each crate on crate list' , async function ( assert ) {
85
87
this . server . loadFixtures ( ) ;
86
88
87
89
await visit ( '/crates' ) ;
88
- assert . dom ( '[data-test-crate-row="0"] [data-test-recent-downloads]' ) . hasText ( 'Recent: 497' ) ;
90
+
91
+ let formatted = Number ( 2000 ) . toLocaleString ( ) ;
92
+ assert . dom ( '[data-test-crate-row="0"] [data-test-recent-downloads]' ) . hasText ( `Recent: ${ formatted } ` ) ;
89
93
} ) ;
90
94
} ) ;
You can’t perform that action at this time.
0 commit comments