File tree Expand file tree Collapse file tree 1 file changed +31
-1
lines changed
tests/integration/components Expand file tree Collapse file tree 1 file changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ module('Integration | Component | es-pagination', function (hooks) {
8
8
9
9
test ( 'it renders' , async function ( assert ) {
10
10
await render ( hbs `
11
- <EsPagination>
11
+ <EsPagination @showPrevious={{true}} @showNext={{true}} >
12
12
<:previous>
13
13
Newer articles
14
14
</:previous>
@@ -20,4 +20,34 @@ module('Integration | Component | es-pagination', function (hooks) {
20
20
21
21
assert . dom ( this . element ) . hasText ( 'Newer articles Older articles' ) ;
22
22
} ) ;
23
+ test ( 'it renders only previous' , async function ( assert ) {
24
+ await render ( hbs `
25
+ <EsPagination @showPrevious={{true}} @showNext={{false}}>
26
+ <:previous>
27
+ Newer articles
28
+ </:previous>
29
+ <:next>
30
+ Older articles
31
+ </:next>
32
+ </EsPagination>
33
+ ` ) ;
34
+
35
+ assert . dom ( this . element ) . hasText ( 'Newer articles' ) ;
36
+ assert . dom ( this . element ) . doesNotIncludeText ( 'Older articles' ) ;
37
+ } ) ;
38
+ test ( 'it renders only next' , async function ( assert ) {
39
+ await render ( hbs `
40
+ <EsPagination @showPrevious={{false}} @showNext={{true}}>
41
+ <:previous>
42
+ Newer articles
43
+ </:previous>
44
+ <:next>
45
+ Older articles
46
+ </:next>
47
+ </EsPagination>
48
+ ` ) ;
49
+
50
+ assert . dom ( this . element ) . hasText ( 'Older articles' ) ;
51
+ assert . dom ( this . element ) . doesNotIncludeText ( 'Newer articles' ) ;
52
+ } ) ;
23
53
} ) ;
You can’t perform that action at this time.
0 commit comments