Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,28 @@
expect(getGeneratedAnalyticsMetadata(area)).toEqual(getMetadata({}, 'visibleContent'));
});

test('resolves the column label for a visibleContent option toggle', () => {
const wrapper = renderCollectionPreferences({
visibleContentPreference,
});

wrapper.findTriggerButton().click();

const area = wrapper
.findModal()!
.findVisibleContentPreference()!
.findToggleByIndex(1, 2)!
.findNativeInput()
.getElement();
expect(getGeneratedAnalyticsMetadata(area)).toEqual({

Check failure on line 342 in src/collection-preferences/__tests__/analytics-metadata.test.tsx

View workflow job for this annotation

GitHub Actions / build (React 18) / build

CollectionPreferences renders correct analytics metadata › component innerContexts › resolves the column label for a visibleContent option toggle

expect(received).toEqual(expected) // deep equality - Expected - 1 + Received + 1 @@ -14,8 +14,8 @@ }, "type": "component", }, ], "detail": Object { - "label": "Domain name", + "label": "", }, } at Object.<anonymous> (src/collection-preferences/__tests__/analytics-metadata.test.tsx:342:51)

Check failure on line 342 in src/collection-preferences/__tests__/analytics-metadata.test.tsx

View workflow job for this annotation

GitHub Actions / build / build

CollectionPreferences renders correct analytics metadata › component innerContexts › resolves the column label for a visibleContent option toggle

expect(received).toEqual(expected) // deep equality - Expected - 1 + Received + 1 @@ -14,8 +14,8 @@ }, "type": "component", }, ], "detail": Object { - "label": "Domain name", + "label": "", }, } at Object.<anonymous> (src/collection-preferences/__tests__/analytics-metadata.test.tsx:342:51)

Check failure on line 342 in src/collection-preferences/__tests__/analytics-metadata.test.tsx

View workflow job for this annotation

GitHub Actions / dry-run / Components unit tests

CollectionPreferences renders correct analytics metadata › component innerContexts › resolves the column label for a visibleContent option toggle

expect(received).toEqual(expected) // deep equality - Expected - 1 + Received + 1 @@ -14,8 +14,8 @@ }, "type": "component", }, ], "detail": Object { - "label": "Domain name", + "label": "", }, } at Object.<anonymous> (src/collection-preferences/__tests__/analytics-metadata.test.tsx:342:51)
action: 'select',
detail: {
label: 'Domain name',
},
...getMetadata({}, 'visibleContent'),
});
});

test('with contentDisplay preference', () => {
const wrapper = renderCollectionPreferences({
contentDisplayPreference,
Expand Down
Loading