Skip to content
Snippets Groups Projects
Unverified Commit 1e9e93ca authored by Jeff Bruemmer's avatar Jeff Bruemmer Committed by GitHub
Browse files

Merge branch 'release-x.51.x' into backport-2be5130e

parents 3b82c26e fa71a722
No related merge requests found
......@@ -181,6 +181,7 @@ function assertTooltipFooter({ name, value, secondaryValue }) {
}
export function assertEChartsTooltip({ header, rows, footer, blurAfter }) {
echartsTooltip().should("be.visible");
echartsTooltip().within(() => {
if (header != null) {
tooltipHeader().should("have.text", header);
......
......@@ -295,11 +295,6 @@ describe("scenarios > x-rays", { tags: "@slow" }, () => {
cy.url().should("contain", "/question");
cy.findByTestId("viz-settings-button").click();
cy.findAllByTestId("chartsettings-field-picker")
.contains("User → Source")
.should("be.visible");
// Bars
chartPathWithFillColor("#509EE3").should("have.length", 5);
chartPathWithFillColor("#509EE3").eq(0).realHover();
......@@ -314,6 +309,11 @@ describe("scenarios > x-rays", { tags: "@slow" }, () => {
},
],
});
cy.findByTestId("viz-settings-button").click();
cy.findAllByTestId("chartsettings-field-picker")
.contains("User → Source")
.should("be.visible");
});
it("should be able to open x-ray on a dashcard from a dashboard with multiple tabs", () => {
......
......@@ -87,12 +87,12 @@ describe("command palette", () => {
// Check that we are not filtering search results by action name
commandPaletteInput().clear().type("Company");
cy.findByRole("option", { name: /View and filter/ }).should("exist");
cy.findByRole("option", { name: "PEOPLE" }).should(
cy.findByRole("option", { name: "REVIEWS" }).should(
"have.attr",
"aria-selected",
"true",
);
cy.findByRole("option", { name: "REVIEWS" }).should("exist");
cy.findByRole("option", { name: "PEOPLE" }).should("exist");
cy.findByRole("option", { name: "PRODUCTS" }).should("exist");
commandPaletteInput().clear();
......@@ -139,6 +139,29 @@ describe("command palette", () => {
.should("have.attr", "aria-selected", "true");
});
it("should display search results in the order returned by the API", () => {
cy.visit("/");
cy.findByRole("button", { name: /Search/ }).click();
cy.intercept("/api/search?*").as("searchData");
commandPalette().within(() => {
commandPaletteInput().type("Cou");
cy.wait("@searchData");
cy.findByText("Loading...").should("not.exist");
cy.get("@searchData").then(({ response }) => {
const results = response.body.data;
results.forEach((result, index) => {
cy.findAllByRole("option")
.eq(index + 2)
.should("contain.text", result.name);
});
});
});
});
it("should render links to site settings in settings pages", () => {
cy.visit("/admin");
cy.findByRole("heading", { name: "Getting set up" }).should("exist");
......
......@@ -188,7 +188,7 @@ export const useCommandPalette = ({
icon: icon.name,
section: "search",
keywords: debouncedSearchText,
priority: Priority.NORMAL,
priority: Priority.NORMAL - index,
perform: () => {
trackSearchClick("item", index, "command-palette");
},
......
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