Skip to content

Commit a1eea86

Browse files
committed
Fix components/DocumentationTopic.spec.js
1 parent 5bf2a80 commit a1eea86

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/unit/components/DocumentationTopic.spec.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -661,14 +661,17 @@ describe('DocumentationTopic', () => {
661661

662662
it('does not render a `PrimaryContent` column when passed empty an PrimaryContent & no `ViewMore` link', async () => {
663663
await wrapper.setProps({ primaryContentSections: [], enableMinimized: true });
664-
expect(wrapper.findComponent(PrimaryContent).exists()).toBe(true); // ViewMore link is present
664+
expect(wrapper.findComponent(ViewMore).exists()).toBe(true); // ViewMore link is present
665+
// but PrimaryContent is not rendered
666+
expect(wrapper.findComponent(PrimaryContent).exists()).toBe(false);
665667

666668
await wrapper.setProps({
667669
primaryContentSections: [],
668670
enableMinimized: true,
669671
hasNoExpandedDocumentation: true,
670672
});
671-
expect(wrapper.findComponent(PrimaryContent).exists()).toBe(false); // no ViewMore link
673+
expect(wrapper.findComponent(ViewMore).exists()).toBe(false); // no ViewMore link
674+
expect(wrapper.findComponent(PrimaryContent).exists()).toBe(false); // no PrimaryContent either
672675
});
673676

674677
it('render a `PrimaryContent` column when passed empty an PrimaryContent but has otherDeclarations', async () => {

0 commit comments

Comments
 (0)