From e1dab2efa1fb6ce0dc97dc4ce19aab669c04d0f6 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 ++++++++++++++- .../src/workspace/VirtualizedAssetTable.tsx | 4 +--- .../src/workspace/VirtualizedRepoAssetTable.tsx | 2 +- 3 files changed, 16 insertions(+), 5 deletions(-) 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', diff --git a/js_modules/dagster-ui/packages/ui-core/src/workspace/VirtualizedAssetTable.tsx b/js_modules/dagster-ui/packages/ui-core/src/workspace/VirtualizedAssetTable.tsx index 1f519e7488079..536198d988daa 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/workspace/VirtualizedAssetTable.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/workspace/VirtualizedAssetTable.tsx @@ -5,7 +5,7 @@ import {VirtualizedAssetCatalogHeader, VirtualizedAssetRow} from './VirtualizedA import {buildRepoAddress} from './buildRepoAddress'; import {AssetTableFragment} from '../assets/types/AssetTableFragment.types'; import {AssetViewType} from '../assets/useAssetView'; -import {AssetKeyInput, DefinitionTag} from '../graphql/types'; +import {DefinitionTag} from '../graphql/types'; import {StaticSetFilter} from '../ui/BaseFilters/useStaticSetFilter'; import {Container, Inner} from '../ui/VirtualizedTable'; @@ -84,8 +84,6 @@ export const VirtualizedAssetTable = (props: Props) => { return buildRepoAddress(repository.name, repository.location.name); }; - const wipeableAssets = row.type === 'folder' ? row.assets : [row.asset]; - return ( { start={start} checked={false} onToggleChecked={() => {}} - onWipe={() => {}} + onRefresh={() => {}} /> ); })}