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..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 @@ -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,44 +41,29 @@ 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."); + .dblclick(); + cy.focused().clear(); + cy.focused().type("{{JSObject1."); + _.agHelper.GetNAssertElementText( _.locators._hints, "offsetValue", "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."); + .dblclick(); + cy.focused().clear(); + cy.focused().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(); }); }, );