From 8418b48c70079da7200918e5c3259c60e9d63238 Mon Sep 17 00:00:00 2001 From: Jen Jones Arnesen Date: Fri, 12 Jan 2024 08:05:53 +0100 Subject: [PATCH] fix: rename smoke to routes cypress test --- .../integration/{smoke.cy.js => routes.cy.js} | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) rename cypress/integration/{smoke.cy.js => routes.cy.js} (91%) diff --git a/cypress/integration/smoke.cy.js b/cypress/integration/routes.cy.js similarity index 91% rename from cypress/integration/smoke.cy.js rename to cypress/integration/routes.cy.js index e9011a5de..62062a291 100644 --- a/cypress/integration/smoke.cy.js +++ b/cypress/integration/routes.cy.js @@ -1,9 +1,9 @@ import { ThematicLayer } from '../elements/thematic_layer.js' import { EXTENDED_TIMEOUT } from '../support/util.js' -context('Smoke Test', () => { - it('loads', () => { - cy.visit('/', EXTENDED_TIMEOUT) +context('Routes', () => { + it('loads root route', () => { + cy.visit('/', { timeout: 50000 }) cy.get('canvas', EXTENDED_TIMEOUT).should('be.visible') cy.title().should('equal', 'Maps | DHIS2') }) @@ -155,15 +155,21 @@ context('Smoke Test', () => { cy.get('button').contains('Exit download mode').should('be.visible') }) - it('loads download page for new map', () => { - cy.intercept('**/userDataStore/analytics/settings', { - fixture: 'analyticalObject.json', - }) + it.only('loads download page for new map', () => { + cy.visit('/', EXTENDED_TIMEOUT) - cy.visit('/#/download', EXTENDED_TIMEOUT) + cy.get('canvas.maplibregl-canvas').should('be.visible') + cy.get('button').contains('Download').click() cy.getByDataTest('download-settings').should('be.visible') cy.get('canvas.maplibregl-canvas').should('be.visible') cy.get('button').contains('Exit download mode').should('be.visible') + cy.url().should('include', '#/download') + + cy.get('button').contains('Exit download mode').click() + + cy.url().should('not.include', 'download') + + cy.get('button').contains('Add layer').should('be.visible') }) })