diff --git a/frontend/test/metabase/scenarios/admin/settings/localization.cy.spec.js b/frontend/test/metabase/scenarios/admin/settings/localization.cy.spec.js index c05e33875e5efa1a58929dedaafb5fda4751f2fe..4910fb5f1210d428ba80c3e89e08b1627b95b117 100644 --- a/frontend/test/metabase/scenarios/admin/settings/localization.cy.spec.js +++ b/frontend/test/metabase/scenarios/admin/settings/localization.cy.spec.js @@ -3,7 +3,7 @@ import { SAMPLE_DATASET } from "__support__/e2e/cypress_sample_dataset"; const { ORDERS, ORDERS_ID } = SAMPLE_DATASET; -describe("scenarios > admin > permissions", () => { +describe("scenarios > admin > localization", () => { beforeEach(() => { restore(); cy.signInAsAdmin(); diff --git a/frontend/test/metabase/scenarios/admin/settings/settings.cy.spec.js b/frontend/test/metabase/scenarios/admin/settings/settings.cy.spec.js index 82fbc303cc7fc6c7c3d9020742f079880763440f..750680acecb1daf7e63dd80189120f48da0f833b 100644 --- a/frontend/test/metabase/scenarios/admin/settings/settings.cy.spec.js +++ b/frontend/test/metabase/scenarios/admin/settings/settings.cy.spec.js @@ -4,6 +4,9 @@ import { version, popover, } from "__support__/e2e/cypress"; +import { SAMPLE_DATASET } from "__support__/e2e/cypress_sample_dataset"; + +const { ORDERS } = SAMPLE_DATASET; describe("scenarios > admin > settings", () => { beforeEach(() => { @@ -179,6 +182,29 @@ describe("scenarios > admin > settings", () => { cy.contains(/^February 11, 2019, 9:40 PM$/); }); + it("should correctly apply the globalized date formats (metabase#11394)", () => { + cy.server(); + cy.route("PUT", "**/custom-formatting").as("saveFormatting"); + + cy.request("PUT", `/api/field/${ORDERS.CREATED_AT}`, { + semantic_type: null, + }); + + cy.visit("/admin/settings/localization"); + + cy.contains("Date style") + .closest("li") + .find(".AdminSelect") + .first() + .click(); + cy.findByText("2018/1/7").click(); + cy.contains("17:24 (24-hour clock)").click(); + cy.wait("@saveFormatting"); + + openOrdersTable(); + cy.contains(/^2019\/2\/11, 21:40$/); + }); + it("should search for and select a new timezone", () => { cy.server(); cy.route("PUT", "**/report-timezone").as("reportTimezone");