From dc9fda92a95e24d71b4d166481579d6b29aa3fcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Csneha122=E2=80=9D?= <“sneha@appsmith.com”> Date: Fri, 9 Aug 2024 14:48:28 +0530 Subject: [PATCH 1/4] chore: fixed skipped graphQL test --- .../BugTests/GraphQL_Binding_Bug16702_Spec.ts | 25 +++---------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/GraphQL_Binding_Bug16702_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/GraphQL_Binding_Bug16702_Spec.ts index a5b6ff2f9b40..dcefff149af8 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/GraphQL_Binding_Bug16702_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/GraphQL_Binding_Bug16702_Spec.ts @@ -20,7 +20,7 @@ describe( "Binding Expressions should not be truncated in Url and path extraction", { tags: ["@tag.Datasource", "@tag.Binding"] }, function () { - it.skip("Bug 16702, Moustache+Quotes formatting goes wrong in graphql body resulting in autocomplete failure", function () { + it("Bug 16702, Moustache+Quotes formatting goes wrong in graphql body resulting in autocomplete failure", function () { const jsObjectBody = `export default { limitValue: 1, offsetValue: 1, @@ -41,12 +41,9 @@ describe( query: GRAPHQL_LIMIT_QUERY, }); + // This adds offsetValue using autocomplete menu cy.get(".t--graphql-query-editor pre.CodeMirror-line span") .contains("__offset__") - // .should($el => { - // expect(Cypress.dom.isDetached($el)).to.false; - // }) - //.trigger("mouseover") .dblclick() .dblclick() .type("{{JSObject1."); @@ -56,29 +53,15 @@ describe( "have.text", 1, ); - _.agHelper.Sleep(); _.agHelper.TypeText(_.locators._codeMirrorTextArea, "offsetValue", 1); - _.agHelper.Sleep(2000); - - /* Start: Block of code to remove error of detached node of codemirror for cypress reference */ - - _.apiPage.SelectPaneTab("Params"); - _.apiPage.SelectPaneTab("Body"); - /* End: Block of code to remove error of detached node of codemirror for cypress reference */ + // This checks for a second variable if autocomplete menu shows or not, + // thus asserting bug resolution of 16702 cy.get(".t--graphql-query-editor pre.CodeMirror-line span") .contains("__limit__") - //.trigger("mouseover") .dblclick() .type("{{JSObject1."); _.agHelper.GetNClickByContains(_.locators._hints, "limitValue"); - _.agHelper.Sleep(2000); - //Commenting this since - many runs means - API response is 'You are doing too many launches' - // _.apiPage.RunAPI(false, 20, { - // expectedPath: "response.body.data.body.data.launchesPast[0].mission_name", - // expectedRes: GRAPHQL_RESPONSE.mission_name, - // }); - _.apiPage.RunAPI(); }); }, ); From 047433c9fdcf2ba3ced33eb80916fd05474a24db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Csneha122=E2=80=9D?= <“sneha@appsmith.com”> Date: Fri, 9 Aug 2024 15:18:00 +0530 Subject: [PATCH 2/4] fix: added this in limited test --- app/client/cypress/limited-tests.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/client/cypress/limited-tests.txt b/app/client/cypress/limited-tests.txt index 31c0c0253fef..8106893d29e3 100644 --- a/app/client/cypress/limited-tests.txt +++ b/app/client/cypress/limited-tests.txt @@ -1,5 +1,5 @@ # To run only limited tests - give the spec names in below format: -cypress/e2e/Regression/ClientSide/Templates/Fork_Template_spec.js +cypress/e2e/Regression/ClientSide/BugTests/GraphQL_Binding_Bug16702_Spec.ts # For running all specs - uncomment below: #cypress/e2e/**/**/* From 91ff3431d3e7674e3a72326e4ee748e303412295 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Csneha122=E2=80=9D?= <“sneha@appsmith.com”> Date: Mon, 12 Aug 2024 18:38:58 +0530 Subject: [PATCH 3/4] fix: fixed double click flakiness --- .../BugTests/GraphQL_Binding_Bug16702_Spec.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/GraphQL_Binding_Bug16702_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/GraphQL_Binding_Bug16702_Spec.ts index dcefff149af8..4fc0e617f10e 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/GraphQL_Binding_Bug16702_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/GraphQL_Binding_Bug16702_Spec.ts @@ -44,9 +44,10 @@ describe( // This adds offsetValue using autocomplete menu cy.get(".t--graphql-query-editor pre.CodeMirror-line span") .contains("__offset__") - .dblclick() - .dblclick() - .type("{{JSObject1."); + .dblclick(); + cy.focused().clear(); + cy.focused().type("{{JSObject1."); + _.agHelper.GetNAssertElementText( _.locators._hints, "offsetValue", @@ -59,8 +60,9 @@ describe( // thus asserting bug resolution of 16702 cy.get(".t--graphql-query-editor pre.CodeMirror-line span") .contains("__limit__") - .dblclick() - .type("{{JSObject1."); + .dblclick(); + cy.focused().clear(); + cy.focused().type("{{JSObject1."); _.agHelper.GetNClickByContains(_.locators._hints, "limitValue"); }); }, From 0a655d760eeb23ac2aaf3251bb26d5cb848ec58f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Csneha122=E2=80=9D?= <“sneha@appsmith.com”> Date: Wed, 14 Aug 2024 12:14:06 +0530 Subject: [PATCH 4/4] fix: reverted limited test changes --- app/client/cypress/limited-tests.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/client/cypress/limited-tests.txt b/app/client/cypress/limited-tests.txt index 8106893d29e3..31c0c0253fef 100644 --- a/app/client/cypress/limited-tests.txt +++ b/app/client/cypress/limited-tests.txt @@ -1,5 +1,5 @@ # To run only limited tests - give the spec names in below format: -cypress/e2e/Regression/ClientSide/BugTests/GraphQL_Binding_Bug16702_Spec.ts +cypress/e2e/Regression/ClientSide/Templates/Fork_Template_spec.js # For running all specs - uncomment below: #cypress/e2e/**/**/*