From 42fcc78901d9ce7bbc1b56359d09f08a24249dd3 Mon Sep 17 00:00:00 2001 From: Ryan Laurie <30528226+iethree@users.noreply.github.com> Date: Mon, 14 Aug 2023 07:32:07 -0600 Subject: [PATCH] add column rename via popover test (#33066) --- .../table-column-settings.cy.spec.js | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/e2e/test/scenarios/visualizations/table-column-settings.cy.spec.js b/e2e/test/scenarios/visualizations/table-column-settings.cy.spec.js index 543368eec90..ce2c683637f 100644 --- a/e2e/test/scenarios/visualizations/table-column-settings.cy.spec.js +++ b/e2e/test/scenarios/visualizations/table-column-settings.cy.spec.js @@ -1,4 +1,4 @@ -import { restore } from "e2e/support/helpers"; +import { popover, restore } from "e2e/support/helpers"; import { SAMPLE_DATABASE } from "e2e/support/cypress_sample_database"; const { ORDERS_ID, ORDERS, PRODUCTS_ID, PRODUCTS } = SAMPLE_DATABASE; @@ -171,6 +171,26 @@ describe("scenarios > visualizations > table column settings", () => { visualization().findByText("Tax").should("exist"); }); + it("should be able to rename table columns via popover", () => { + cy.createQuestion(tableQuestion, { visitQuestion: true }); + + cy.findByTestId("TableInteractive-root").within(() => { + cy.findByText("Product ID").click(); + }); + + popover().within(() => { + cy.icon("gear").click(); + cy.findByDisplayValue("Product ID").clear().type("prod_id"); + }); + + // clicking outside of the popover to close it + cy.findByTestId("app-bar").click(); + + cy.findByTestId("TableInteractive-root").within(() => { + cy.findByText("prod_id"); + }); + }); + it("should be able to show and hide table fields with in a join", () => { cy.createQuestion(tableQuestionWithJoin, { visitQuestion: true }); openSettings(); -- GitLab