Skip to content

Commit

Permalink
🔀 Merge pull request #167 from alexlee-dev/feature/warp-10-sec
Browse files Browse the repository at this point in the history
⏲️ Warp 10 Sec
  • Loading branch information
Alex Lee committed Sep 28, 2019
2 parents 3c3ba97 + 8ff9a4e commit 4e07784
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cypress/integration/Map-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,7 @@ describe('Map', () => {
cy.get('#travel-button').click()
cy.wait(1000)
cy.get('body').contains(`Warping to ${destinationPlanet.name}...`)
cy.wait(11000)
cy.get('body').contains('Warp complete!')
})
})
8 changes: 8 additions & 0 deletions src/util/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,4 +235,12 @@ const showWarpingTo = destination => {
.attr('id', 'warping-to')
.attr('x', () => width / 2 - getLabelWidth(svg, `#warping-to`) / 2)
.attr('y', height / 2)

setTimeout(() => {
svg
.select('text')
.text('Warp complete!')
.attr('x', () => width / 2 - getLabelWidth(svg, `#warping-to`) / 2)
.attr('y', height / 2)
}, 10000)
}

0 comments on commit 4e07784

Please sign in to comment.