From 092445e9e430d19dcc9d2f9ac9d5d4abcd7c43e7 Mon Sep 17 00:00:00 2001 From: Sagar Khalasi Date: Fri, 27 Dec 2024 09:30:34 +0530 Subject: [PATCH] chore: Removed unwanted focus test case (#38351) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description We cover the focus functionality already. Fixes # https://app.zenhub.com/workspaces/stability-pod-6690c4814e31602e25cab7fd/issues/gh/appsmithorg/appsmith/38356 ## Automation /ok-to-test tags="@tag.IDE" ### :mag: Cypress test results > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: > Commit: 42b50f9a931d8dd24af625621752c1e94fc6eb4c > Cypress dashboard. > Tags: `@tag.IDE` > Spec: >
Tue, 24 Dec 2024 15:13:35 UTC ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No ## Summary by CodeRabbit ## Summary by CodeRabbit - **Chores** - Removed an existing test case for focus retention on specific panes. - **Tests** - Renumbered test cases to reflect changes, while maintaining focus retention validation across various components. --- .../IDE/Focus_retentions_inputs_spec.js | 83 +------------------ 1 file changed, 3 insertions(+), 80 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ClientSide/IDE/Focus_retentions_inputs_spec.js b/app/client/cypress/e2e/Regression/ClientSide/IDE/Focus_retentions_inputs_spec.js index 562ff0e8119a..dd2eaa491f1c 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/IDE/Focus_retentions_inputs_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/IDE/Focus_retentions_inputs_spec.js @@ -93,84 +93,7 @@ describe("Focus Retention of Inputs", { tags: ["@tag.IDE"] }, function () { cy.focusCodeInput(".js-editor", { ch: 2, line: 2 }); }); - it("2. Maintains focus on property/Api/Query/Js Pane", () => { - //Maintains focus on the property pane - EditorNavigation.ShowCanvas(); - - cy.get(".t--widget-name").should("have.text", "Text1"); - cy.assertSoftFocusOnCodeInput(".t--property-control-text", { - ch: 2, - line: 0, - }); - - PageLeftPane.switchSegment(PagePaneSegment.Queries); - - //Maintains focus on the API pane - PageLeftPane.selectItem("Graphql_Query"); - - agHelper - .GetElement(locators._queryName) - .should("have.text", "Graphql_Query"); - - cy.xpath("//span[contains(text(), 'Body')]/parent::button").should( - "have.attr", - "aria-selected", - "true", - ); - cy.assertCursorOnCodeInput(".t--graphql-query-editor", { ch: 4, line: 1 }); - - PageLeftPane.selectItem("Rest_Api_1"); - - agHelper.GetElement(locators._queryName).should("have.text", "Rest_Api_1"); - - cy.xpath("//span[contains(text(), 'Params')]/parent::button").should( - "have.attr", - "aria-selected", - "true", - ); - cy.assertCursorOnCodeInput(apiwidget.queryKey, { ch: 0, line: 0 }); - - PageLeftPane.selectItem("Rest_Api_2"); - - agHelper.GetElement(locators._queryName).should("have.text", "Rest_Api_2"); - - cy.xpath("//span[contains(text(), 'Headers')]/parent::button").should( - "have.attr", - "aria-selected", - "true", - ); - cy.assertCursorOnCodeInput(apiwidget.headerValue); - - //Maintains focus on Query panes - PageLeftPane.selectItem("SQL_Query"); - - agHelper.GetElement(locators._queryName).should("have.text", "SQL_Query"); - - cy.assertCursorOnCodeInput(".t--actionConfiguration\\.body", { - ch: 5, - line: 0, - }); - - PageLeftPane.selectItem("S3_Query"); - - cy.assertCursorOnCodeInput( - ".t--actionConfiguration\\.formData\\.bucket\\.data", - { ch: 2, line: 0 }, - ); - - PageLeftPane.switchSegment(PagePaneSegment.JS); - - //Maintains focus on JS Objects - PageLeftPane.selectItem("JSObject1"); - - cy.assertCursorOnCodeInput(".js-editor", { ch: 2, line: 4 }); - - PageLeftPane.selectItem("JSObject2"); - - cy.assertCursorOnCodeInput(".js-editor", { ch: 2, line: 2 }); - }); - - it("3. Datasource edit mode has to be maintained", () => { + it("2. Datasource edit mode has to be maintained", () => { EditorNavigation.SelectEntityByName("Appsmith", EntityType.Datasource); dataSources.EditDatasource(); EditorNavigation.SelectEntityByName("Github", EntityType.Datasource); @@ -179,7 +102,7 @@ describe("Focus Retention of Inputs", { tags: ["@tag.IDE"] }, function () { dataSources.AssertDSEditViewMode("Edit"); }); - it("4. Maintain focus of form control inputs", () => { + it("3. Maintain focus of form control inputs", () => { EditorNavigation.SelectEntityByName("SQL_Query", EntityType.Query); dataSources.ToggleUsePreparedStatement(false); EditorNavigation.SelectEntityByName("S3_Query", EntityType.Query); @@ -196,7 +119,7 @@ describe("Focus Retention of Inputs", { tags: ["@tag.IDE"] }, function () { cy.xpath(queryLocators.queryTimeout).should("be.focused"); }); - it("5. Bug 21999 Maintain focus of code editor when Escape is pressed with autcomplete open + Bug 22960", () => { + it("4. Bug 21999 Maintain focus of code editor when Escape is pressed with autcomplete open + Bug 22960", () => { EditorNavigation.SelectEntityByName("JSObject1", EntityType.JSObject); cy.assertCursorOnCodeInput(".js-editor", { ch: 2, line: 4 });