Skip to content
Snippets Groups Projects
Unverified Commit f0e63361 authored by Alexander Polyankin's avatar Alexander Polyankin Committed by GitHub
Browse files

Add repro for "Join UI picks the first schema even if a different one is selected" (#44837)

parent 8651009e
No related branches found
No related tags found
No related merge requests found
......@@ -5,8 +5,9 @@ import {
ORDERS_MODEL_ID,
SECOND_COLLECTION_ID,
} from "e2e/support/cypress_sample_instance_data";
import type { StructuredQuestionDetails } from "e2e/support/helpers";
import {
join,
type StructuredQuestionDetails,
createQuestion,
entityPickerModal,
entityPickerModalItem,
......@@ -151,17 +152,19 @@ describe("scenarios > notebook > data source", () => {
});
it(
"should correctly display a table from a multi-schema database (metabase#39807)",
"should correctly display a table from a multi-schema database (metabase#39807,metabase#11958)",
{ tags: "@external" },
() => {
const dialect = "postgres";
const TEST_TABLE = "multi_schema";
const testTable1 = "multi_schema";
const testTable2 = "many_data_types";
const dbName = "Writable Postgres12";
const schemaName = "Wild";
const tableName = "Animals";
resetTestTable({ type: dialect, table: TEST_TABLE });
resetTestTable({ type: dialect, table: testTable1 });
resetTestTable({ type: dialect, table: testTable2 });
restore(`${dialect}-writable`);
cy.signInAsAdmin();
......@@ -188,12 +191,36 @@ describe("scenarios > notebook > data source", () => {
assertDataPickerEntitySelected(2, tableName);
entityPickerModalTab("Recents").click();
cy.contains("button", "Animals")
.should("exist")
.and("contain.text", tableName)
.and("have.attr", "aria-selected", "true");
entityPickerModalTab("Tables").click();
cy.findByText(dbName).click();
cy.findByText(schemaName).click();
cy.findByText(tableName).click();
});
cy.log("select a table from the second schema");
join();
entityPickerModal().within(() => {
entityPickerModalTab("Tables").click();
cy.findByText("Public").click();
cy.findByText("Many Data Types").click();
});
popover().findByText("Name").click();
popover().findByText("Text").click();
cy.log("select a table from the third schema");
join();
entityPickerModal().within(() => {
entityPickerModalTab("Tables").click();
cy.findByText("Domestic").click();
cy.findByText("Animals").click();
});
popover().findByText("Name").click();
popover().findByText("Name").click();
},
);
......
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