Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesBochet committed Oct 21, 2024
1 parent cf80505 commit 440dc66
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export const RecordActionMenuEntriesSetter = () => {
objectId: contextStoreCurrentObjectMetadataId ?? '',
});


if (!objectMetadataItem) {
throw new Error(
`Object metadata item not found for id ${contextStoreCurrentObjectMetadataId}`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ import { computeContextStoreFilters } from '@/context-store/utils/computeContext
import { ViewFilterOperand } from '@/views/types/ViewFilterOperand';
import { generatedMockObjectMetadataItems } from '~/testing/mock-data/generatedMockObjectMetadataItems';
describe('computeContextStoreFilters', () => {
const personObjectMetadataItem =
generatedMockObjectMetadataItems.find(
(item) => item.nameSingular === 'person',
)!;
const personObjectMetadataItem = generatedMockObjectMetadataItems.find(
(item) => item.nameSingular === 'person',
)!;

it('should work for selection mode', () => {
const contextStoreTargetedRecordsRule: ContextStoreTargetedRecordsRule = {
Expand All @@ -31,14 +30,14 @@ describe('computeContextStoreFilters', () => {
mode: 'exclusion',
filters: [
{
id: 'name-filter',
variant: 'default',
id: 'name-filter',
variant: 'default',
fieldMetadataId: personObjectMetadataItem.fields.find(
(field) => field.name === 'name',
)!.id,
value: 'John',
displayValue: 'John',
displayAvatarUrl: undefined,
displayAvatarUrl: undefined,
operand: ViewFilterOperand.Contains,
definition: {
fieldMetadataId: personObjectMetadataItem.fields.find(
Expand Down Expand Up @@ -68,12 +67,11 @@ describe('computeContextStoreFilters', () => {
{
not: {
id: {
in: ['1', '2', '3'],
in: ['1', '2', '3'],
},
},
},
],
});
});

});

0 comments on commit 440dc66

Please sign in to comment.