From 6fb7d0d5c64c6cb619459d61fb375ecaec6c121a Mon Sep 17 00:00:00 2001 From: bengotow Date: Wed, 7 Aug 2024 08:13:21 -0500 Subject: [PATCH] Fix test - need to pass dynamicPartitionsDefinitionName --- .../LaunchAssetChoosePartitionsDialog.test.tsx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/__tests__/LaunchAssetChoosePartitionsDialog.test.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/__tests__/LaunchAssetChoosePartitionsDialog.test.tsx index b001d6fb59497..d790f9317e470 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/__tests__/LaunchAssetChoosePartitionsDialog.test.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/__tests__/LaunchAssetChoosePartitionsDialog.test.tsx @@ -9,6 +9,7 @@ import { buildAddDynamicPartitionSuccess, buildAssetKey, buildAssetNode, + buildDimensionDefinitionType, buildDimensionPartitionKeys, buildMultiPartitionStatuses, buildPartitionDefinition, @@ -127,6 +128,7 @@ describe('launchAssetChoosePartitionsDialog', () => { const savePartitionButton = screen.getByTestId('save-partition-button'); userEvent.click(savePartitionButton); + // Verify that it refreshes asset health after partition is added await waitFor(() => { expect(assetASecondQueryMockResult).toHaveBeenCalled(); }); @@ -150,7 +152,18 @@ function buildAsset(name: string, dynamicPartitionKeys: string[]) { }), ], partitionDefinition: buildPartitionDefinition({ - name: 'foo', + name: 'not-foo', + dimensionTypes: [ + buildDimensionDefinitionType({ + name: 'a', + type: PartitionDefinitionType.DYNAMIC, + dynamicPartitionsDefinitionName: 'foo', + }), + buildDimensionDefinitionType({ + name: 'b', + type: PartitionDefinitionType.TIME_WINDOW, + }), + ], }), assetPartitionStatuses: buildMultiPartitionStatuses({ primaryDimensionName: 'b',