Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,15 @@ describe("Api Error Debugger", { tags: ["@tag.IDE"] }, () => {
});
it("it shows debug button and navigates", () => {
_.apiPage.DebugError();
_.debuggerHelper.AssertSelectedTab("Error");
_.debuggerHelper.AssertSelectedTab(
Cypress.env("MESSAGES").DEBUGGER_ERRORS(),
);
_.debuggerHelper.AssertErrorCount(1);
EditorNavigation.SwitchScreenMode(EditorViewMode.SplitScreen);
_.apiPage.DebugError();
_.debuggerHelper.AssertSelectedTab("Error");
_.debuggerHelper.AssertSelectedTab(
Cypress.env("MESSAGES").DEBUGGER_ERRORS(),
);
_.debuggerHelper.AssertErrorCount(1);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ describe("Entity bottom bar", { tags: ["@tag.IDE"] }, () => {
_.debuggerHelper.ClickDebuggerIcon();
_.debuggerHelper.AssertOpen(PageType.Canvas);
//Verify if selected tab is errors in tab title.
_.debuggerHelper.AssertSelectedTab("Errors");
_.debuggerHelper.AssertSelectedTab(
Cypress.env("MESSAGES").DEBUGGER_ERRORS(),
);
// verify if bottom bar is closed on clicking close icon in canvas.
_.debuggerHelper.CloseBottomBar();
_.debuggerHelper.AssertClosed();
Expand All @@ -21,15 +23,19 @@ describe("Entity bottom bar", { tags: ["@tag.IDE"] }, () => {
//Verify if bottom bar opens JSEditor.
_.debuggerHelper.AssertOpen(PageType.JsEditor);
// Verify if selected tab is response.
_.debuggerHelper.AssertSelectedTab("Response");
_.debuggerHelper.AssertSelectedTab(
Cypress.env("MESSAGES").DEBUGGER_RESPONSE(),
);
//Verify if bottom bar is closed on clicking close icon in JSEditor.
_.debuggerHelper.CloseBottomBar();
_.debuggerHelper.AssertClosed();
//Verify if bottom bar is open on executing JSFunction.
_.jsEditor.RunJSObj();
_.debuggerHelper.AssertOpen(PageType.JsEditor);
//verify if response tab is selected on execution JSFunction.
_.debuggerHelper.AssertSelectedTab("Response");
_.debuggerHelper.AssertSelectedTab(
Cypress.env("MESSAGES").DEBUGGER_RESPONSE(),
);
//verify if bottom bar is closed on switching to canvas page.
EditorNavigation.ShowCanvas();
_.debuggerHelper.AssertClosed();
Expand All @@ -45,13 +51,17 @@ describe("Entity bottom bar", { tags: ["@tag.IDE"] }, () => {
_.debuggerHelper.ClickDebuggerIcon();
_.debuggerHelper.AssertOpen(PageType.API);
//Verify if selected tab is errors in tab title.
_.debuggerHelper.AssertSelectedTab("Errors");
_.debuggerHelper.AssertSelectedTab(
Cypress.env("MESSAGES").DEBUGGER_ERRORS(),
);
//Verify if bottom bar is open on executing api.
_.apiPage.RunAPI();
_.agHelper.Sleep(1000);
_.debuggerHelper.AssertOpen(PageType.API);
//verify if response tab is selected on execution api.
_.debuggerHelper.AssertSelectedTab("Response");
_.debuggerHelper.AssertSelectedTab(
Cypress.env("MESSAGES").DEBUGGER_RESPONSE(),
);
});

it("4. Bottom bar in Datasource", () => {
Expand All @@ -73,7 +83,9 @@ describe("Entity bottom bar", { tags: ["@tag.IDE"] }, () => {
_.debuggerHelper.AssertOpen(PageType.DataSources);
//Verify if selected tab is errors and error count is
//Verify if selected tab is errors in tab title.
_.debuggerHelper.AssertSelectedTab("Errors");
_.debuggerHelper.AssertSelectedTab(
Cypress.env("MESSAGES").DEBUGGER_ERRORS(),
);
//Verify if bottom bar is closed on clicking close icon in active datasource page.
_.debuggerHelper.CloseBottomBar();
_.debuggerHelper.AssertClosed();
Expand All @@ -94,7 +106,9 @@ describe("Entity bottom bar", { tags: ["@tag.IDE"] }, () => {
//Verify if bottom bar is open on executing query.
_.debuggerHelper.AssertOpen(PageType.Query);
//Verify if response atb is selected on executing query.
_.debuggerHelper.AssertSelectedTab("Response");
_.debuggerHelper.AssertSelectedTab(
Cypress.env("MESSAGES").DEBUGGER_RESPONSE(),
);
// clean up
_.dataSources.DeleteQuery("Query1");
_.dataSources.DeleteDatasourceFromWithinDS(dbName);
Expand All @@ -108,7 +122,9 @@ describe("Entity bottom bar", { tags: ["@tag.IDE"] }, () => {
_.debuggerHelper.AssertOpen(PageType.DataSources);
//Verify if selected tab is errors and error count is
//Verify if selected tab is errors in tab title.
_.debuggerHelper.AssertSelectedTab("Errors");
_.debuggerHelper.AssertSelectedTab(
Cypress.env("MESSAGES").DEBUGGER_ERRORS(),
);
//Verify if bottom bar is closed on clicking close icon in active datasource page.
_.debuggerHelper.CloseBottomBar();
_.debuggerHelper.AssertClosed();
Expand All @@ -125,7 +141,9 @@ describe("Entity bottom bar", { tags: ["@tag.IDE"] }, () => {
//Verify if bottom bar is open on executing query.
_.debuggerHelper.AssertOpen(PageType.Query);
//Verify if response atb is selected on executing query.
_.debuggerHelper.AssertSelectedTab("Response");
_.debuggerHelper.AssertSelectedTab(
Cypress.env("MESSAGES").DEBUGGER_RESPONSE(),
);
// clean up
_.dataSources.DeleteQuery("Query1");
cy.get("@dsName").then(($dsName) => {
Expand Down
21 changes: 1 addition & 20 deletions app/client/cypress/support/Pages/DebuggerHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,21 +110,7 @@ export class DebuggerHelper {
this.agHelper.AssertElementVisibility(
this.locators._bottomPaneContainer[pageType],
);
// this.agHelper.AssertHeight(
// this.locators._bottomPaneContainer[pageType],
// this.bottomPaneHeight,
// );
break;
// case PageType.Query:
// case PageType.DataSources:
// this.agHelper.AssertElementVisibility(
// this.locators._bottomPaneContainer[pageType],
// );
// // this.agHelper.AssertHeight(
// // this.locators._bottomPaneContainer[pageType],
// // this.bottomPaneHeight - 1, // -1 to offset error
// // );
// break;
}
}

Expand All @@ -150,12 +136,7 @@ export class DebuggerHelper {
}

LogStateContains(text: string, index?: number) {
this.agHelper.GetNAssertContains(
this.locators._logState,
text,
"exist",
index,
);
this.agHelper.GetNAssertContains(this.locators._logState, text, "exist");
}

AssertErrorCount(count: number) {
Expand Down
1 change: 1 addition & 0 deletions app/client/src/ce/constants/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,7 @@ export const LOGS_FILTER_OPTION_SYSTEM = () => "System logs";
export const NO_LOGS = () => "No logs to show";
export const NO_ERRORS = () => "No signs of trouble here!";
export const DEBUGGER_ERRORS = () => "Errors";
export const DEBUGGER_RESPONSE = () => "Response";
export const DEBUGGER_LOGS = () => "Logs";
export const INSPECT_ENTITY = () => "Inspect entity";
export const INSPECT_ENTITY_BLANK_STATE = () => "Select an entity to inspect";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
createMessage,
DEBUGGER_ERRORS,
DEBUGGER_LOGS,
DEBUGGER_RESPONSE,
EMPTY_RESPONSE_FIRST_HALF,
EMPTY_RESPONSE_LAST_HALF,
} from "@appsmith/constants/messages";
Expand Down Expand Up @@ -367,7 +368,7 @@ function ApiResponseView(props: Props) {
const tabs: BottomTab[] = [
{
key: "response",
title: "Response",
title: createMessage(DEBUGGER_RESPONSE),
panelComponent: (
<ResponseTabWrapper>
<ApiResponseMeta
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
createMessage,
DEBUGGER_ERRORS,
DEBUGGER_LOGS,
DEBUGGER_RESPONSE,
EXECUTING_FUNCTION,
NO_JS_FUNCTION_RETURN_VALUE,
UPDATING_JS_COLLECTION,
Expand Down Expand Up @@ -227,7 +228,7 @@ function JSResponseView(props: Props) {
const tabs: BottomTab[] = [
{
key: "response",
title: "Response",
title: createMessage(DEBUGGER_RESPONSE),
panelComponent: (
<>
{(hasExecutionParseErrors ||
Expand Down
3 changes: 2 additions & 1 deletion app/client/src/pages/Editor/QueryEditor/EditorJSONtoForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import styled from "styled-components";
import FormRow from "components/editorComponents/FormRow";
import {
createMessage,
DEBUGGER_RESPONSE,
DOCUMENTATION,
DOCUMENTATION_TOOLTIP,
} from "@appsmith/constants/messages";
Expand Down Expand Up @@ -246,7 +247,7 @@ export function EditorJSONtoForm(props: Props) {
if (currentActionConfig) {
responseTabs.push({
key: "response",
title: "Response",
title: createMessage(DEBUGGER_RESPONSE),
panelComponent: (
<QueryResponseTab
actionSource={actionSource}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { DEBUGGER_TAB_KEYS } from "components/editorComponents/Debugger/helpers"
import {
DEBUGGER_ERRORS,
DEBUGGER_LOGS,
DEBUGGER_RESPONSE,
createMessage,
} from "@appsmith/constants/messages";
import DebuggerLogs from "components/editorComponents/Debugger/DebuggerLogs";
Expand Down Expand Up @@ -216,7 +217,7 @@ function QueryDebuggerTabs({
if (currentActionConfig) {
responseTabs.unshift({
key: "response",
title: "Response",
title: createMessage(DEBUGGER_RESPONSE),
panelComponent: (
<QueryResponseTab
actionSource={actionSource}
Expand Down