Skip to content

Commit

Permalink
fix: flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
EmmaHegarty authored and TheGreatRefrigerator committed Apr 21, 2023
1 parent 6ee749b commit 5fe8261
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cypress/e2e/place.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('place component', () => {
it('renders single place correctly', () => {
cy.visit('/#/place/Salvador,BA,Brazil/@-38.421936,-12.964413,9/data/%7B"layer":"locality","country":"Brazil","zoom":9%7D')
cy.get('.place-input-component input[type=text]')
cy.get('.fit-all-features').click()
cy.get('.fit-all-features').click({force: true})
cy.get('.custom-html-icon-div').should('be.visible')
cy.get('.custom-html-icon-div').should('have.length', 1)
cy.get('.custom-html-icon-div').eq(0).should('have.css', 'background-color', 'rgb(255, 0, 0)')
Expand All @@ -27,8 +27,7 @@ describe('place component', () => {
cy.visit('/#/place/Heidelberg,BW,Germany/@8.692416,49.401247/data/%7B"zoom":8,"layer":"county","country":"Germany"%7D')
cy.get('.place-input-component input[type=text]')
cy.get('.place-input-component input[type=text]').should('have.value', 'Heidelberg, BW,Germany')
cy.get('.custom-html-icon-div').click() // needs to be first to avoid "removed from DOM" after redraw with vue
cy.get('.custom-html-icon-div').should('have.length', 1)
cy.get('.custom-html-icon-div').should('have.length', 1).click({force: true})
cy.get('.custom-html-icon-div').eq(0).should('have.css', 'background-color', 'rgb(255, 0, 0)')
cy.get('.leaflet-popup')
cy.get('.leaflet-popup-content').should('contain.text', 'Heidelberg, BW,Germany')
Expand Down

0 comments on commit 5fe8261

Please sign in to comment.