Skip to content

Commit

Permalink
test: add not found test for non estisting route
Browse files Browse the repository at this point in the history
  • Loading branch information
amoncaldas committed Dec 28, 2021
1 parent 631e57f commit c29563d
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion tests/e2e/specs/not-found.spec.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,28 @@
// eslint-disable-next-line no-undef
module.exports = {
'app page not found mode rendering': function (browser) {
'app page broken url rendering': function (browser) {
const pageNotFoundUrl = `${browser.globals.devServerURL}/#/directions/Old%20Invercauld%20Bridge,Aberdeenshire,Scotland,United%20Kingdom/Old%20Deeside%20Road,Aberdeenshire,Schottland,Vereinigtes%20Königreich/Old%20Deeside%20Road,Aberdeenshire,S`

browser
.url(pageNotFoundUrl)
.waitForElementVisible('.app-content', 10000)
.assert.elementPresent('#app')
.assert.elementPresent('.simple-place-search')
.assert.elementPresent('#map-view')
.assert.elementPresent('.leaflet-control-layers')
.assert.elementPresent('.leaflet-control-zoom')
.assert.elementPresent('.leaflet-draw')
.assert.elementPresent('#polyline-measure-control')
.assert.elementPresent('.my-location-btn')
.assert.not.elementPresent('.view-on-ors')
.assert.elementPresent('.v-snack__content')
.assert.visible('.v-snack__content')
.assert.visible('.v-snack__wrapper.error')
.end()
},
'app page not found mode rendering': function (browser) {
const pageNotFoundUrl = `${browser.globals.devServerURL}/#/dummy-page`

browser
.url(pageNotFoundUrl)
.waitForElementVisible('.app-content', 10000)
Expand Down

0 comments on commit c29563d

Please sign in to comment.