Skip to content
Snippets Groups Projects
Unverified Commit bbe0381e authored by Alexander Polyankin's avatar Alexander Polyankin Committed by GitHub
Browse files

Fix models picker not working for non-english locale (#25545)

parent f93b488e
No related branches found
No related tags found
No related merge requests found
import { t } from "ttag";
import { generateSchemaId } from "metabase/lib/schema";
export const SAVED_QUESTIONS_VIRTUAL_DB_ID = -1337;
export const ROOT_COLLECTION_VIRTUAL_SCHEMA_NAME = t`Everything else`;
export const ROOT_COLLECTION_VIRTUAL_SCHEMA_NAME = "Everything else";
export const ROOT_COLLECTION_VIRTUAL_SCHEMA = getCollectionVirtualSchemaId({
id: null,
......
......@@ -40,7 +40,7 @@ const propTypes = {
const getOurAnalyticsCollection = collectionEntity => {
return {
...collectionEntity,
schemaName: t`Everything else`,
schemaName: "Everything else",
icon: "folder",
};
};
......
import { restore, startNewQuestion } from "__support__/e2e/helpers";
import { SAMPLE_DATABASE } from "__support__/e2e/cypress_sample_database";
const { ORDERS_ID } = SAMPLE_DATABASE;
const questionDetails = {
name: "Orders model",
query: { "source-table": ORDERS_ID },
dataset: true,
};
describe("issue 25537", () => {
beforeEach(() => {
restore();
cy.signInAsAdmin();
cy.intercept("GET", "/api/database/*/datasets/*").as("getSchemas");
});
it("should be able to pick a saved model when using a non-english locale (metabase#25537)", () => {
setLocale("de");
cy.createQuestion(questionDetails);
startNewQuestion();
cy.icon("model").click();
cy.wait("@getSchemas");
cy.findByText(questionDetails.name).should("exist");
});
});
const setLocale = locale => {
cy.request("GET", "/api/user/current").then(({ body: { id: user_id } }) => {
cy.request("PUT", `/api/user/${user_id}`, { locale });
});
};
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