Skip to content

Commit

Permalink
included encompassed to include all subselector responses
Browse files Browse the repository at this point in the history
  • Loading branch information
vsvamsi1 committed Nov 4, 2024
1 parent c91d1f7 commit 557172d
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe(
* setDate--> is a Command to select the date in the date picker
*/

cy.setDate(1,"ddd MMM DD YYYY");
cy.setDate(1);
const nextDay = dayjs().add(1, "days").format("DD/MM/YYYY");
cy.log(nextDay);
cy.get(formWidgetsPage.datepickerWidget + " .bp3-input").should(
Expand Down
1 change: 0 additions & 1 deletion app/client/cypress/limited-tests.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# To run only limited tests - give the spec names in below format:
cypress/e2e/Regression/ClientSide/Templates/Fork_Template_spec.js
cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePicker2_spec.js
# For running all specs - uncomment below:
#cypress/e2e/**/**/*

Expand Down
5 changes: 5 additions & 0 deletions app/client/src/sagas/EvalWorkerActionSagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { sortJSExecutionDataByCollectionId } from "workers/Evaluation/JSObject/u
import type { LintTreeSagaRequestData } from "plugins/Linting/types";
import { evalErrorHandler } from "./EvalErrorHandler";
import { getUnevaluatedDataTree } from "selectors/dataTreeSelectors";
import { endSpan, startRootSpan } from "UITelemetry/generateTraces";

export interface UpdateDataTreeMessageData {
workerResponse: EvalTreeResponseData;
Expand Down Expand Up @@ -166,9 +167,13 @@ export function* handleEvalWorkerMessage(message: TMessage<any>) {
}
case MAIN_THREAD_ACTION.UPDATE_DATATREE: {
const { workerResponse } = data as UpdateDataTreeMessageData;
const rootSpan = startRootSpan("DataTreeFactory.create");

const unEvalAndConfigTree: ReturnType<typeof getUnevaluatedDataTree> =
yield select(getUnevaluatedDataTree);

endSpan(rootSpan);

yield call(updateDataTreeHandler, {
evalTreeResponse: workerResponse as EvalTreeResponseData,
unevalTree: unEvalAndConfigTree.unEvalTree || {},
Expand Down
13 changes: 13 additions & 0 deletions app/client/src/sagas/EvaluationsSaga.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,10 +350,14 @@ export function* evaluateAndExecuteDynamicTrigger(
callbackData?: Array<any>,
globalContext?: Record<string, unknown>,
) {
const rootSpan = startRootSpan("DataTreeFactory.create");

const unEvalTree: ReturnType<typeof getUnevaluatedDataTree> = yield select(
getUnevaluatedDataTree,
);

endSpan(rootSpan);

log.debug({ execute: dynamicTrigger });
const response: { errors: EvaluationError[]; result: unknown } = yield call(
evalWorker.request,
Expand Down Expand Up @@ -497,8 +501,12 @@ export function* executeJSFunction(
export // TODO: Fix this the next time the file is edited
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function* validateProperty(property: string, value: any, props: WidgetProps) {
const rootSpan = startRootSpan("DataTreeFactory.create");

const unEvalAndConfigTree: ReturnType<typeof getUnevaluatedDataTree> =
yield select(getUnevaluatedDataTree);

endSpan(rootSpan);
const configTree = unEvalAndConfigTree.configTree;
const entityConfig = configTree[props.widgetName] as WidgetEntityConfig;
const validation = entityConfig?.validationPaths[property];
Expand Down Expand Up @@ -661,9 +669,14 @@ function* evalAndLintingHandler(
return;
}

const rootSpan = startRootSpan("DataTreeFactory.create");

// Generate all the data needed for both eval and linting
const unEvalAndConfigTree: ReturnType<typeof getUnevaluatedDataTree> =
yield select(getUnevaluatedDataTree);

endSpan(rootSpan);

const postEvalActions = getPostEvalActions(action);
const fn: (...args: unknown[]) => CallEffect<unknown> | ForkEffect<unknown> =
isBlockingCall ? call : fork;
Expand Down

0 comments on commit 557172d

Please sign in to comment.