Skip to content

Commit

Permalink
[Cypress] Fix a couple of flaky tests.
Browse files Browse the repository at this point in the history
Await a result, and remove a test that is no longer needed
(as FMS does now show duplicates in Pro areas).
  • Loading branch information
dracos committed Nov 17, 2023
1 parent e1f87b4 commit b951a75
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
1 change: 1 addition & 0 deletions .cypress/cypress/integration/brent.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ describe('Queen’s Park', function() {
cy.route('/report/new/ajax*').as('report-ajax');
cy.route('**/mapserver/brent*queens_park*', 'fixture:brent-queens_park.xml').as('queens_park');
cy.visit('/report/new?longitude=-0.211045&latitude=51.534948');
cy.wait('@report-ajax');
cy.pickCategory('Dog fouling');
cy.wait('@queens_park');
cy.contains('maintained by the City of London').should('be.visible');
Expand Down
17 changes: 0 additions & 17 deletions .cypress/cypress/integration/duplicates.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,4 @@
describe('Duplicate tests', function() {
it('does not try and fetch duplicates which will not get shown', function() {
cy.server();
cy.route('/report/new/ajax*').as('report-ajax');
cy.request({
method: 'POST',
url: '/auth?r=/',
form: true,
body: { username: '[email protected]', password_sign_in: 'password' }
});
cy.visit('http://fixmystreet.localhost:3001/report/1');
cy.contains('Report another problem here').click();
cy.wait('@report-ajax');
cy.pickCategory('Potholes');
cy.nextPageReporting();
cy.get('div.dropzone').should('be.visible');
});

it('has a separate duplicate suggestions step when needed', function() {
cy.server();
cy.route('/report/new/ajax*').as('report-ajax');
Expand Down

0 comments on commit b951a75

Please sign in to comment.