From 30437ed9148a414cc9203c6c443d347bd9de6c25 Mon Sep 17 00:00:00 2001 From: David Liu <48995019+dliu27@users.noreply.github.com> Date: Mon, 9 Dec 2024 14:01:55 -0500 Subject: [PATCH] [11/n] [RFC] add jest tests (#26249) ## Summary & Motivation Linear: https://linear.app/dagster-labs/issue/FE-713/add-jest-tests-for-sensors-and-schedules Adds jest tests for launch all ## How I Tested These Changes yarn jest, ts, lint --- .../ui-core/src/ticks/DryRunRequestTable.tsx | 9 +- .../EvaluateScheduleDialog.fixtures.tsx | 91 +++++++++- .../SensorDryRunDialog.fixtures.tsx | 158 ++++++++++++++++++ .../__tests__/DryRunRequestTable.test.tsx | 21 ++- .../__tests__/EvaluateScheduleDialog.test.tsx | 68 ++++++++ .../__tests__/SensorDryRunDialog.test.tsx | 57 ++++++- .../graphql/test_run_launcher.py | 8 +- 7 files changed, 398 insertions(+), 14 deletions(-) diff --git a/js_modules/dagster-ui/packages/ui-core/src/ticks/DryRunRequestTable.tsx b/js_modules/dagster-ui/packages/ui-core/src/ticks/DryRunRequestTable.tsx index ca8082e8561fb..b9859d06be68a 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/ticks/DryRunRequestTable.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/ticks/DryRunRequestTable.tsx @@ -52,6 +52,7 @@ export const RunRequestTable = ({runRequests, isJob, repoAddress, mode, jobName} { setSelectedRequest(request); setVisibleDialog('config'); @@ -91,10 +92,14 @@ export const RunRequestTable = ({runRequests, isJob, repoAddress, mode, jobName} ); }; -function PreviewButton({onClick}: {onClick: () => void}) { +function PreviewButton({request, onClick}: {request: RunRequestFragment; onClick: () => void}) { return ( -