From 6a86308c119cbfbcfd54ed7d70f3803140f22a54 Mon Sep 17 00:00:00 2001 From: burnettk Date: Thu, 29 Sep 2022 17:20:49 -0400 Subject: [PATCH] fix tests and start looking at showing recent process models --- cypress/e2e/tasks.cy.js | 6 +++--- cypress/support/commands.js | 6 +++--- src/App.tsx | 1 + src/components/NavigationBar.tsx | 2 +- src/components/SubNavigation.tsx | 2 +- src/routes/HomePage.tsx | 3 +++ src/routes/ProcessModelShow.tsx | 35 ++++++++++++++++++++++++++++++++ 7 files changed, 47 insertions(+), 8 deletions(-) diff --git a/cypress/e2e/tasks.cy.js b/cypress/e2e/tasks.cy.js index 77bef45..6c5a3ae 100644 --- a/cypress/e2e/tasks.cy.js +++ b/cypress/e2e/tasks.cy.js @@ -85,8 +85,8 @@ describe('tasks', () => { checkTaskHasClass('form4', activeTaskClassName); cy.get('.modal .btn-close').click(); - cy.navigateToTasks(); - cy.url().should('include', '/tasks'); + cy.navigateToHome(); + cy.contains('Tasks').should('exist'); // FIXME: this will probably need a better way to link to the proper form that we want cy.contains('Complete Task').click(); @@ -121,7 +121,7 @@ describe('tasks', () => { cy.runPrimaryBpmnFile(); cy.runPrimaryBpmnFile(); - cy.navigateToTasks(); + cy.navigateToHome(); cy.basicPaginationTest(); }); }); diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 63abe3e..4e2c9fb 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -30,12 +30,12 @@ Cypress.Commands.add('getBySel', (selector, ...args) => { return cy.get(`[data-qa=${selector}]`, ...args); }); -Cypress.Commands.add('navigateToTasks', () => { - cy.getBySel('nav-item-tasks').click(); +Cypress.Commands.add('navigateToHome', () => { + cy.getBySel('nav-home').click(); }); Cypress.Commands.add('navigateToAdmin', () => { - cy.getBySel('nav-item-admin').click(); + cy.getBySel('spiffworkflow-logo').click(); }); Cypress.Commands.add('login', (selector, ...args) => { diff --git a/src/App.tsx b/src/App.tsx index cff9bb3..805548c 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -39,6 +39,7 @@ export default function App() {
} /> + } /> } /> - + logo diff --git a/src/components/SubNavigation.tsx b/src/components/SubNavigation.tsx index 244a1b1..871d017 100644 --- a/src/components/SubNavigation.tsx +++ b/src/components/SubNavigation.tsx @@ -25,7 +25,7 @@ export default function SubNavigation() { if (activeKey) { return (