Remove Comments
This commit is contained in:
parent
b9d7cfdec1
commit
323256cabf
|
@ -4,29 +4,7 @@ import {
|
||||||
getAncestorProps,
|
getAncestorProps,
|
||||||
} from "../src/components/userInterface/pagesParsing/searchComponents"
|
} from "../src/components/userInterface/pagesParsing/searchComponents"
|
||||||
import { componentsAndScreens } from "./testData"
|
import { componentsAndScreens } from "./testData"
|
||||||
/*
|
|
||||||
//searchAllComponents used in ComponentSearch which is no longer used in the Builder
|
|
||||||
describe("searchAllComponents", () => {
|
|
||||||
it.only("should match component by name", () => {
|
|
||||||
const results = searchAllComponents(
|
|
||||||
componentsAndScreens().components,
|
|
||||||
"Textbox"
|
|
||||||
)
|
|
||||||
|
|
||||||
expect(results.length).toBe(1)
|
|
||||||
expect(results[0].name).toBe("budibase-components/TextBox")
|
|
||||||
})
|
|
||||||
|
|
||||||
it("should match component by tag", () => {
|
|
||||||
const results = searchAllComponents(
|
|
||||||
componentsAndScreens().components,
|
|
||||||
"record"
|
|
||||||
)
|
|
||||||
|
|
||||||
expect(results.length).toBe(1)
|
|
||||||
expect(results[0].name).toBe("budibase-components/RecordView")
|
|
||||||
})
|
|
||||||
}) */
|
|
||||||
|
|
||||||
describe("getExactComponent", () => {
|
describe("getExactComponent", () => {
|
||||||
it("should get component by name", () => {
|
it("should get component by name", () => {
|
||||||
|
@ -57,29 +35,3 @@ describe("getExactComponent", () => {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
// Commented as not used anywhere
|
|
||||||
//describe("getAncestorProps", () => {
|
|
||||||
// it("should return props of root component", () => {
|
|
||||||
// const result = getAncestorProps(
|
|
||||||
// componentsAndScreens().components,
|
|
||||||
// "budibase-components/TextBox"
|
|
||||||
// )
|
|
||||||
|
|
||||||
// expect(result).toEqual([componentsAndScreens().components[0].props])
|
|
||||||
// })
|
|
||||||
|
|
||||||
// it("should return props of inherited and current component, in order", () => {
|
|
||||||
// const { components, screens } = componentsAndScreens()
|
|
||||||
// const allComponentsAndScreens = [...components, ...screens]
|
|
||||||
|
|
||||||
// const result = getAncestorProps(
|
|
||||||
// allComponentsAndScreens,
|
|
||||||
// "common/PasswordBox"
|
|
||||||
// )
|
|
||||||
|
|
||||||
// expect(result).toEqual([
|
|
||||||
// allComponentsAndScreens[0].props,
|
|
||||||
// { ...allComponentsAndScreens[5].props },
|
|
||||||
// ])
|
|
||||||
// })
|
|
||||||
// })
|
|
||||||
|
|
Loading…
Reference in New Issue