Skip to content
Snippets Groups Projects
Unverified Commit b6c0d9d6 authored by Denis Berezin's avatar Denis Berezin Committed by GitHub
Browse files

Remove excess e2e tests helper (#29982)

parent 32030d79
No related branches found
No related tags found
No related merge requests found
......@@ -286,14 +286,3 @@ export function visitPublicDashboard(id, { params = {} } = {}) {
},
);
}
/**
* Returns a matcher function to find text content that is broken up by multiple elements
*
* @param {string} textToFind
* @example
* cy.findByText(getBrokenUpTextMatcher("my text with a styled word"))
*/
export function getBrokenUpTextMatcher(textToFind) {
return (content, element) => element?.textContent === textToFind;
}
......@@ -2,7 +2,6 @@ import {
enterCustomColumnDetails,
restore,
openProductsTable,
getBrokenUpTextMatcher,
} from "e2e/support/helpers";
describe("scenarios > question > custom column > help text", () => {
......@@ -16,12 +15,12 @@ describe("scenarios > question > custom column > help text", () => {
it("should appear while inside a function", () => {
enterCustomColumnDetails({ formula: "Lower(" });
cy.findByText(getBrokenUpTextMatcher("lower(text)"));
cy.contains("lower(text)");
});
it("should appear after a field reference", () => {
enterCustomColumnDetails({ formula: "Lower([Category]" });
cy.findByText(getBrokenUpTextMatcher("lower(text)"));
cy.contains("lower(text)");
});
it("should not appear while outside a function", () => {
......
import {
enterCustomColumnDetails,
getBrokenUpTextMatcher,
openProductsTable,
restore,
} from "e2e/support/helpers";
......@@ -53,7 +52,7 @@ describe("scenarios > question > custom column > typing suggestion", () => {
it("should show expression function helper if a proper function is typed", () => {
enterCustomColumnDetails({ formula: "lower(" });
cy.findByText(getBrokenUpTextMatcher("lower(text)")).should("be.visible");
cy.contains("lower(text)");
cy.findByText("Returns the string of text in all lower case.").should(
"be.visible",
);
......
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