-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: bug with different approach and added alerts and count of alert …
…for cypress test case
- Loading branch information
1 parent
c0fde14
commit 98d07b2
Showing
2 changed files
with
35 additions
and
11 deletions.
There are no files selected for viewing
26 changes: 21 additions & 5 deletions
26
app/client/cypress/e2e/Regression/ClientSide/Widgets/Select/Select4_spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,53 @@ | ||
import { | ||
agHelper, | ||
agHelper, | ||
draggableWidgets, | ||
deployMode, | ||
entityExplorer, | ||
locators, | ||
propPane, | ||
} from "../../../../../support/Objects/ObjectsCore"; | ||
|
||
|
||
// Issue link: https://github.com/appsmithorg/appsmith/issues/26696 | ||
describe( | ||
"Select widget tests validating OnDropdownClose events are rendering show alert only once", | ||
{ tags: ["@tag.Widget", "@tag.Select"] }, | ||
function () { | ||
before(() => { | ||
entityExplorer.DragDropWidgetNVerify(draggableWidgets.SELECT); | ||
}); | ||
|
||
|
||
|
||
it("Validate OnDropdownClose events are rendering show alert only once", () => { | ||
propPane.EnterJSContext( | ||
"onDropdownClose", | ||
"{{showAlert('Dropdown closed!','success')}}", | ||
true, | ||
); | ||
propPane.ToggleJSMode("onDropdownClose", false); | ||
propPane.EnterJSContext( | ||
"onDropdownOpen", | ||
"{{showAlert('Dropdown opened!','success')}}", | ||
true, | ||
); | ||
propPane.ToggleJSMode("onDropdownOpen", false); | ||
propPane.EnterJSContext( | ||
"onOptionChange", | ||
"{{showAlert('Option changed!','success')}}", | ||
true, | ||
); | ||
propPane.ToggleJSMode("onOptionChange", false); | ||
deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.SELECT)); | ||
agHelper.GetNClick(locators._widgetInDeployed(draggableWidgets.SELECT)); | ||
agHelper.ValidateToastMessage("Dropdown opened!"); | ||
agHelper.AssertElementVisibility( | ||
locators._selectOptionValue("Red"), | ||
true, | ||
); | ||
agHelper.GetNClick(locators._selectOptionValue("Red")); | ||
agHelper.ValidateToastMessage("Option changed!"); | ||
agHelper.ValidateToastMessage("Dropdown closed!"); | ||
cy.get("#ToastId12 > .Toastify__toast-body") | ||
.contains("Dropdown closed!") | ||
.should("have.length", 1); | ||
}); | ||
}, | ||
); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters