Skip to content

Commit

Permalink
FIX: Broken Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dwhieb committed Jul 13, 2024
1 parent e292c99 commit 34e8529
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { defineConfig } from 'cypress'
export default defineConfig({
downloadsFolder: `test/downloads`,
e2e: {
baseUrl: `http://localhost:3002`,
baseUrl: `http://localhost:3000`,
specPattern: [`index.test.js`, `**/*.test.js`],
supportFile: false,
},
Expand Down
8 changes: 5 additions & 3 deletions pages/Search/Search.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ describe(`Search`, function() {
cy.get(`.results tbody tr`).should(`have.length`, 100)

// Return first page of results by default
cy.get(`.results td`).first().should(`have.text`, 1)
cy.get(`.results td`).first().should(`have.text`, `Abenaki`)
.next()
.should(`have.text`, `ôben-`)

// Showing X of Y results.
cy.get(`.num-results`).invoke(`text`).should(`match`, /^Showing results 1–100 of .+?\.$/v)
Expand All @@ -138,9 +140,9 @@ describe(`Search`, function() {
it(`offset`, function() {
cy.visit(`/search?offset=10&q=`)
// NB: The 11th result in the database is currently Eastern Abenaki Component #5.
cy.get(`.results td`).first().should(`have.text`, 5)
cy.get(`.results td`).first().should(`have.text`, `Eastern Abenaki`)
.next()
.should(`have.text`, `Eastern Abenaki`)
.should(`have.text`, `-ahte`)
})

})
Expand Down

0 comments on commit 34e8529

Please sign in to comment.