test: Cypress - Flaky test fix (#21858)

## Description

**Fixed below flaky tests**

- GitImport_Spec.js
- Entity_Explorer_Widgets_Copy_Paste_Delete_Undo_Keyboard_Event_spec.js
- Form_With_CheckBox_spec.js

## Type of change

- Flaky test fix

## How Has This Been Tested?
- Cypress test runs

## Checklist:
### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test
This commit is contained in:
Vijetha-Kaja 2023-03-29 22:10:42 +05:30 committed by GitHub
parent ab9b5f018e
commit b6d5390754
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 4 deletions

View File

@ -4,7 +4,8 @@ const formWidgetsPage = require("../../../../locators/FormWidgets.json");
const dsl = require("../../../../fixtures/formWithInputdsl.json");
const widgetsPage = require("../../../../locators/Widgets.json");
import { ObjectsRegistry } from "../../../../support/Objects/Registry";
let ee = ObjectsRegistry.EntityExplorer;
let ee = ObjectsRegistry.EntityExplorer,
agHelper = ObjectsRegistry.AggregateHelper;
before(() => {
cy.addDsl(dsl);
@ -37,7 +38,8 @@ describe("Test Suite to validate copy/delete/undo functionalites", function () {
"response.body.responseMeta.status",
200,
);
cy.get("body").type(`{${modifierKey}}z`);
agHelper.Sleep(1000);
cy.get("body").type(`{${modifierKey}}z`, { force: true });
ee.ExpandCollapseEntity("Widgets");
ee.ExpandCollapseEntity("FormTest");
ee.ActionContextMenuByEntityName("FormTestCopy", "Show Bindings");

View File

@ -200,6 +200,7 @@ describe("Git import flow ", function () {
cy.wait(2000);
// validate data binding in edit and deploy mode
cy.latestDeployPreview();
cy.get(".tbody").should("have.length", 2);
cy.get(".tbody").first().should("contain.text", "Test user 7");
cy.xpath("//input[@value='this is a test']");
cy.xpath("//input[@value='Success']");

View File

@ -12,9 +12,9 @@ describe("Checkbox Widget Functionality", function () {
cy.openPropertyPane("checkboxwidget");
cy.togglebar(commonlocators.requiredjs + " " + "input");
cy.PublishtheApp();
cy.wait(1500);
cy.wait(2000);
cy.get(publish.checkboxWidget).click();
cy.get(publish.checkboxWidget).should("not.be.checked");
cy.get('[type="checkbox"]').eq(0).should("not.be.checked");
cy.get(widgetsPage.formButtonWidget)
.contains("Submit")
.should("have.class", "bp3-disabled");