Skip to content

Commit

Permalink
Fix test - need to pass dynamicPartitionsDefinitionName
Browse files Browse the repository at this point in the history
  • Loading branch information
bengotow committed Aug 7, 2024
1 parent da760e7 commit 4e76e18
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
buildAddDynamicPartitionSuccess,
buildAssetKey,
buildAssetNode,
buildDimensionDefinitionType,
buildDimensionPartitionKeys,
buildMultiPartitionStatuses,
buildPartitionDefinition,
Expand Down Expand Up @@ -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();
});
Expand All @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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 (
<VirtualizedAssetRow
key={key}
Expand Down

0 comments on commit 4e76e18

Please sign in to comment.