@@ -89,6 +89,36 @@ define([
89
89
. end ( ) ;
90
90
} ,
91
91
92
+ 'pagination dropdown tests' : function ( ) {
93
+ return this . remote
94
+ . setFindTimeout ( intern . config . wc . pageLoadTimeout )
95
+ . get ( require . toUrl ( url ) )
96
+ . findByCssSelector ( '.js-dropdown-pagination' ) . isDisplayed ( )
97
+ . then ( function ( isDisplayed ) {
98
+ assert . equal ( isDisplayed , true , 'pagination dropdown container is visible.' ) ;
99
+ } )
100
+ . end ( )
101
+ . findByCssSelector ( '.js-dropdown-pagination .js-dropdown-toggle' ) . click ( )
102
+ . end ( )
103
+ . findByCssSelector ( '.js-dropdown-pagination' ) . getAttribute ( 'class' )
104
+ . then ( function ( className ) {
105
+ assert . include ( className , 'is-active' , 'clicking dropdown adds is-active class' ) ;
106
+ } )
107
+ . end ( )
108
+ . findByCssSelector ( '.js-dropdown-pagination .js-dropdown-options' ) . isDisplayed ( )
109
+ . then ( function ( isDisplayed ) {
110
+ assert . equal ( isDisplayed , true , 'dropdown options are visible.' ) ;
111
+ } )
112
+ . end ( )
113
+ . findByCssSelector ( '.js-dropdown-pagination li.Dropdown-item:nth-child(3) > a:nth-child(1)' ) . click ( )
114
+ . end ( )
115
+ . findByCssSelector ( '.js-dropdown-pagination .Dropdown-label' ) . getVisibleText ( )
116
+ . then ( function ( text ) {
117
+ assert . include ( text , 'Show 100' , 'Clicking first option updated dropdown label' ) ;
118
+ } )
119
+ . end ( ) ;
120
+ } ,
121
+
92
122
'pagination dropdown tests' : function ( ) {
93
123
return this . remote
94
124
. setFindTimeout ( intern . config . wc . pageLoadTimeout )
@@ -123,5 +153,6 @@ define([
123
153
} )
124
154
. end ( ) ;
125
155
}
156
+
126
157
} ) ;
127
158
} ) ;
0 commit comments