diff --git a/cypress/integration/list-route/new-job.feature b/cypress/integration/list-route/new-job.feature index 4740a761e..5f8eaa15c 100644 --- a/cypress/integration/list-route/new-job.feature +++ b/cypress/integration/list-route/new-job.feature @@ -1,5 +1,5 @@ Feature: Users should be able to navigate to the new job route Scenario: User clicks the new job button - Given the user navigated to the job list page + Given the user navigated to the list page Then there is a link to the new job page diff --git a/cypress/integration/list-route/new-job/index.js b/cypress/integration/list-route/new-job/index.js index ff54ef2c9..bf19a1310 100644 --- a/cypress/integration/list-route/new-job/index.js +++ b/cypress/integration/list-route/new-job/index.js @@ -1,6 +1,6 @@ import { Given, Then } from 'cypress-cucumber-preprocessor/steps' -Given('the user navigated to the job list page', () => { +Given('the user navigated to the list page', () => { cy.visit('/') cy.findByRole('heading', { name: 'Scheduled jobs' }).should('exist') }) diff --git a/cypress/integration/list-route/new-queue.feature b/cypress/integration/list-route/new-queue.feature new file mode 100644 index 000000000..351fa5378 --- /dev/null +++ b/cypress/integration/list-route/new-queue.feature @@ -0,0 +1,5 @@ +Feature: Users should be able to navigate to the new queue route + + Scenario: User clicks the new queue button + Given the user navigated to the list page + Then there is a link to the new queue page diff --git a/cypress/integration/list-route/new-queue/index.js b/cypress/integration/list-route/new-queue/index.js new file mode 100644 index 000000000..90fd1077e --- /dev/null +++ b/cypress/integration/list-route/new-queue/index.js @@ -0,0 +1,12 @@ +import { Given, Then } from 'cypress-cucumber-preprocessor/steps' + +Given('the user navigated to the list page', () => { + cy.visit('/') + cy.findByRole('heading', { name: 'Scheduled jobs' }).should('exist') +}) + +Then('there is a link to the new queue page', () => { + cy.findByRole('link', { name: 'New queue' }) + .should('exist') + .should('have.attr', 'href', '#/queue/add') +})