Skip to content

Commit

Permalink
cypress: Raise vis wait time, and tweak expect error text
Browse files Browse the repository at this point in the history
Recent refactoring slightly changed the wording of an error message,
which was tripping up the Cypress tests.  Also raised the cy.wait()
delay time in one set of tests, as the previous value was low
enough that it sometimes caused test failures on my dev setup.
  • Loading branch information
justinclift committed Apr 3, 2023
1 parent f86aebf commit dd02ae2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cypress/e2e/1-webui/live_visualisation.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ describe('live visualisation', () => {

// Try accessing a private database's visualisation page
cy.visit({url: '/vis/default/Join Testing with index.sqlite', failOnStatusCode: false})
cy.get('[data-cy="errormsg"').should('contain', 'doesn\'t seem to exist')
cy.get('[data-cy="errormsg"').should('contain', 'doesn\'t exist')

// Switch back to the default user
cy.request('/x/test/switchdefault')
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/1-webui/visualisation.cy.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import path from "path";

// Sometimes we need a delay between making a change, and testing it, otherwise the AngularJS changes are missed
let waitTime = 150;
let waitTime = 250;

// TODO: Test that when provided a commit id, we visualise the data for that commit rather than the latest commit

Expand Down Expand Up @@ -290,7 +290,7 @@ describe('visualisation', () => {

// Try accessing a private database's visualisation page
cy.visit({url: '/vis/default/Assembly Election 2017 with view.sqlite', failOnStatusCode: false})
cy.get('[data-cy="errormsg"').should('contain', 'doesn\'t seem to exist')
cy.get('[data-cy="errormsg"').should('contain', 'doesn\'t exist')

// Switch back to the default user
cy.request('/x/test/switchdefault')
Expand Down

0 comments on commit dd02ae2

Please sign in to comment.