diff --git a/spiffworkflow-frontend/cypress/support/commands.js b/spiffworkflow-frontend/cypress/support/commands.js index 063659002..ecee7651b 100644 --- a/spiffworkflow-frontend/cypress/support/commands.js +++ b/spiffworkflow-frontend/cypress/support/commands.js @@ -35,6 +35,8 @@ Cypress.Commands.add('getBySel', (selector, ...args) => { Cypress.Commands.add('navigateToHome', () => { cy.getBySel('header-menu-expand-button').click(); cy.getBySel('side-nav-items').contains('Home').click(); + // ensure we close the nav + cy.getBySel('header-menu-expand-button').click(); }); Cypress.Commands.add('navigateToAdmin', () => { diff --git a/spiffworkflow-frontend/src/components/NavigationBar.tsx b/spiffworkflow-frontend/src/components/NavigationBar.tsx index 9560151d4..53644a4d0 100644 --- a/spiffworkflow-frontend/src/components/NavigationBar.tsx +++ b/spiffworkflow-frontend/src/components/NavigationBar.tsx @@ -18,20 +18,20 @@ import { } from '@carbon/react'; import { Logout } from '@carbon/icons-react'; import { useEffect, useState } from 'react'; -import { useLocation } from 'react-router-dom'; -import { Can } from '@casl/react'; +import { useLocation, Link, LinkProps } from 'react-router-dom'; // @ts-expect-error TS(2307) FIXME: Cannot find module '../logo.svg' or its correspond... Remove this comment to see the full error message import logo from '../logo.svg'; import UserService from '../services/UserService'; -import { useUriListForPermissions } from '../hooks/UriListForPermissions'; -import { PermissionsToCheck } from '../interfaces'; import { UiSchemaUxElement } from '../extension_ui_schema_interfaces'; -import { usePermissionFetcher } from '../hooks/PermissionService'; import { DOCUMENTATION_URL, SPIFF_ENVIRONMENT } from '../config'; import appVersionInfo from '../helpers/appVersionInfo'; import { slugifyString } from '../helpers'; import ExtensionUxElementForDisplay from './ExtensionUxElementForDisplay'; import SpiffTooltip from './SpiffTooltip'; +import { useUriListForPermissions } from '../hooks/UriListForPermissions'; +import { PermissionsToCheck } from '../interfaces'; +import { usePermissionFetcher } from '../hooks/PermissionService'; +import { Can } from '../contexts/Can'; type OwnProps = { extensionUxElements?: UiSchemaUxElement[] | null; @@ -59,9 +59,9 @@ export default function NavigationBar({ extensionUxElements }: OwnProps) { // default to readthedocs and let someone specify an environment variable to override: // - let documentationUrl = 'https://spiffworkflow.readthedocs.io'; + let externalDocumentationUrl = 'https://spiff-arena.readthedocs.io'; if (DOCUMENTATION_URL) { - documentationUrl = DOCUMENTATION_URL; + externalDocumentationUrl = DOCUMENTATION_URL; } const processGroupPath = '/process-groups'; @@ -101,14 +101,14 @@ export default function NavigationBar({ extensionUxElements }: OwnProps) { const extensionUserProfileElement = (uxElement: UiSchemaUxElement) => { const navItemPage = `/extensions${uxElement.page}`; - return {uxElement.label}; + return {uxElement.label}; }; const profileToggletip = () => { let aboutLinkElement = null; if (Object.keys(versionInfo).length) { - aboutLinkElement = About; + aboutLinkElement = About; } return ( @@ -128,7 +128,7 @@ export default function NavigationBar({ extensionUxElements }: OwnProps) { {username !== userEmail &&
{userEmail}
}