@@ -19,6 +19,7 @@ describe('pagination', () => {
1919 expect ( wrapper . classes ( ) ) . not . toContain ( 'pagination-lg' )
2020 expect ( wrapper . classes ( ) ) . not . toContain ( 'justify-content-center' )
2121 expect ( wrapper . classes ( ) ) . not . toContain ( 'justify-content-end' )
22+ expect ( wrapper . classes ( ) ) . not . toContain ( 'b-pagination-pills' )
2223 // Attributes
2324 expect ( wrapper . attributes ( 'role' ) ) . toBe ( 'menubar' )
2425 expect ( wrapper . attributes ( 'aria-disabled' ) ) . toBe ( 'false' )
@@ -164,6 +165,30 @@ describe('pagination', () => {
164165 wrapper . destroy ( )
165166 } )
166167
168+ it ( 'has class "b-pagination-pills" when prop pills is set' , async ( ) => {
169+ const wrapper = mount ( BPagination , {
170+ propsData : {
171+ pills : true ,
172+ totalRows : 1 ,
173+ perPage : 1
174+ }
175+ } )
176+ expect ( wrapper . is ( 'ul' ) ) . toBe ( true )
177+ // Classes
178+ expect ( wrapper . classes ( ) ) . toContain ( 'pagination' )
179+ expect ( wrapper . classes ( ) ) . toContain ( 'b-pagination' )
180+ expect ( wrapper . classes ( ) ) . toContain ( 'b-pagination-pills' )
181+ expect ( wrapper . classes ( ) ) . not . toContain ( 'pagination-lg' )
182+ expect ( wrapper . classes ( ) ) . not . toContain ( 'justify-content-center' )
183+ expect ( wrapper . classes ( ) ) . not . toContain ( 'justify-content-end' )
184+ // Attributes
185+ expect ( wrapper . attributes ( 'role' ) ) . toBe ( 'menubar' )
186+ expect ( wrapper . attributes ( 'aria-disabled' ) ) . toBe ( 'false' )
187+ expect ( wrapper . attributes ( 'aria-label' ) ) . toBe ( 'Pagination' )
188+
189+ wrapper . destroy ( )
190+ } )
191+
167192 it ( 'has class "pagination-sm" when prop size="sm"' , async ( ) => {
168193 const wrapper = mount ( BPagination , {
169194 propsData : {
@@ -180,6 +205,7 @@ describe('pagination', () => {
180205 expect ( wrapper . classes ( ) ) . not . toContain ( 'pagination-lg' )
181206 expect ( wrapper . classes ( ) ) . not . toContain ( 'justify-content-center' )
182207 expect ( wrapper . classes ( ) ) . not . toContain ( 'justify-content-end' )
208+ expect ( wrapper . classes ( ) ) . not . toContain ( 'b-pagination-pills' )
183209 // Attributes
184210 expect ( wrapper . attributes ( 'role' ) ) . toBe ( 'menubar' )
185211 expect ( wrapper . attributes ( 'aria-disabled' ) ) . toBe ( 'false' )
@@ -204,6 +230,7 @@ describe('pagination', () => {
204230 expect ( wrapper . classes ( ) ) . toContain ( 'pagination-lg' )
205231 expect ( wrapper . classes ( ) ) . not . toContain ( 'justify-content-center' )
206232 expect ( wrapper . classes ( ) ) . not . toContain ( 'justify-content-end' )
233+ expect ( wrapper . classes ( ) ) . not . toContain ( 'b-pagination-pills' )
207234 // Attributes
208235 expect ( wrapper . attributes ( 'role' ) ) . toBe ( 'menubar' )
209236 expect ( wrapper . attributes ( 'aria-disabled' ) ) . toBe ( 'false' )
@@ -229,6 +256,7 @@ describe('pagination', () => {
229256 expect ( wrapper . classes ( ) ) . not . toContain ( 'pagination-lg' )
230257 expect ( wrapper . classes ( ) ) . not . toContain ( 'justify-content-center' )
231258 expect ( wrapper . classes ( ) ) . not . toContain ( 'justify-content-end' )
259+ expect ( wrapper . classes ( ) ) . not . toContain ( 'b-pagination-pills' )
232260 // Attributes
233261 expect ( wrapper . attributes ( 'role' ) ) . toBe ( 'menubar' )
234262 expect ( wrapper . attributes ( 'aria-disabled' ) ) . toBe ( 'false' )
@@ -253,6 +281,7 @@ describe('pagination', () => {
253281 expect ( wrapper . classes ( ) ) . not . toContain ( 'pagination-lg' )
254282 expect ( wrapper . classes ( ) ) . toContain ( 'justify-content-center' )
255283 expect ( wrapper . classes ( ) ) . not . toContain ( 'justify-content-end' )
284+ expect ( wrapper . classes ( ) ) . not . toContain ( 'b-pagination-pills' )
256285 // Attributes
257286 expect ( wrapper . attributes ( 'role' ) ) . toBe ( 'menubar' )
258287 expect ( wrapper . attributes ( 'aria-disabled' ) ) . toBe ( 'false' )
@@ -277,6 +306,7 @@ describe('pagination', () => {
277306 expect ( wrapper . classes ( ) ) . not . toContain ( 'pagination-lg' )
278307 expect ( wrapper . classes ( ) ) . not . toContain ( 'justify-content-center' )
279308 expect ( wrapper . classes ( ) ) . toContain ( 'justify-content-end' )
309+ expect ( wrapper . classes ( ) ) . not . toContain ( 'b-pagination-pills' )
280310 // Attributes
281311 expect ( wrapper . attributes ( 'role' ) ) . toBe ( 'menubar' )
282312 expect ( wrapper . attributes ( 'aria-disabled' ) ) . toBe ( 'false' )
@@ -301,6 +331,7 @@ describe('pagination', () => {
301331 expect ( wrapper . classes ( ) ) . not . toContain ( 'pagination-lg' )
302332 expect ( wrapper . classes ( ) ) . not . toContain ( 'justify-content-center' )
303333 expect ( wrapper . classes ( ) ) . toContain ( 'justify-content-end' )
334+ expect ( wrapper . classes ( ) ) . not . toContain ( 'b-pagination-pills' )
304335 // Attributes
305336 expect ( wrapper . attributes ( 'role' ) ) . toBe ( 'menubar' )
306337 expect ( wrapper . attributes ( 'aria-disabled' ) ) . toBe ( 'false' )
@@ -329,6 +360,7 @@ describe('pagination', () => {
329360 expect ( wrapper . classes ( ) ) . not . toContain ( 'pagination-lg' )
330361 expect ( wrapper . classes ( ) ) . not . toContain ( 'justify-content-center' )
331362 expect ( wrapper . classes ( ) ) . not . toContain ( 'justify-content-end' )
363+ expect ( wrapper . classes ( ) ) . not . toContain ( 'b-pagination-pills' )
332364
333365 expect ( wrapper . findAll ( 'li.flex-fill' ) . length ) . toBe ( 8 )
334366
0 commit comments