Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
saharAdem committed Nov 28, 2024
1 parent a7bfac5 commit bc3389b
Showing 1 changed file with 42 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import {
agHelper,
locators,
propPane,
} from "../../../../support/Objects/ObjectsCore";

const widgetSelector = (name: string) => `[data-widgetname-cy="${name}"]`;
const containerWidgetSelector = `[type="CONTAINER_WIDGET"]`;

describe("Bug 37683: List widget auto-height update infinite loop error", () => {
it("The list widget height should not trigger an auto-height update", () => {
cy.dragAndDropToCanvas("listwidgetv2", {
x: 300,
y: 600,
});
propPane.EnterJSContext(
"onitemclick",
`{{List1.setVisibility(false)}}`,
true,
false,
);
cy.dragAndDropToCanvas("buttonwidget", {
x: 600,
y: 600,
});
propPane.EnterJSContext(
"onClick",
`{{List1.setVisibility(true)}}`,
true,
false,
);
agHelper.GetNClick(locators._enterPreviewMode);
cy.get(`${widgetSelector("List1")} ${containerWidgetSelector}`)
.eq(1)
.click({ force: true });
cy.wait(4000);
agHelper.GetNClick(`${widgetSelector("Button1")}`);
agHelper.AssertElementVisibility(locators._widgetInDeployed("list1"));
agHelper.AssertElementVisibility(locators._widgetInDeployed("button1"));
agHelper.GetNClick(locators._exitPreviewMode);
});
});

0 comments on commit bc3389b

Please sign in to comment.