File tree Expand file tree Collapse file tree 1 file changed +26
-14
lines changed
Expand file tree Collapse file tree 1 file changed +26
-14
lines changed Original file line number Diff line number Diff line change 11import React from 'react' ;
22import { Pagination } from '@patternfly/react-core' ;
3- import { BulkSelect } from '@patternfly/react-component-groups/dist/dynamic/BulkSelect ' ;
3+ import { BulkSelect , ResponsiveAction , ResponsiveActions } from '@patternfly/react-component-groups' ;
44import DataViewToolbar from '../../packages/module/dist/dynamic/DataViewToolbar' ;
55
66describe ( 'DataViewToolbar' , ( ) => {
77 it ( 'renders the data view toolbar' , ( ) => {
8- cy . mount ( < DataViewToolbar pagination = { < Pagination page = { 1 } perPage = { 10 } /> }
9- bulkSelect = {
10- < BulkSelect
11- canSelectAll
12- pageCount = { 5 }
13- totalCount = { 10 }
14- selectedCount = { 2 }
15- pageSelected = { false }
16- pagePartiallySelected = { true }
17- onSelect = { ( ) => null }
18- />
19- }
20- /> )
8+ cy . mount (
9+ < DataViewToolbar
10+ pagination = { < Pagination page = { 1 } perPage = { 10 } /> }
11+ bulkSelect = {
12+ < BulkSelect
13+ canSelectAll
14+ pageCount = { 5 }
15+ totalCount = { 10 }
16+ selectedCount = { 2 }
17+ pageSelected = { false }
18+ pagePartiallySelected = { true }
19+ onSelect = { ( ) => null }
20+ />
21+ }
22+ actions = {
23+ < ResponsiveActions breakpoint = "lg" >
24+ < ResponsiveAction isPersistent variant = "primary" > Persistent</ ResponsiveAction >
25+ < ResponsiveAction isPinned variant = "secondary" > Pinned</ ResponsiveAction >
26+ < ResponsiveAction > Action three</ ResponsiveAction >
27+ < ResponsiveAction > Action four</ ResponsiveAction >
28+ </ ResponsiveActions >
29+ }
30+ />
31+ )
2132 cy . get ( '[data-ouia-component-id="DataViewToolbar"]' ) . should ( 'exist' ) ;
2233 cy . get ( '[data-ouia-component-id="DataViewToolbar-pagination"]' ) . should ( 'exist' ) ;
2334 cy . get ( '[data-ouia-component-id="DataViewToolbar-bulk-select"]' ) . should ( 'exist' ) ;
35+ cy . get ( '[data-ouia-component-id="ResponsiveActions-menu"]' ) . should ( 'exist' ) ;
2436 } ) ;
2537} ) ;
You can’t perform that action at this time.
0 commit comments