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

Add E2E test for joins on multiple fields (#17878)

parent 277e83f4
No related branches found
No related tags found
No related merge requests found
import { restore, openProductsTable, popover } from "__support__/e2e/cypress";
import {
restore,
openOrdersTable,
openProductsTable,
popover,
} from "__support__/e2e/cypress";
import { SAMPLE_DATASET } from "__support__/e2e/cypress_sample_dataset";
const { ORDERS, ORDERS_ID, PRODUCTS } = SAMPLE_DATASET;
......@@ -40,4 +45,39 @@ describe("scenarios > question > joined questions", () => {
expect(xhr.response.body.error).not.to.exist;
});
});
it("should allow joins on multiple dimensions", () => {
cy.intercept("POST", "/api/dataset").as("dataset");
openOrdersTable({ mode: "notebook" });
cy.findByText("Join data").click();
popover()
.findByText("Products")
.click();
cy.findByTestId("step-join-0-0").within(() => {
cy.icon("add").click();
});
popover()
.findByText("Created At")
.click();
popover()
.findByText("Created At")
.click();
cy.icon("join_left_outer")
.first()
.click();
popover()
.findByText("Inner join")
.click();
cy.button("Visualize").click();
cy.wait("@dataset");
// 415 rows mean the join is done correctly,
// (join on product's FK + join on the same "created_at" field)
cy.findByText("Showing 415 rows");
});
});
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