diff --git a/app/client/cypress/e2e/Regression/ClientSide/Binding/JSObjectToListWidget_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Binding/JSObjectToListWidget_Spec.ts index eedf46751a57..17d085543a6e 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Binding/JSObjectToListWidget_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Binding/JSObjectToListWidget_Spec.ts @@ -2,7 +2,7 @@ import * as _ from "../../../../support/Objects/ObjectsCore"; import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -import BottomPane from "../../../../support/Pages/IDE/BottomPane"; +import BottomTabs from "../../../../support/Pages/IDE/BottomTabs"; let valueToTest: any, jsName: any; @@ -19,7 +19,7 @@ describe( _.dataManager.dsValues[_.dataManager.defaultEnviorment].mockApiUrl, ); _.apiPage.RunAPI(); - BottomPane.response.switchResponseType("JSON"); + BottomTabs.response.switchResponseType("JSON"); _.apiPage.ReadApiResponsebyKey("name"); cy.get("@apiResp").then((value) => { valueToTest = value; diff --git a/app/client/cypress/e2e/Regression/ClientSide/BugTests/Binding_Bug28287_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/BugTests/Binding_Bug28287_Spec.ts index 3f92ef47c03a..3a16d0052f11 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/BugTests/Binding_Bug28287_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/BugTests/Binding_Bug28287_Spec.ts @@ -8,7 +8,7 @@ import { import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -import BottomPane from "../../../../support/Pages/IDE/BottomPane"; +import BottomTabs from "../../../../support/Pages/IDE/BottomTabs"; let dsName: any; let queryName: string; @@ -44,10 +44,10 @@ describe( EditorNavigation.SelectEntityByName(queryName, EntityType.Query); - BottomPane.response.switchToResponseTab(); - BottomPane.response.openResponseTypeMenu(); + BottomTabs.response.switchToResponseTab(); + BottomTabs.response.openResponseTypeMenu(); agHelper.AssertElementVisibility( - BottomPane.response.locators.responseTypeMenuItem("TABLE"), + BottomTabs.response.locators.responseTypeMenuItem("TABLE"), ); }); }); diff --git a/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/OnLoadActions_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/OnLoadActions_Spec.ts index f3215412c138..befa58330cbb 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/OnLoadActions_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/OnLoadActions_Spec.ts @@ -13,7 +13,7 @@ import { import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -import BottomPane from "../../../../support/Pages/IDE/BottomPane"; +import BottomTabs from "../../../../support/Pages/IDE/BottomTabs"; describe( "Layout OnLoad Actions tests", @@ -56,7 +56,7 @@ describe( ); apiPage.RunAPI(); - BottomPane.response.switchResponseType("JSON"); + BottomTabs.response.switchResponseType("JSON"); apiPage.CreateAndFillApi( "http://host.docker.internal:5001/v1/favqs/qotd", @@ -65,7 +65,7 @@ describe( ); apiPage.EnterHeader("dependency", "{{RandomUser.data}}"); //via Params tab apiPage.RunAPI(); - BottomPane.response.switchResponseType("JSON"); + BottomTabs.response.switchResponseType("JSON"); apiPage.CreateAndFillApi( "http://host.docker.internal:5001/v1/boredapi/activity", @@ -74,7 +74,7 @@ describe( ); apiPage.EnterHeader("dependency", "{{InspiringQuotes.data.data}}"); apiPage.RunAPI(); - BottomPane.response.switchResponseType("JSON"); + BottomTabs.response.switchResponseType("JSON"); apiPage.CreateAndFillApi( "http://host.docker.internal:5001/v1/genderize/sampledata", @@ -83,7 +83,7 @@ describe( ); apiPage.EnterParams("name", "{{RandomUser.data[0].name}}"); //via Params tab apiPage.RunAPI(); - BottomPane.response.switchResponseType("JSON"); + BottomTabs.response.switchResponseType("JSON"); //Adding dependency in right order matters! EditorNavigation.SelectEntityByName("Image1", EntityType.Widget); @@ -163,7 +163,7 @@ describe( value: "{{RandomUser.data[0].name}}", }); // verifies Bug 10055 apiPage.RunAPI(); - BottomPane.response.switchResponseType("JSON"); + BottomTabs.response.switchResponseType("JSON"); deployMode.DeployApp( locators._widgetInDeployed("textwidget"), diff --git a/app/client/cypress/e2e/Regression/ServerSide/QueryPane/Querypane_Mongo_Spec.js b/app/client/cypress/e2e/Regression/ServerSide/QueryPane/Querypane_Mongo_Spec.js index c612414bee64..1d68f21220b5 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/QueryPane/Querypane_Mongo_Spec.js +++ b/app/client/cypress/e2e/Regression/ServerSide/QueryPane/Querypane_Mongo_Spec.js @@ -16,7 +16,7 @@ import { apiPage, } from "../../../../support/Objects/ObjectsCore"; import { Widgets } from "../../../../support/Pages/DataSources"; -import BottomPane from "../../../../support/Pages/IDE/BottomPane"; +import BottomTabs from "../../../../support/Pages/IDE/BottomTabs"; let datasourceName; @@ -70,7 +70,7 @@ describe( dataSources.EnterQuery(`{"find": "listingAndReviews","limit": 10}`); agHelper.FocusElement(locators._codeMirrorTextArea); dataSources.RunQuery(); - BottomPane.response.validateRecordCount({ count: 10, operator: "lte" }); + BottomTabs.response.validateRecordCount({ count: 10, operator: "lte" }); cy.deleteQueryUsingContext(); }); @@ -92,7 +92,7 @@ describe( fieldValue: "listingAndReviews", }); dataSources.RunQuery(); - BottomPane.response.validateRecordCount({ count: 10, operator: "lte" }); + BottomTabs.response.validateRecordCount({ count: 10, operator: "lte" }); agHelper.EnterValue("{beds : {$lte: 2}}", { propFieldName: "", @@ -100,7 +100,7 @@ describe( inputFieldName: "Query", }); dataSources.RunQuery(); - BottomPane.response.validateRecordCount({ count: 10, operator: "lte" }); + BottomTabs.response.validateRecordCount({ count: 10, operator: "lte" }); agHelper.EnterValue("{number_of_reviews: -1}", { propFieldName: "", @@ -108,7 +108,7 @@ describe( inputFieldName: "Sort", }); //sort descending dataSources.RunQuery(); - BottomPane.response.validateRecordCount({ count: 10, operator: "lte" }); + BottomTabs.response.validateRecordCount({ count: 10, operator: "lte" }); agHelper.EnterValue("{house_rules: 1, description:1}", { propFieldName: "", @@ -130,7 +130,7 @@ describe( "Response is not as expected for Find commmand with multiple conditions", ); }); - BottomPane.response.validateRecordCount({ count: 5, operator: "lte" }); + BottomTabs.response.validateRecordCount({ count: 5, operator: "lte" }); agHelper.EnterValue("2", { propFieldName: "", @@ -144,7 +144,7 @@ describe( "Response is not as expected for Find commmand with multiple conditions", ); }); - BottomPane.response.validateRecordCount({ count: 5, operator: "lte" }); + BottomTabs.response.validateRecordCount({ count: 5, operator: "lte" }); cy.deleteQueryUsingContext(); }); @@ -432,7 +432,7 @@ describe( ); dataSources.RunQuery(); - BottomPane.response.validateRecordCount({ count: 10, operator: "lte" }); + BottomTabs.response.validateRecordCount({ count: 10, operator: "lte" }); dataSources.AssertTableInVirtuosoList(datasourceName, "NonAsciiTest"); diff --git a/app/client/cypress/e2e/Regression/ServerSide/QueryPane/S3_1_spec.js b/app/client/cypress/e2e/Regression/ServerSide/QueryPane/S3_1_spec.js index 4cd40d69e785..794c194195fe 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/QueryPane/S3_1_spec.js +++ b/app/client/cypress/e2e/Regression/ServerSide/QueryPane/S3_1_spec.js @@ -1,6 +1,6 @@ /// -import BottomPane from "../../../../support/Pages/IDE/BottomPane"; +import BottomTabs from "../../../../support/Pages/IDE/BottomTabs"; const queryLocators = require("../../../../locators/QueryEditor.json"); const generatePage = require("../../../../locators/GeneratePage.json"); @@ -195,7 +195,7 @@ describe( cy.typeValueNValidate(fileName, formControls.s3ListPrefix); dataSources.RunQuery({ toValidateResponse: false }); - BottomPane.response.selectResponseResponseTypeFromMenu("JSON"); + BottomTabs.response.selectResponseResponseTypeFromMenu("JSON"); cy.wait("@postExecute").then(({ response }) => { expect(response.body.data.isExecutionSuccess).to.eq(true); diff --git a/app/client/cypress/support/Pages/DataSources.ts b/app/client/cypress/support/Pages/DataSources.ts index 01e708808699..58a3099f2b49 100644 --- a/app/client/cypress/support/Pages/DataSources.ts +++ b/app/client/cypress/support/Pages/DataSources.ts @@ -13,7 +13,7 @@ import PageList from "./PageList"; import { anvilLocators } from "./Anvil/Locators"; import { PluginActionForm } from "./PluginActionForm"; import ApiEditor from "../../locators/ApiEditor"; -import BottomPane from "./IDE/BottomPane"; +import BottomTabs from "./IDE/BottomTabs"; export const DataSourceKVP = { Postgres: "PostgreSQL", @@ -1150,13 +1150,13 @@ export class DataSources { this.RunQuery(); if (tableCheck) { this.agHelper.AssertElementVisibility( - BottomPane.response.getResponseTypeSelector("TABLE"), + BottomTabs.response.getResponseTypeSelector("TABLE"), ); this.agHelper.AssertElementVisibility( - BottomPane.response.getResponseTypeSelector("JSON"), + BottomTabs.response.getResponseTypeSelector("JSON"), ); this.agHelper.AssertElementVisibility( - BottomPane.response.getResponseTypeSelector("RAW"), + BottomTabs.response.getResponseTypeSelector("RAW"), ); } } @@ -1168,23 +1168,23 @@ export class DataSources { }: { count?: number; operator?: Parameters< - typeof BottomPane.response.validateRecordCount + typeof BottomTabs.response.validateRecordCount >[0]["operator"]; responseTypes?: ("TABLE" | "JSON" | "RAW")[]; } = {}) { this.RunQuery(); - BottomPane.response.openResponseTypeMenu(); + BottomTabs.response.openResponseTypeMenu(); responseTypes.forEach((responseType) => { this.agHelper.AssertElementVisibility( - BottomPane.response.locators.responseTypeMenuItem(responseType), + BottomTabs.response.locators.responseTypeMenuItem(responseType), ); }); - BottomPane.response.closeResponseTypeMenu(); + BottomTabs.response.closeResponseTypeMenu(); - BottomPane.response.validateRecordCount({ + BottomTabs.response.validateRecordCount({ count, operator, }); diff --git a/app/client/cypress/support/Pages/IDE/BottomPane/Response.ts b/app/client/cypress/support/Pages/IDE/BottomTabs/Response.ts similarity index 100% rename from app/client/cypress/support/Pages/IDE/BottomPane/Response.ts rename to app/client/cypress/support/Pages/IDE/BottomTabs/Response.ts diff --git a/app/client/cypress/support/Pages/IDE/BottomPane/index.ts b/app/client/cypress/support/Pages/IDE/BottomTabs/index.ts similarity index 72% rename from app/client/cypress/support/Pages/IDE/BottomPane/index.ts rename to app/client/cypress/support/Pages/IDE/BottomTabs/index.ts index 055d7812dd5b..fdaabaae66e1 100644 --- a/app/client/cypress/support/Pages/IDE/BottomPane/index.ts +++ b/app/client/cypress/support/Pages/IDE/BottomTabs/index.ts @@ -1,6 +1,6 @@ import { Response } from "./Response"; -class BottomPane { +class BottomTabs { public readonly response: Response; constructor() { @@ -8,4 +8,4 @@ class BottomPane { } } -export default new BottomPane(); +export default new BottomTabs(); diff --git a/app/client/cypress/support/Pages/IDE/Bottompane/Response.ts b/app/client/cypress/support/Pages/IDE/Bottompane/Response.ts deleted file mode 100644 index ca1db0fa7ca1..000000000000 --- a/app/client/cypress/support/Pages/IDE/Bottompane/Response.ts +++ /dev/null @@ -1,21 +0,0 @@ -class Response { - private ResponseTab = "//button[@data-testid='t--tab-RESPONSE_TAB']"; - - public switchToResponseTab(): void { - cy.xpath(this.ResponseTab).click({ force: true }); - } - - public getResponseTypeSelector(type: string): string { - return `//div[@data-testid='t--response-tab-segmented-control']//span[text()='${type}']`; - } - - public switchResponseType(type: string): void { - this.switchToResponseTab(); - cy.xpath(this.getResponseTypeSelector(type)).click({ force: true }); - } - - // TODO: Implement this method when response UI is ready - public validateRecordCount(count: number): void {} -} - -export { Response }; diff --git a/app/client/cypress/support/Pages/IDE/Bottompane/index.ts b/app/client/cypress/support/Pages/IDE/Bottompane/index.ts deleted file mode 100644 index 055d7812dd5b..000000000000 --- a/app/client/cypress/support/Pages/IDE/Bottompane/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Response } from "./Response"; - -class BottomPane { - public readonly response: Response; - - constructor() { - this.response = new Response(); - } -} - -export default new BottomPane();