diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/Widgets_form_input_table_default_validation.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/Widgets_form_input_table_default_validation.js index 146e4021c0..d9181f25b4 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/Widgets_form_input_table_default_validation.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/Widgets_form_input_table_default_validation.js @@ -33,10 +33,10 @@ describe("Binding the multiple input Widget", function() { .first() .invoke("attr", "value") .should("contain", tabValue); -// cy.get(publish.inputWidget + " " + "input") -// .last() -// .invoke("attr", "value") -// .should("contain", tabValue); + // cy.get(publish.inputWidget + " " + "input") + // .last() + // .invoke("attr", "value") + // .should("contain", tabValue); }); }); }); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/aTobAndbToaBasictest_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/aTobAndbToaBasictest_spec.js index 0b0636d4f9..9909e7e9a7 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/aTobAndbToaBasictest_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/aTobAndbToaBasictest_spec.js @@ -6,12 +6,12 @@ const widgetsPage = require("../../../../locators/Widgets.json"); const publish = require("../../../../locators/publishWidgetspage.json"); const testdata = require("../../../../fixtures/testdata.json"); -describe("aTob and bToa library tests ", function () { +describe("aTob and bToa library tests ", function() { before(() => { cy.addDsl(dsl); }); - it("Input widget test with default value for atob method", function () { + it("Input widget test with default value for atob method", function() { cy.SearchEntityandOpen("Input1"); cy.get(widgetsPage.defaultInput).type(testdata.atobInput); cy.get(commonlocators.editPropCrossButton).click({ force: true }); @@ -22,7 +22,7 @@ describe("aTob and bToa library tests ", function () { ); }); - it("Input widget test with default value for btoa method", function () { + it("Input widget test with default value for btoa method", function() { cy.SearchEntityandOpen("Input2"); cy.get(widgetsPage.defaultInput).type(testdata.btoaInput); cy.get(commonlocators.editPropCrossButton).click({ force: true }); @@ -33,7 +33,7 @@ describe("aTob and bToa library tests ", function () { ); }); - it("publish widget and validate the data displayed in input widgets value for aToB and bToa", function () { + it("publish widget and validate the data displayed in input widgets value for aToB and bToa", function() { cy.PublishtheApp(); cy.get(publish.inputWidget + " " + "input") .first() diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/loadashBasictest_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/loadashBasictest_spec.js index bb8059b63e..6d30dabefc 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/loadashBasictest_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/loadashBasictest_spec.js @@ -6,12 +6,12 @@ const widgetsPage = require("../../../../locators/Widgets.json"); const publish = require("../../../../locators/publishWidgetspage.json"); const testdata = require("../../../../fixtures/testdata.json"); -describe("Loadash basic test with input Widget", function () { +describe("Loadash basic test with input Widget", function() { before(() => { cy.addDsl(dsl); }); - it("Input widget test with default value from another Input widget", function () { + it("Input widget test with default value from another Input widget", function() { cy.SearchEntityandOpen("Input1"); cy.get(widgetsPage.defaultInput).type(testdata.defaultInputBinding); cy.get(commonlocators.editPropCrossButton).click({ force: true }); @@ -22,7 +22,7 @@ describe("Loadash basic test with input Widget", function () { ); }); - it("Input widget test with default value for loadash function", function () { + it("Input widget test with default value for loadash function", function() { cy.SearchEntityandOpen("Input2"); cy.get(widgetsPage.defaultInput).type(testdata.loadashInput); cy.get(commonlocators.editPropCrossButton).click({ force: true }); @@ -33,7 +33,7 @@ describe("Loadash basic test with input Widget", function () { ); }); - it("publish widget and validate the data displayed in input widgets from loadash function", function () { + it("publish widget and validate the data displayed in input widgets from loadash function", function() { cy.PublishtheApp(); cy.get(publish.inputWidget + " " + "input") .first() diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/momentBasictest_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/momentBasictest_spec.js index 27caea2086..19fdd3942e 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/momentBasictest_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/momentBasictest_spec.js @@ -6,12 +6,12 @@ const widgetsPage = require("../../../../locators/Widgets.json"); const publish = require("../../../../locators/publishWidgetspage.json"); const testdata = require("../../../../fixtures/testdata.json"); -describe("Moment basic test with input Widget", function () { +describe("Moment basic test with input Widget", function() { before(() => { cy.addDsl(dsl); }); - it("Input widget test with default value from another Input widget", function () { + it("Input widget test with default value from another Input widget", function() { cy.SearchEntityandOpen("Input1"); cy.get(widgetsPage.defaultInput).type(testdata.defaultInputBinding); cy.get(commonlocators.editPropCrossButton).click({ force: true }); @@ -22,7 +22,7 @@ describe("Moment basic test with input Widget", function () { ); }); - it("Binding second input widget with first input widget and validating", function () { + it("Binding second input widget with first input widget and validating", function() { cy.SearchEntityandOpen("Input2"); cy.get(widgetsPage.defaultInput).type(testdata.momentInput); cy.get(commonlocators.editPropCrossButton).click({ force: true }); @@ -33,7 +33,7 @@ describe("Moment basic test with input Widget", function () { ); }); - it("publish widget and validate the data displayed in input widgets", function () { + it("publish widget and validate the data displayed in input widgets", function() { var currentTime = new Date(); cy.PublishtheApp(); cy.get(publish.inputWidget + " " + "input") diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/LayoutWidgets/Tab_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/LayoutWidgets/Tab_spec.js index 26c376d3a4..6261817622 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/LayoutWidgets/Tab_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/LayoutWidgets/Tab_spec.js @@ -112,7 +112,7 @@ describe("Tab widget test", function() { .should("be.visible"); cy.get(publish.backToEditor).click(); }); -/* Test to be revisted as the undo action is inconsistent in automation + /* Test to be revisted as the undo action is inconsistent in automation it("Tab Widget Functionality To Check undo action after delete", function() { cy.openPropertyPane("tabswidget"); cy.get(Layoutpage.tabDelete) diff --git a/app/client/src/components/editorComponents/Debugger/LogItem.tsx b/app/client/src/components/editorComponents/Debugger/LogItem.tsx index ebf355ba41..ba57bef865 100644 --- a/app/client/src/components/editorComponents/Debugger/LogItem.tsx +++ b/app/client/src/components/editorComponents/Debugger/LogItem.tsx @@ -5,7 +5,6 @@ import { Message, Severity, SourceEntity } from "entities/AppsmithConsole"; import React, { useCallback, useState } from "react"; import ReactJson from "react-json-view"; import styled from "styled-components"; -import { isString } from "lodash"; import EntityLink, { DebuggerLinkUI } from "./EntityLink"; import { SeverityIcon, SeverityIconColor } from "./helpers"; import { useDispatch } from "react-redux"; @@ -102,7 +101,7 @@ const Log = styled.div<{ collapsed: boolean }>` `; const JsonWrapper = styled.div` - padding-top: 4px; + padding-top: ${(props) => props.theme.spaces[1]}px; svg { color: ${(props) => props.theme.colors.debugger.jsonIcon} !important; height: 12px !important; @@ -139,6 +138,10 @@ const StyledSearchIcon = styled(Icon)` } `; +const MessageWrapper = styled.div` + padding-top: ${(props) => props.theme.spaces[1]}px; +`; + export const getLogItemProps = (e: Message) => { return { icon: SeverityIcon[e.severity] as IconName, @@ -149,9 +152,9 @@ export const getLogItemProps = (e: Message) => { timeTaken: e.timeTaken ? `${e.timeTaken}ms` : "", severity: e.severity, text: e.text, - message: e.message && isString(e.message) ? e.message : "", state: e.state, id: e.source ? e.source.id : undefined, + messages: e.messages, }; }; @@ -163,11 +166,11 @@ type LogItemProps = { timeTaken: string; severity: Severity; text: string; - message: string; state?: Record; id?: string; source?: SourceEntity; expand?: boolean; + messages: Message["messages"]; }; function LogItem(props: LogItemProps) { @@ -182,12 +185,12 @@ function LogItem(props: LogItemProps) { }, collapsed: 1, }; - const showToggleIcon = props.state || props.message; + const showToggleIcon = props.state || props.messages; const dispatch = useDispatch(); - const openHelpModal = useCallback((e) => { + const openHelpModal = useCallback((e, message?: string) => { e.stopPropagation(); - const text = props.message || props.text; + const text = message || props.text; AnalyticsUtil.logEvent("OPEN_OMNIBAR", { source: "DEBUGGER", @@ -196,6 +199,7 @@ function LogItem(props: LogItemProps) { dispatch(setGlobalSearchQuery(text || "")); dispatch(toggleShowGlobalSearchModal()); }, []); + const messages = props.messages || []; return ( - {props.message && ( -
- - {props.message} - -
- )} + {messages.map((e) => { + return ( + + openHelpModal(event, e.message)} + > + {e.message} + + + ); + })} {props.state && ( ; + timeTaken?: string; // "where" source entity and propertyPsath. source?: SourceEntity; diff --git a/app/client/src/sagas/ActionExecutionSagas.ts b/app/client/src/sagas/ActionExecutionSagas.ts index 13fbab4aa3..2a91260b33 100644 --- a/app/client/src/sagas/ActionExecutionSagas.ts +++ b/app/client/src/sagas/ActionExecutionSagas.ts @@ -534,7 +534,7 @@ export function* executeActionSaga( id: actionId, }, state: response.data?.request ?? null, - message: payload.body as string, + messages: [{ message: payload.body as string }], }); PerformanceTracker.stopAsyncTracking( PerformanceTransactionName.EXECUTE_ACTION, @@ -872,9 +872,13 @@ function* runActionSaga( name: actionObject.name, id: actionId, }, - message: !isString(payload.body) - ? JSON.stringify(payload.body) - : payload.body, + messages: [ + { + message: !isString(payload.body) + ? JSON.stringify(payload.body) + : payload.body, + }, + ], state: response.data?.request ?? null, }); @@ -983,7 +987,7 @@ function* executePageLoadAction(pageAction: PageAction) { id: pageAction.id, }, state: response.data?.request ?? null, - message: JSON.stringify(body), + messages: [{ message: JSON.stringify(body) }], }); yield put( diff --git a/app/client/src/sagas/EvaluationsSaga.ts b/app/client/src/sagas/EvaluationsSaga.ts index 9c37446a41..d61b9270d8 100644 --- a/app/client/src/sagas/EvaluationsSaga.ts +++ b/app/client/src/sagas/EvaluationsSaga.ts @@ -108,13 +108,17 @@ function getLatestEvalPropertyErrors( if (evalErrors.length) { // TODO Rank and set the most critical error const error = evalErrors[0]; + const errorMessages = evalErrors.map((e) => ({ + message: e.errorMessage, + })); + // Add or update updatedDebuggerErrors[debuggerKey] = { logType: LOG_TYPE.EVAL_ERROR, text: PropertyEvalErrorTypeDebugMessage[error.errorType]( propertyPath, ), - message: JSON.stringify(error.errorMessage), + messages: errorMessages, severity: error.severity, timestamp: moment().format("hh:mm:ss"), source: { @@ -124,7 +128,7 @@ function getLatestEvalPropertyErrors( propertyPath: propertyPath, }, state: { - value: evaluatedValue, + [propertyPath]: evaluatedValue, }, }; } else if (debuggerKey in updatedDebuggerErrors) {