Skip to content
Snippets Groups Projects
Unverified Commit a721a558 authored by Anton Kulyk's avatar Anton Kulyk Committed by GitHub
Browse files

Fix "select all" button in collections footer (#15670) (#15676)

* Enable test reproducing #14705

* Test can deselect all items using bulk actions

* Fix bulk select button in collections footer

* Group bulk select tests, use data-testid

* Group bulk actions tests into one
parent 8c3201e4
Branches
Tags
No related merge requests found
......@@ -180,6 +180,8 @@ export default class CollectionContent extends React.Component {
</Box>
<BulkActions
selected={selected}
onSelectAll={this.props.onSelectAll}
onSelectNone={this.props.onSelectNone}
handleBulkArchive={this.handleBulkArchive}
handleBulkMoveStart={this.handleBulkMoveStart}
handleBulkMove={this.handleBulkMove}
......
......@@ -29,6 +29,7 @@ const BulkActionBar = ({ children, showing }) => (
opacity,
transform: `translateY(${translateY}px)`,
}}
data-testid="bulk-action-bar"
>
<Card>{children}</Card>
</FixedBottomBar>
......
......@@ -491,13 +491,20 @@ describe("scenarios > collection_defaults", () => {
cy.findByText("First Collection");
});
it.skip("should let be possible to select all items using checkbox (metabase#14705)", () => {
it("should be possible to apply bulk selection to items (metabase#14705)", () => {
cy.visit("/collection/root");
selectItemUsingCheckbox("Orders");
cy.findByText("1 item selected").should("be.visible");
// Select all
cy.icon("dash").click();
cy.icon("dash").should("not.exist");
cy.findByText("4 items selected");
// Deselect all
cy.findByTestId("bulk-action-bar").within(() => {
cy.icon("check").click();
});
cy.icon("check").should("not.exist");
cy.findByTestId("bulk-action-bar").should("not.be.visible");
});
it.skip("should be possible to select pinned item using checkbox (metabase#15338)", () => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment