mirror of
https://github.com/ToolJet/ToolJet
synced 2026-04-21 21:47:17 +00:00
* App Builder cypress fix * Revert typo * Fix for hotfix failures * Fix for canvas height * Fix for runPy * Fix for popover * Fix for popover-2 * Fix for table column issue * Fix inspector * fix versions
34 lines
1.2 KiB
JavaScript
34 lines
1.2 KiB
JavaScript
export const verifyNodeData = (node, type, children, index = 0) => {
|
|
cy.get(
|
|
`[data-cy="inspector-node-${node.toLowerCase()}"] > .node-length-color`
|
|
)
|
|
.eq(index)
|
|
.realHover()
|
|
.verifyVisibleElement("have.text", `${children}`);
|
|
cy.get(`[data-cy="inspector-node-${node.toLowerCase()}"] > .node-key`)
|
|
.eq(index)
|
|
.verifyVisibleElement("have.text", node);
|
|
cy.get(`[data-cy="inspector-node-${node.toLowerCase()}"] > .node-type`)
|
|
.eq(index)
|
|
.verifyVisibleElement("have.text", type);
|
|
};
|
|
|
|
export const openNode = (node, index = 0) => {
|
|
cy.get(`[data-cy="inspector-node-${node.toLowerCase()}"] > .node-key`)
|
|
.eq(index)
|
|
.click();
|
|
cy.wait(1000);
|
|
};
|
|
|
|
export const verifyValue = (node, type, children, index = 0) => {
|
|
cy.get(`[data-cy="inspector-node-${node.toLowerCase()}"] > .mx-2`)
|
|
.eq(index)
|
|
.realHover()
|
|
.verifyVisibleElement("have.text", `${children}`);
|
|
cy.get(`[data-cy="inspector-node-${node.toLowerCase()}"] > .node-key`)
|
|
.eq(index)
|
|
.verifyVisibleElement("have.text", node);
|
|
cy.get(`[data-cy="inspector-node-${node.toLowerCase()}"] > .mx-1`)
|
|
.eq(index)
|
|
.verifyVisibleElement("have.text", type);
|
|
};
|