-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/release-2024-fall' into bugfix/F…
…OUR-19756
- Loading branch information
Showing
6 changed files
with
59 additions
and
5 deletions.
There are no files selected for viewing
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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
describe("Clipboard Page and Clear All Functionality", () => { | ||
|
||
it("should remove all controls in the clipboard page when 'Clear All' is confirmed", () => { | ||
// Clear local storage to ensure a clean test environment | ||
cy.clearLocalStorage(); | ||
|
||
// Visit the home page | ||
cy.visit("/"); | ||
|
||
// Open the 'Input Fields' accordion section | ||
cy.openAcordeonByLabel("Input Fields"); | ||
|
||
// Navigate to the clipboard page | ||
cy.get("[data-test=page-dropdown]").click(); | ||
cy.get("[data-test=clipboard]").should("exist").click({ force: true }); | ||
|
||
// Step 1: Dragging controls to the screen drop zone in the clipboard | ||
cy.get("[data-cy=controls-FormInput]").drag("[data-cy=editor-content]", { position: "bottom" }); | ||
cy.get("[data-cy=controls-FormSelectList]").drag("[data-cy=screen-element-container]", { position: "top" }); | ||
cy.get("[data-cy=controls-FormButton]").drag("[data-cy=screen-element-container]", { position: "top" }); | ||
cy.get("[data-cy=controls-FormTextArea]").drag("[data-cy=screen-element-container]", { position: "top" }); | ||
cy.get("[data-cy=controls-FormDatePicker]").drag("[data-cy=screen-element-container]", { position: "top" }); | ||
cy.get("[data-cy=controls-FormCheckbox]").drag("[data-cy=screen-element-container]", { position: "top" }); | ||
|
||
// Verify that all controls have been successfully added | ||
cy.get('[data-cy="screen-element-container"]').children().should('have.length', 6); | ||
|
||
// Step 2: Attempt to clear all controls but cancel the action | ||
cy.contains('button', 'Clear All').click(); | ||
cy.contains('button', 'Cancel').click(); | ||
|
||
// Ensure controls are still present after canceling | ||
cy.get('[data-cy="screen-element-container"]').children().should('have.length', 6); | ||
|
||
// Step 3: Confirm clearing all controls | ||
cy.contains('button', 'Clear All').click(); | ||
cy.contains('button', 'Confirm').click(); | ||
|
||
// Validate that all controls have been removed | ||
cy.get('[data-cy="editor-content"]').children().should('have.length', 0); | ||
}); | ||
}); |