Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Boat instead of bird (#67612)

Maz Ameli86410d0667aa
diff --git a/e2e/test/scenarios/data-reference/glossary.cy.spec.ts b/e2e/test/scenarios/data-reference/glossary.cy.spec.ts
index 9da2c688495..91376077709 100644
--- a/e2e/test/scenarios/data-reference/glossary.cy.spec.ts
+++ b/e2e/test/scenarios/data-reference/glossary.cy.spec.ts
@@ -3,23 +3,27 @@ const { H } = cy;
function executeCreateGlossaryTermFlow() {
cy.intercept("POST", "/api/glossary", (req) => {
expect(req.body).to.deep.equal({
- term: "Bird",
- definition: "A thing with wings.",
+ term: "Boat",
+ definition: "A small vessel for traveling on water.",
});
}).as("createGlossary");
cy.findByRole("button", { name: /new term/i }).click();
- cy.findByPlaceholderText(/bird/i).type(" Bird ");
- cy.findByPlaceholderText(/a warm-blooded.*/i).type(" A thing with wings. ");
+ cy.findByPlaceholderText(/boat/i).type(" Boat ");
+ cy.findByPlaceholderText(/a small vessel.*/i).type(
+ " A small vessel for traveling on water. ",
+ );
cy.findByLabelText("Save").click();
cy.wait("@createGlossary");
cy.get("table").within(() => {
- cy.findByText("Bird").should("be.visible");
- cy.findByText("A thing with wings.").should("be.visible");
+ cy.findByText("Boat").should("be.visible");
+ cy.findByText("A small vessel for traveling on water.").should(
+ "be.visible",
+ );
});
}
@@ -43,8 +47,8 @@ function executeUpdateGlossaryTermFlow(visitPageFn: VoidFunction) {
cy.findByText("Cat").click();
});
- cy.findByPlaceholderText(/bird/i).clear().type("Kitten");
- cy.findByPlaceholderText(/a warm-blooded.*/i)
+ cy.findByPlaceholderText(/boat/i).clear().type("Kitten");
+ cy.findByPlaceholderText(/a small vessel.*/i)
.clear()
.type("Young cat");
diff --git a/frontend/src/metabase/reference/glossary/GlossaryRowEditor.tsx b/frontend/src/metabase/reference/glossary/GlossaryRowEditor.tsx
index d193ded53b4..d589400182b 100644
--- a/frontend/src/metabase/reference/glossary/GlossaryRowEditor.tsx
+++ b/frontend/src/metabase/reference/glossary/GlossaryRowEditor.tsx
@@ -73,7 +73,7 @@ export function GlossaryRowEditor({
fw="bold"
variant="unstyled"
autoFocus={autoFocusField === "term"}
- placeholder={t`Bird`}
+ placeholder={t`Boat`}
value={term}
onChange={(e) => setTerm(e.currentTarget.value)}
miw="8rem"
@@ -95,7 +95,7 @@ export function GlossaryRowEditor({
input: S.input,
}}
variant="unstyled"
- placeholder={t`A warm-blooded, egg-laying vertebrate of the class Aves.`}
+ placeholder={t`A small vessel propelled on water by oars, sails, or an engine.`}
value={definition}
onChange={(e) => setDefinition(e.currentTarget.value)}
autosize
diff --git a/frontend/src/metabase/reference/glossary/GlossaryTable.unit.spec.tsx b/frontend/src/metabase/reference/glossary/GlossaryTable.unit.spec.tsx
index 34ce866aeb4..e1e640992c4 100644
--- a/frontend/src/metabase/reference/glossary/GlossaryTable.unit.spec.tsx
+++ b/frontend/src/metabase/reference/glossary/GlossaryTable.unit.spec.tsx
@@ -43,8 +43,8 @@ describe("GlossaryTable", () => {
await user.click(screen.getByRole("button", { name: /new term/i }));
- const termInput = screen.getByPlaceholderText(/bird/i);
- const defInput = screen.getByPlaceholderText(/a warm-blooded.*/i);
+ const termInput = screen.getByPlaceholderText(/boat/i);
+ const defInput = screen.getByPlaceholderText(/a small vessel.*/i);
await user.clear(termInput);
await user.type(termInput, " Bird ");
await user.type(defInput, " Flies sometimes ");
@@ -52,7 +52,7 @@ describe("GlossaryTable", () => {
const table0 = screen.getByRole("table");
const rows0 = within(table0).getAllByRole("row");
const createRow0 = rows0.find((r) =>
- within(r).queryByPlaceholderText(/bird/i),
+ within(r).queryByPlaceholderText(/boat/i),
);
expect(createRow0).toBeTruthy();
const saveInCreate = within(createRow0 as HTMLElement).getByRole("button", {
@@ -82,8 +82,8 @@ describe("GlossaryTable", () => {
await user.click(screen.getByText("Cat"));
- const termInput = screen.getByPlaceholderText(/bird/i);
- const defInput = screen.getByPlaceholderText(/a warm-blooded.*/i);
+ const termInput = screen.getByPlaceholderText(/boat/i);
+ const defInput = screen.getByPlaceholderText(/a small vessel.*/i);
await user.clear(termInput);
await user.type(termInput, "Kitten");
@@ -111,7 +111,7 @@ describe("GlossaryTable", () => {
// Click term -> term input should be focused
await user.click(screen.getByText("Dog"));
- const termInput = screen.getByPlaceholderText(/bird/i);
+ const termInput = screen.getByPlaceholderText(/boat/i);
expect(termInput).toHaveFocus();
await user.click(screen.getByRole("button", { name: /cancel/i }));
@@ -127,7 +127,7 @@ describe("GlossaryTable", () => {
);
await user.click(screen.getByText("Barks"));
- const defInput = screen.getByPlaceholderText(/a warm-blooded.*/i);
+ const defInput = screen.getByPlaceholderText(/a small vessel.*/i);
expect(defInput).toHaveFocus();
});
@@ -227,7 +227,7 @@ describe("GlossaryTable", () => {
const table2 = screen.getByRole("table");
const rows2 = within(table2).getAllByRole("row");
const createRow = rows2.find((r) =>
- within(r).queryByPlaceholderText(/bird/i),
+ within(r).queryByPlaceholderText(/boat/i),
);
expect(createRow).toBeTruthy();
const saveBtn = within(createRow as HTMLElement).getByRole("button", {
@@ -236,12 +236,12 @@ describe("GlossaryTable", () => {
expect(saveBtn).toBeDisabled();
// Fill only one field and still disabled
- await user.type(screen.getByPlaceholderText(/bird/i), "Sparrow");
+ await user.type(screen.getByPlaceholderText(/boat/i), "Sparrow");
expect(saveBtn).toBeDisabled();
// Fill both fields and enabled
await user.type(
- screen.getByPlaceholderText(/a warm-blooded.*/i),
+ screen.getByPlaceholderText(/a small vessel.*/i),
"Flies sometimes",
);
expect(saveBtn).toBeEnabled();
@@ -266,7 +266,7 @@ describe("GlossaryTable", () => {
await user.click(screen.getByRole("button", { name: /new term/i }));
- const termInput = screen.getByPlaceholderText(/bird/i);
+ const termInput = screen.getByPlaceholderText(/boat/i);
await user.type(termInput, "Alpha");
// Should show duplicate warning message
@@ -299,7 +299,7 @@ describe("GlossaryTable", () => {
await user.click(screen.getByRole("button", { name: /new term/i }));
- const termInput = screen.getByPlaceholderText(/bird/i);
+ const termInput = screen.getByPlaceholderText(/boat/i);
await user.type(termInput, "ALPHA");
// Should show duplicate warning (case insensitive)
@@ -325,7 +325,7 @@ describe("GlossaryTable", () => {
await user.click(screen.getByText("Alpha"));
// The term input should have "Alpha" and no duplicate warning
- const termInput = screen.getByPlaceholderText(/bird/i);
+ const termInput = screen.getByPlaceholderText(/boat/i);
expect(termInput).toHaveValue("Alpha");
// Should NOT show duplicate warning when editing the same term
@@ -356,7 +356,7 @@ describe("GlossaryTable", () => {
// Click on "Alpha" to edit it
await user.click(screen.getByText("Alpha"));
- const termInput = screen.getByPlaceholderText(/bird/i);
+ const termInput = screen.getByPlaceholderText(/boat/i);
await user.clear(termInput);
await user.type(termInput, "Beta");