-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Resolve list widget Error #37747
base: release
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Replace cy.wait with proper assertions Using arbitrary wait times can make tests flaky. Instead, wait for specific conditions. - cy.wait(4000);
+ cy.get(widgetSelector("List1")).should("not.be.visible"); 📝 Committable suggestion
Suggested change
|
||||||
agHelper.GetNClick(`${widgetSelector("Button1")}`); | ||||||
agHelper.AssertElementVisibility(locators._widgetInDeployed("list1")); | ||||||
agHelper.AssertElementVisibility(locators._widgetInDeployed("button1")); | ||||||
agHelper.GetNClick(locators._exitPreviewMode); | ||||||
}); | ||||||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Avoid force clicking without proper wait conditions
Using
force: true
might mask underlying issues. Consider waiting for the element to be properly interactable.📝 Committable suggestion