test: Script updates for flaky tests (#16533)
* Autosave trial fix * json form field flaky fix * js fun exe spec flaky fix
This commit is contained in:
parent
eaa58c5338
commit
353e007e78
|
|
@ -173,6 +173,7 @@ describe("JSON Form Widget Field Change", () => {
|
|||
|
||||
cy.openFieldConfiguration("hobbies");
|
||||
cy.selectDropdownValue(commonlocators.jsonFormFieldType, "Array");
|
||||
cy.wait(2000); //for array field to reflect
|
||||
cy.get(`${fieldPrefix}-hobbies`).then((hobbies) => {
|
||||
cy.wrap(hobbies)
|
||||
.find(".t--jsonformfield-array-add-btn")
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@ describe("Binding the list widget with text widget", function() {
|
|||
"response.body.responseMeta.status",
|
||||
200,
|
||||
);
|
||||
cy.reload();
|
||||
cy.wait(2000);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -331,6 +331,7 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => {
|
|||
//Delete the test data
|
||||
ee.ActionContextMenuByEntityName("Stores", "Delete", "Are you sure?");
|
||||
agHelper.ValidateNetworkStatus("@deletePage", 200);
|
||||
agHelper.RefreshPage();
|
||||
});
|
||||
|
||||
it("12. Validate Drop of the Newly Created - Stores - Table from MySQL datasource", () => {
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ describe("JS Function Execution", function() {
|
|||
);
|
||||
|
||||
// Fix parse error and assert that debugger error is removed
|
||||
jsEditor.EditJSObj(JS_OBJECT_WITHOUT_PARSE_ERROR, true);
|
||||
jsEditor.EditJSObj(JS_OBJECT_WITHOUT_PARSE_ERROR, true, false);
|
||||
agHelper.GetNClick(jsEditor._runButton);
|
||||
agHelper.AssertContains("ran successfully"); //to not hinder with next toast msg in next case!
|
||||
jsEditor.AssertParseError(false, true);
|
||||
|
|
@ -258,13 +258,13 @@ describe("JS Function Execution", function() {
|
|||
// Switch back to response tab
|
||||
agHelper.GetNClick(locator._responseTab);
|
||||
// Re-introduce parse errors
|
||||
jsEditor.EditJSObj(JS_OBJECT_WITH_PARSE_ERROR + "}}", false);
|
||||
jsEditor.EditJSObj(JS_OBJECT_WITH_PARSE_ERROR + "}}", false, false);
|
||||
agHelper.GetNClick(jsEditor._runButton);
|
||||
// Assert that there is a function execution parse error
|
||||
jsEditor.AssertParseError(true, true);
|
||||
|
||||
// Delete function
|
||||
jsEditor.EditJSObj(JS_OBJECT_WITH_DELETED_FUNCTION, true);
|
||||
jsEditor.EditJSObj(JS_OBJECT_WITH_DELETED_FUNCTION, true, false);
|
||||
// Assert that parse error is removed from debugger when function is deleted
|
||||
agHelper.GetNClick(locator._errorTab);
|
||||
agHelper.AssertContains(
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ export class JSEditor {
|
|||
}
|
||||
|
||||
//Edit the name of a JSObject's property (variable or function)
|
||||
public EditJSObj(newContent: string, toPrettify = true) {
|
||||
public EditJSObj(newContent: string, toPrettify = true, toVerifyAutoSave = true) {
|
||||
cy.get(this.locator._codeMirrorTextArea)
|
||||
.first()
|
||||
.focus()
|
||||
|
|
@ -200,7 +200,7 @@ export class JSEditor {
|
|||
});
|
||||
this.agHelper.Sleep(2000); //Settling time for edited js code
|
||||
toPrettify && this.agHelper.ActionContextMenuWithInPane("Prettify Code");
|
||||
this.agHelper.AssertAutoSave();
|
||||
toVerifyAutoSave && this.agHelper.AssertAutoSave();
|
||||
}
|
||||
|
||||
public DisableJSContext(endp: string) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user