Skip to content

Commit

Permalink
test: add new queue test
Browse files Browse the repository at this point in the history
  • Loading branch information
ismay committed Nov 16, 2023
1 parent 9e52bbc commit 9bcb2d3
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cypress/integration/list-route/new-job.feature
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion cypress/integration/list-route/new-job/index.js
Original file line number Diff line number Diff line change
@@ -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')
})
Expand Down
5 changes: 5 additions & 0 deletions cypress/integration/list-route/new-queue.feature
Original file line number Diff line number Diff line change
@@ -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
12 changes: 12 additions & 0 deletions cypress/integration/list-route/new-queue/index.js
Original file line number Diff line number Diff line change
@@ -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')
})

0 comments on commit 9bcb2d3

Please sign in to comment.