Skip to content

Commit

Permalink
fix: rename smoke to routes cypress test
Browse files Browse the repository at this point in the history
  • Loading branch information
jenniferarnesen committed Jan 12, 2024
1 parent 71d13ae commit 8418b48
Showing 1 changed file with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -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')
})
Expand Down Expand Up @@ -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')
})
})

0 comments on commit 8418b48

Please sign in to comment.