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 1
1
import React from 'react' ;
2
2
import { 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' ;
4
4
import DataViewToolbar from '../../packages/module/dist/dynamic/DataViewToolbar' ;
5
5
6
6
describe ( 'DataViewToolbar' , ( ) => {
7
7
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
+ )
21
32
cy . get ( '[data-ouia-component-id="DataViewToolbar"]' ) . should ( 'exist' ) ;
22
33
cy . get ( '[data-ouia-component-id="DataViewToolbar-pagination"]' ) . should ( 'exist' ) ;
23
34
cy . get ( '[data-ouia-component-id="DataViewToolbar-bulk-select"]' ) . should ( 'exist' ) ;
35
+ cy . get ( '[data-ouia-component-id="ResponsiveActions-menu"]' ) . should ( 'exist' ) ;
24
36
} ) ;
25
37
} ) ;
You can’t perform that action at this time.
0 commit comments