From b951a75e144da96a6bcd90c809d1c41000c263a3 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Fri, 17 Nov 2023 11:14:05 +0000 Subject: [PATCH] [Cypress] Fix a couple of flaky tests. Await a result, and remove a test that is no longer needed (as FMS does now show duplicates in Pro areas). --- .cypress/cypress/integration/brent.js | 1 + .cypress/cypress/integration/duplicates.js | 17 ----------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/.cypress/cypress/integration/brent.js b/.cypress/cypress/integration/brent.js index a6f28b311e4..83470696e3d 100644 --- a/.cypress/cypress/integration/brent.js +++ b/.cypress/cypress/integration/brent.js @@ -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'); diff --git a/.cypress/cypress/integration/duplicates.js b/.cypress/cypress/integration/duplicates.js index 5dbaea16450..48975c4dfda 100644 --- a/.cypress/cypress/integration/duplicates.js +++ b/.cypress/cypress/integration/duplicates.js @@ -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: 'admin@example.org', 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');