Skip to content
Snippets Groups Projects
Unverified Commit 2e773875 authored by Nemanja Glumac's avatar Nemanja Glumac Committed by GitHub
Browse files

Repro #45036 and #44910: Multiple popovers can be opened simultaneously (#45369)

* Reproduce #45036

* Add repro for #44910
parent e52eaee0
No related branches found
No related tags found
No related merge requests found
import {
READ_ONLY_PERSONAL_COLLECTION_ID,
FIRST_COLLECTION_ID,
ORDERS_COUNT_QUESTION_ID,
ORDERS_QUESTION_ID,
} from "e2e/support/cypress_sample_instance_data";
import {
popover,
......@@ -688,6 +690,28 @@ describe("scenarios > collections > trash", () => {
assertTrashSelectedInNavigationSidebar();
});
});
it.skip("should open only one context menu at a time (metabase#44910)", () => {
cy.request("PUT", `/api/card/${ORDERS_QUESTION_ID}`, { archived: true });
cy.request("PUT", `/api/card/${ORDERS_COUNT_QUESTION_ID}`, {
archived: true,
});
cy.visit("/trash");
toggleEllipsisMenuFor("Orders");
cy.findAllByRole("dialog")
.should("have.length", 1)
.and("contain", "Move")
.and("contain", "Restore")
.and("contain", "Delete permanently");
toggleEllipsisMenuFor("Orders, Count");
cy.findAllByRole("dialog")
.should("have.length", 1)
.and("contain", "Move")
.and("contain", "Restore")
.and("contain", "Delete permanently");
});
});
function toggleEllipsisMenuFor(item) {
......
......@@ -917,6 +917,56 @@ describe("scenarios > question > notebook", { tags: "@slow" }, () => {
});
});
});
it.skip("should open only one bucketing popover at a time (metabase#45036)", () => {
visitQuestionAdhoc(
{
dataset_query: {
database: SAMPLE_DB_ID,
type: "query",
query: { "source-table": PRODUCTS_ID, aggregation: [["count"]] },
parameters: [],
},
},
{ mode: "notebook" },
);
getNotebookStep("summarize")
.findByText("Pick a column to group by")
.click();
popover()
.findByRole("option", { name: "Created At" })
.findByText("by month")
.click();
popover()
.last()
.within(() => {
cy.findByText("Year").should("be.visible");
cy.findByText("Hour of day").should("not.exist");
cy.findByText("More…").click();
cy.findByText("Hour of day").should("be.visible");
});
popover()
.first()
.findByRole("option", { name: "Price" })
.findByText("Auto bin")
.click();
popover()
.last()
.within(() => {
cy.findByText("Auto bin").should("be.visible");
cy.findByText("50 bins").should("be.visible");
cy.findByText("Don't bin").should("be.visible");
cy.findByText("Year").should("not.exist");
cy.findByText("Hour of day").should("not.exist");
cy.findByText("More…").should("not.exist");
});
});
});
function assertTableRowCount(expectedCount) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment