Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ describe(

// User interaction - Click
getIframeBody(1).find(locators._pageHeaderToggle).click({ force: true });
getIframeBody(1).find(locators._pageHeaderMenuList).should("be.visible");
agHelper.WaitForCondition(() => {
return getIframeBody(1)
.find(locators._pageHeaderMenuList)
.then(($el: JQuery<HTMLElement>) => $el.length > 0);
});
});

it("2. Verify colors, borders and shadows", () => {
Expand Down Expand Up @@ -81,7 +85,7 @@ describe(
propPane.UpdatePropertyFieldValue("URL", " ");
agHelper.ValidateToastMessage("url updated");

agHelper.ClickButton("Submit");
agHelper.ClickButton("Submit", { force: true });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Avoid using force: true in button clicks

Using force: true bypasses Cypress's automatic retry and waiting mechanisms, which could mask underlying issues. Consider using Cypress's built-in waiting mechanisms instead.

-agHelper.ClickButton("Submit", { force: true });
+agHelper.WaitUntilEleAppear("Submit");
+agHelper.ClickButton("Submit");

Committable suggestion skipped: line range outside the PR's diff.

getIframeBody(0)
.find("input")
.should("be.visible")
Expand All @@ -90,6 +94,7 @@ describe(
expect(inputValue).to.equal("submitclicked");
});

EditorNavigation.SelectEntityByName("Iframe1", EntityType.Widget);
propPane.UpdatePropertyFieldValue(
"srcDoc",
`<!DOCTYPE html>
Expand Down
2 changes: 1 addition & 1 deletion app/client/cypress/support/Objects/CommonLocators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ export class CommonLocators {
_treeSelectedContent = ".rc-tree-select-selection-item-content";
_switcherIcon = ".switcher-icon";
_root = "#root";
_pageHeaderToggle = ".navbar__items>button";
_pageHeaderToggle = ".navbar__items > button";
_pageHeaderMenuList = ".navbar-sidebar__backdrop";
_enterFullScreen = ".application-demo-new-dashboard-control-enter-fullscreen";
_dashboardContainer = ".application-demo-new-dashboard-container";
Expand Down