diff --git a/e2e/support/helpers/e2e-command-palette-helpers.js b/e2e/support/helpers/e2e-command-palette-helpers.js index 5541c93df800f2da266f8fae745c7fe2b0e53b37..ba049720f06f869449bde09400b30ade5cac6ade 100644 --- a/e2e/support/helpers/e2e-command-palette-helpers.js +++ b/e2e/support/helpers/e2e-command-palette-helpers.js @@ -1,5 +1,5 @@ export const commandPalette = () => cy.findByTestId("command-palette"); -export const openCommandPalette = () => cy.get("body").type("{ctrl+k}"); +export const openCommandPalette = () => cy.get("body").type("{ctrl+k}{cmd+k}"); export const closeCommandPalette = () => cy.get("body").type("{esc}"); export const commandPaletteSearch = () => cy.findByPlaceholderText("Jump to..."); diff --git a/e2e/test/scenarios/onboarding/command-palette.cy.spec.js b/e2e/test/scenarios/onboarding/command-palette.cy.spec.js index 47ae0cf5b85543b71f212ead41627a18c38f5b11..28f56cec15a821051df69538758215d204094cbf 100644 --- a/e2e/test/scenarios/onboarding/command-palette.cy.spec.js +++ b/e2e/test/scenarios/onboarding/command-palette.cy.spec.js @@ -43,16 +43,16 @@ describe("command palette", () => { cy.log("Should search entities and docs"); commandPaletteSearch().type("Orders, Count"); - cy.findByRole("option", { name: /Orders, Count/ }).should("exist"); + cy.findByRole("option", { name: "Orders, Count" }).should("exist"); cy.findByText('Search documentation for "Orders, Count"').should("exist"); // Since the command palette list is virtualized, we will search for a few // to ensure they're reachable commandPaletteSearch().clear().type("People"); - cy.findByRole("option", { name: /People/ }).should("exist"); + cy.findByRole("option", { name: "People" }).should("exist"); commandPaletteSearch().clear().type("Uploads"); - cy.findByRole("option", { name: /Settings - Uploads/ }).should("exist"); + cy.findByRole("option", { name: "Settings - Uploads" }).should("exist"); }); cy.log("We can close the command palette using escape"); @@ -67,7 +67,7 @@ describe("command palette", () => { commandPalette().within(() => { commandPaletteSearch().type("Nested"); - cy.findByRole("option", { name: /Enable Nested Queries/ }).click(); + cy.findByRole("option", { name: "Enable Nested Queries" }).click(); }); cy.findByTestId("enable-nested-queries-setting").should("be.visible"); @@ -79,7 +79,7 @@ describe("command palette", () => { commandPalette().within(() => { commandPaletteSearch().clear().type("Week"); - cy.findByRole("option", { name: /First day of the week/ }).click(); + cy.findByRole("option", { name: "First day of the week" }).click(); }); cy.location("pathname").should("contain", "settings/localization"); diff --git a/frontend/src/metabase/palette/components/PaletteResults.tsx b/frontend/src/metabase/palette/components/PaletteResults.tsx index 38f27cb99ab3579bee2f31d940a6081585e421c8..5b6faa1e0e6596180d5fc6258b0e598b0548a778 100644 --- a/frontend/src/metabase/palette/components/PaletteResults.tsx +++ b/frontend/src/metabase/palette/components/PaletteResults.tsx @@ -92,6 +92,7 @@ export const PaletteResults = () => { <Flex gap=".5rem" style={{ minWidth: 0 }}> {item.icon && ( <Icon + aria-hidden name={(item.icon as IconName) || "click"} color={ active ? color("brand-light") : color("text-light") @@ -116,6 +117,7 @@ export const PaletteResults = () => { </Flex> {active && ( <Flex + aria-hidden gap="0.5rem" fw={400} style={{