Skip to content

Commit

Permalink
fixes broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DilwoarH committed Oct 25, 2024
1 parent 8a2427c commit e8780ab
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/unit/get-startedPage.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe(`Get Started Page (seed: ${seed})`, () => {
it('Renders the correct headings', () => {
expect(document.querySelector('span.govuk-caption-xl').textContent).toEqual(params.organisation.name)
expect(document.querySelector('h1').textContent).toContain(`${params.dataset.name}`)
expect(document.querySelector('h2').textContent).toContain(`How to prepare and submit your ${params.dataset.name} data`)
expect(document.querySelector('#main-content h2').textContent).toContain(`How to prepare and submit your ${params.dataset.name} data`)
})

it('Renders breadcrumbs correctly', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/unit/http-errorPage.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe(`http-error.html(seed: ${seed})`, () => {
})

it('Renders the correct heading', () => {
expect(document.querySelector('h2').textContent).toContain('Error accessing data URL')
expect(document.querySelector('#main-content h2').textContent).toContain('Error accessing data URL')
})

it('Renders the error details summary list', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/unit/views/organisations/dataset-overview.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ describe('Dataset Overview Page', () => {
})

it('Renders dataset details correctly', () => {
expect(document.querySelector('h2.govuk-heading-m').textContent).toContain('Dataset details')
expect(document.querySelector('#main-content h2.govuk-heading-m').textContent).toContain('Dataset details')
const summaryListValues = document.querySelectorAll('dd.govuk-summary-list__value')
expect(summaryListValues[0].textContent.trim()).toEqual(params.stats.numberOfRecords.toString())
expect(summaryListValues[1].textContent.trim()).toEqual(`${params.stats.numberOfFieldsSupplied}/${params.stats.numberOfExpectedFields}`)
Expand Down

0 comments on commit e8780ab

Please sign in to comment.