2023-05-30 05:02:10 +00:00
|
|
|
export const verifyNodeData = (node, type, children, index = 0) => {
|
2023-05-16 09:13:56 +00:00
|
|
|
cy.get(
|
|
|
|
|
`[data-cy="inspector-node-${node.toLowerCase()}"] > .node-length-color`
|
|
|
|
|
)
|
2023-05-30 05:02:10 +00:00
|
|
|
.eq(index)
|
2023-05-16 09:13:56 +00:00
|
|
|
.realHover()
|
|
|
|
|
.verifyVisibleElement("have.text", `${children}`);
|
2023-05-30 05:02:10 +00:00
|
|
|
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);
|
2023-05-16 09:13:56 +00:00
|
|
|
};
|
|
|
|
|
|
2023-09-13 11:21:41 +00:00
|
|
|
export const openNode = (node, index = 0, time = 1000) => {
|
2023-05-16 09:13:56 +00:00
|
|
|
cy.get(`[data-cy="inspector-node-${node.toLowerCase()}"] > .node-key`)
|
|
|
|
|
.eq(index)
|
|
|
|
|
.click();
|
2023-09-13 11:21:41 +00:00
|
|
|
cy.wait(time);
|
2023-05-16 09:13:56 +00:00
|
|
|
};
|
|
|
|
|
|
2023-06-13 22:19:19 +00:00
|
|
|
export const verifyValue = (node, type, children, index = 0) => {
|
2023-05-16 09:13:56 +00:00
|
|
|
cy.get(`[data-cy="inspector-node-${node.toLowerCase()}"] > .mx-2`)
|
2023-06-13 22:19:19 +00:00
|
|
|
.eq(index)
|
2023-05-16 09:13:56 +00:00
|
|
|
.realHover()
|
2024-02-08 08:10:08 +00:00
|
|
|
.verifyVisibleElement("contain.text", `${children}`);
|
2023-06-13 22:19:19 +00:00
|
|
|
cy.get(`[data-cy="inspector-node-${node.toLowerCase()}"] > .node-key`)
|
|
|
|
|
.eq(index)
|
2024-02-08 08:10:08 +00:00
|
|
|
.verifyVisibleElement("contain.text", node);
|
2023-06-13 22:19:19 +00:00
|
|
|
cy.get(`[data-cy="inspector-node-${node.toLowerCase()}"] > .mx-1`)
|
|
|
|
|
.eq(index)
|
2024-02-08 08:10:08 +00:00
|
|
|
.verifyVisibleElement("contain.text", type);
|
2023-05-16 09:13:56 +00:00
|
|
|
};
|
2023-12-19 11:01:37 +00:00
|
|
|
export const deleteComponentFromInspector = (node) => {
|
|
|
|
|
cy.get('[data-cy="inspector-node-components"] > .node-key').click();
|
|
|
|
|
cy.get(`[data-cy="inspector-node-${node}"] > .node-key`).click();
|
2024-01-04 07:07:57 +00:00
|
|
|
cy.get('[style="height: 13px; width: 13px;"] > img').click();
|
2024-02-08 08:10:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const verifyfunctions = (node, type, index = 0) => {
|
|
|
|
|
cy.get(`[data-cy="inspector-node-${node.toLowerCase()}"] > .mx-1`)
|
|
|
|
|
.eq(index)
|
|
|
|
|
.realHover()
|
|
|
|
|
.verifyVisibleElement("contain.text", `${type}`);
|
|
|
|
|
cy.get(`[data-cy="inspector-node-${node.toLowerCase()}"] > .node-key`)
|
|
|
|
|
.eq(index)
|
|
|
|
|
.verifyVisibleElement("contain.text", node);
|
|
|
|
|
// cy.get(`[data-cy="inspector-node-${node.toLowerCase()}"] > .mx-1`)
|
|
|
|
|
// .eq(index)
|
|
|
|
|
// .verifyVisibleElement("contain.text", type);
|
|
|
|
|
};
|