From 2985ea9ad523e6f7a26fc5e86239556923a1aa9c Mon Sep 17 00:00:00 2001 From: Ankita Kinger Date: Sun, 1 Dec 2024 19:50:15 +0530 Subject: [PATCH] fixing cypress tests --- .../ClientSide/OtherUIFeatures/ApiError_spec.ts | 4 ++-- .../ClientSide/OtherUIFeatures/EntityBottomBar_spec.ts | 8 ++++---- app/client/cypress/support/Pages/ApiPage.ts | 6 ++---- .../components/QueryResponseTab/styles.ts | 1 + 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/ApiError_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/ApiError_spec.ts index 622e3eee2419..f489e2757d07 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/ApiError_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/ApiError_spec.ts @@ -12,12 +12,12 @@ describe( // Create api that causes an error _.apiPage.CreateAndFillApi("https://fakeapi/user"); }); - it("it shows error message", () => { + it("it shows error message in response tab", () => { _.apiPage.RunAPI(false); _.debuggerHelper.AssertOpen(PageType.API); _.apiPage.ResponseStatusCheck("PE-RST-5000"); }); - it("it shows debug button and navigates", () => { + it("it shows error messages in error tab", () => { _.apiPage.DebugError(); _.debuggerHelper.AssertSelectedTab( Cypress.env("MESSAGES").DEBUGGER_ERRORS(), diff --git a/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/EntityBottomBar_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/EntityBottomBar_spec.ts index 806170b30ff9..b60cf975d629 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/EntityBottomBar_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/OtherUIFeatures/EntityBottomBar_spec.ts @@ -102,13 +102,13 @@ describe( //Create and run query. _.dataSources.EnterQuery( - "SELECT * FROM users ORDER BY id LIMIT 10;", + "SELECT * FROM public.users ORDER BY id LIMIT 10;", 1000, ); _.dataSources.RunQuery(); //Verify if bottom bar is open on executing query. _.debuggerHelper.AssertOpen(PageType.Query); - //Verify if response atb is selected on executing query. + //Verify if response tab is selected on executing query. _.debuggerHelper.AssertSelectedTab( Cypress.env("MESSAGES").DEBUGGER_RESPONSE(), ); @@ -140,13 +140,13 @@ describe( _.debuggerHelper.AssertClosed(); //Create and run query. _.dataSources.EnterQuery( - "SELECT * FROM users ORDER BY id LIMIT 10;", + "SELECT * FROM public.users ORDER BY id LIMIT 10;", 1000, ); _.dataSources.RunQuery(); //Verify if bottom bar is open on executing query. _.debuggerHelper.AssertOpen(PageType.Query); - //Verify if response atb is selected on executing query. + //Verify if response tab is selected on executing query. _.debuggerHelper.AssertSelectedTab( Cypress.env("MESSAGES").DEBUGGER_RESPONSE(), ); diff --git a/app/client/cypress/support/Pages/ApiPage.ts b/app/client/cypress/support/Pages/ApiPage.ts index 57b7d33abbb7..61e6d8e3c2a6 100644 --- a/app/client/cypress/support/Pages/ApiPage.ts +++ b/app/client/cypress/support/Pages/ApiPage.ts @@ -82,8 +82,7 @@ export class ApiPage { private _paginationTypeLabels = ".t--apiFormPaginationType label"; _saveAsDS = ".t--store-as-datasource"; _responseStatus = ".t--response-status-code"; - public _responseTabHeader = "[data-testid=t--tab-HEADERS_TAB]"; - public _headersTabContent = ".t--headers-tab"; + public _responseTabError = "[data-testid=t--tab-ERROR_TAB]"; public _autoGeneratedHeaderInfoIcon = (key: string) => `.t--auto-generated-${key}-info`; _nextCursorValue = ".t--apiFormPaginationNextCursorValue"; @@ -471,8 +470,7 @@ export class ApiPage { } DebugError() { - this.agHelper.GetNClick(this._responseTabHeader); - cy.get(this._headersTabContent).contains("Debug").click(); + this.agHelper.GetNClick(this._responseTabError); } public FillCurlNImport(value: string) { diff --git a/app/client/src/PluginActionEditor/components/PluginActionResponse/components/QueryResponseTab/styles.ts b/app/client/src/PluginActionEditor/components/PluginActionResponse/components/QueryResponseTab/styles.ts index a94fde58c5e1..9a132cdcd609 100644 --- a/app/client/src/PluginActionEditor/components/PluginActionResponse/components/QueryResponseTab/styles.ts +++ b/app/client/src/PluginActionEditor/components/PluginActionResponse/components/QueryResponseTab/styles.ts @@ -33,6 +33,7 @@ export const StatusBar = styled.div` padding: 8px; border-bottom: 1px solid var(--ads-v2-color-border); z-index: var(--ads-v2-z-index-1); + background: var(--ads-v2-color-bg); `; export const StatusBarInfo = styled.div`