test: Cypress - Flaky fix (#22248)

## Description

- This PR fixes below flaky test in CI - by improving the
EnterActionValue() agHelper metod:
- setInterval_spec.js


## Type of change

- Script fix (non-breaking change which fixes CI failure)


## How Has This Been Tested?

- Cypress local run

## Checklist:
### QA activity:
- [X] Added Test Plan Approved label after reviewing all changes
This commit is contained in:
Aishwarya-U-R 2023-04-11 01:24:10 +05:30 committed by GitHub
parent 217c40b20b
commit 00695e0600
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -467,9 +467,20 @@ export class AggregateHelper {
cy.xpath(this.locator._actionTextArea(actionName))
.eq(index)
.scrollIntoView()
.focus()
.type("{uparrow}", { force: true })
.type("{ctrl}{shift}{downarrow}{del}", { force: true });
.parents(".CodeMirror")
.first()
.then((ins: any) => {
const input = ins[0].CodeMirror;
input.focus();
this.Sleep(200);
input.setValue("");
this.Sleep(200);
});
//Not working consistenly, hence commenting
// .focus()
// .type("{uparrow}", { force: true })
// .type("{ctrl}{shift}{downarrow}{del}", { force: true });
cy.focused().then(($cm: any) => {
if ($cm.contents != "") {
cy.log("The field is not empty");