Skip to content

Commit ddc98cf

Browse files
authored
Merge pull request #24 from fhlavac/act
2 parents ab5fc67 + 6729cbd commit ddc98cf

File tree

10 files changed

+334
-207
lines changed

10 files changed

+334
-207
lines changed
Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,37 @@
11
import React from 'react';
22
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';
44
import DataViewToolbar from '../../packages/module/dist/dynamic/DataViewToolbar';
55

66
describe('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
});

0 commit comments

Comments
 (0)