diff --git a/src/core/public/chrome/ui/header/__snapshots__/collapsible_nav.test.tsx.snap b/src/core/public/chrome/ui/header/__snapshots__/collapsible_nav.test.tsx.snap index 2c95c638dd71ee..4e36b691158e68 100644 --- a/src/core/public/chrome/ui/header/__snapshots__/collapsible_nav.test.tsx.snap +++ b/src/core/public/chrome/ui/header/__snapshots__/collapsible_nav.test.tsx.snap @@ -1,2149 +1,699 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`CollapsibleNav renders links grouped by category 1`] = ` -} - closeNav={[Function]} - customNavLink$={ - BehaviorSubject { - "_value": Object { - "baseUrl": "/", - "category": undefined, - "data-test-subj": "Custom link", - "href": "Custom link", - "id": "Custom link", - "isActive": true, - "title": "Custom link", - "url": "/", - }, - "closed": false, - "currentObservers": null, - "hasError": false, - "isStopped": false, - "observers": Array [ - SafeSubscriber { - "_finalizers": Array [ - Subscription { - "_finalizers": null, - "_parentage": [Circular], - "closed": false, - "initialTeardown": [Function], - }, - ], - "_parentage": null, - "closed": false, - "destination": ConsumerObserver { - "partialObserver": Object { - "complete": undefined, - "error": undefined, - "next": [Function], - }, - }, - "initialTeardown": undefined, - "isStopped": false, - }, - ], - "thrownError": null, - } - } - homeHref="/" - id="collapsibe-nav" - isLocked={false} - isNavOpen={true} - navLinks$={ - BehaviorSubject { - "_value": Array [ - Object { - "baseUrl": "/", - "category": Object { - "euiIconType": "logoKibana", - "id": "kibana", - "label": "Analytics", - "order": 1000, - }, - "data-test-subj": "discover", - "href": "discover", - "id": "discover", - "isActive": true, - "title": "discover", - "url": "/", - }, - Object { - "baseUrl": "/", - "category": Object { - "euiIconType": "logoSecurity", - "id": "securitySolution", - "label": "Security", - "order": 4000, - }, - "data-test-subj": "siem", - "href": "siem", - "id": "siem", - "isActive": true, - "title": "siem", - "url": "/", - }, - Object { - "baseUrl": "/", - "category": Object { - "euiIconType": "logoObservability", - "id": "observability", - "label": "Observability", - "order": 3000, - }, - "data-test-subj": "metrics", - "href": "metrics", - "id": "metrics", - "isActive": true, - "title": "metrics", - "url": "/", - }, - Object { - "baseUrl": "/", - "category": Object { - "euiIconType": "managementApp", - "id": "management", - "label": "Management", - "order": 5000, - }, - "data-test-subj": "monitoring", - "href": "monitoring", - "id": "monitoring", - "isActive": true, - "title": "monitoring", - "url": "/", - }, - Object { - "baseUrl": "/", - "category": Object { - "euiIconType": "logoKibana", - "id": "kibana", - "label": "Analytics", - "order": 1000, - }, - "data-test-subj": "visualize", - "href": "visualize", - "id": "visualize", - "isActive": true, - "title": "visualize", - "url": "/", - }, - Object { - "baseUrl": "/", - "category": Object { - "euiIconType": "logoKibana", - "id": "kibana", - "label": "Analytics", - "order": 1000, - }, - "data-test-subj": "dashboard", - "href": "dashboard", - "id": "dashboard", - "isActive": true, - "title": "dashboard", - "url": "/", - }, - Object { - "baseUrl": "/", - "category": undefined, - "data-test-subj": "canvas", - "href": "canvas", - "id": "canvas", - "isActive": true, - "title": "canvas", - "url": "/", - }, - Object { - "baseUrl": "/", - "category": Object { - "euiIconType": "logoObservability", - "id": "observability", - "label": "Observability", - "order": 3000, - }, - "data-test-subj": "logs", - "href": "logs", - "id": "logs", - "isActive": true, - "title": "logs", - "url": "/", - }, - ], - "closed": false, - "currentObservers": null, - "hasError": false, - "isStopped": false, - "observers": Array [ - SafeSubscriber { - "_finalizers": Array [ - Subscription { - "_finalizers": null, - "_parentage": [Circular], - "closed": false, - "initialTeardown": [Function], - }, - ], - "_parentage": null, - "closed": false, - "destination": ConsumerObserver { - "partialObserver": Object { - "complete": undefined, - "error": undefined, - "next": [Function], - }, - }, - "initialTeardown": undefined, - "isStopped": false, - }, - ], - "thrownError": null, - } - } - navigateToApp={[Function]} - navigateToUrl={[Function]} - onIsLockedUpdate={[Function]} - recentlyAccessed$={ - BehaviorSubject { - "_value": Array [ - Object { - "id": "recent 1", - "label": "recent 1", - "link": "recent 1", - }, - Object { - "id": "recent 2", - "label": "recent 2", - "link": "recent 2", - }, - ], - "closed": false, - "currentObservers": null, - "hasError": false, - "isStopped": false, - "observers": Array [ - SafeSubscriber { - "_finalizers": Array [ - Subscription { - "_finalizers": null, - "_parentage": [Circular], - "closed": false, - "initialTeardown": [Function], - }, - ], - "_parentage": null, - "closed": false, - "destination": ConsumerObserver { - "partialObserver": Object { - "complete": undefined, - "error": undefined, - "next": [Function], - }, - }, - "initialTeardown": undefined, - "isStopped": false, - }, - ], - "thrownError": null, - } - } - storage={ - StubBrowserStorage { - "keys": Array [], - "size": 0, - "sizeLimit": 5000000, - "values": Array [], - } - } - url="/" -> - } +Array [ + + + +
+
+
-
- - + + +
  • - - -
  • + recent 2 + + + + +
    +
    +
    +
    + +
    +
    +
    +
    +
    -
    - - - -
    + +
    +
    -
    - +
    - - - - - - -

    - Analytics -

    -
    -
    - - } - buttonElement="button" - className="euiCollapsibleNavGroup euiCollapsibleNavGroup--withHeading" - data-test-subj="collapsibleNavGroup-kibana" - element="div" - id="generated-id" - initialIsOpen={true} - isLoading={false} - isLoadingMessage={false} - onToggle={[Function]} - paddingSize="none" +
    -
    -
    - - - - -
    -
    + +
  • - -
    -
    -
    - - - -
    -
    -
    -
    -
  • -
    - - - - - - - - - -

    - Observability -

    -
    -
    - - } - buttonElement="button" - className="euiCollapsibleNavGroup euiCollapsibleNavGroup--withHeading" - data-test-subj="collapsibleNavGroup-observability" - element="div" - id="generated-id" - initialIsOpen={true} - isLoading={false} - isLoadingMessage={false} - onToggle={[Function]} - paddingSize="none" - > -
    -
    + + +
  • - - - - -
  • -
    + + +
    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    - - - - - - -

    - Security -

    -
    -
    - - } - buttonElement="button" - className="euiCollapsibleNavGroup euiCollapsibleNavGroup--withHeading" - data-test-subj="collapsibleNavGroup-securitySolution" - element="div" - id="generated-id" - initialIsOpen={true} - isLoading={false} - isLoadingMessage={false} - onToggle={[Function]} - paddingSize="none" +
    -
    -
    - - + +
  • + - - -
  • -
    + + + +
    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    - - - - - - -

    - Management -

    -
    -
    - - } - buttonElement="button" - className="euiCollapsibleNavGroup euiCollapsibleNavGroup--withHeading" - data-test-subj="collapsibleNavGroup-management" - element="div" - id="generated-id" - initialIsOpen={true} - isLoading={false} - isLoadingMessage={false} - onToggle={[Function]} - paddingSize="none" +
    -
    -
    - - - - -
    -
    + + +
    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    -
    - - - -
    + monitoring + + + +
    - +
    - - - - - +
    +
    +
    +
    + +
    +
    +
    + , +] `; exports[`CollapsibleNav renders the default nav 1`] = ` diff --git a/src/core/public/chrome/ui/header/collapsible_nav.test.tsx b/src/core/public/chrome/ui/header/collapsible_nav.test.tsx index 0102343ca6eb7e..787fdc031f1a5f 100644 --- a/src/core/public/chrome/ui/header/collapsible_nav.test.tsx +++ b/src/core/public/chrome/ui/header/collapsible_nav.test.tsx @@ -113,7 +113,7 @@ describe('CollapsibleNav', () => { customNavLink$={new BehaviorSubject(customNavLink)} /> ); - expect(component).toMatchSnapshot(); + expect(component.render()).toMatchSnapshot(); }); it('remembers collapsible section state', () => {