From 772fb0e5e3bb62889e73c687c0c2431df8051d9c Mon Sep 17 00:00:00 2001 From: Jonathan Bouzekri Date: Mon, 7 Aug 2017 22:27:16 +0200 Subject: [PATCH] e2e click on map --- src/App.vue | 20 +-------- src/components/GmaltResult.vue | 20 ++++++++- test/e2e/helper.js | 28 +++++++++++++ test/e2e/specs/GoogleMap.spec.js | 70 ++++++++++++++++++++++++++++++++ test/e2e/specs/test.js | 40 ------------------ 5 files changed, 118 insertions(+), 60 deletions(-) create mode 100644 test/e2e/helper.js create mode 100644 test/e2e/specs/GoogleMap.spec.js diff --git a/src/App.vue b/src/App.vue index 299e574..ab9a95b 100644 --- a/src/App.vue +++ b/src/App.vue @@ -25,7 +25,7 @@
OR
- +

Description

@@ -89,8 +89,6 @@ import GmaltMap from './components/GmaltMap' import GmaltSearch from './components/GmaltSearch' import GmaltResult from './components/GmaltResult' -import AltService from './services/AltService' - export default { name: 'app', components: { @@ -103,19 +101,6 @@ export default { updatePos (lat, lng) { this.lat = lat this.lng = lng - this.loading = true - const requestedPosition = this.position - return AltService - .get(lat, lng) - .then((json) => { - if (JSON.stringify(requestedPosition) === JSON.stringify(this.position)) { - this.loading = false - this.alt = json.alt - } - }) - .catch((err) => { - this.alt = err + '' - }) } }, computed: { @@ -127,8 +112,7 @@ export default { return { lat: null, lng: null, - alt: null, - loading: false + alt: null } } } diff --git a/src/components/GmaltResult.vue b/src/components/GmaltResult.vue index edc3c29..af10031 100644 --- a/src/components/GmaltResult.vue +++ b/src/components/GmaltResult.vue @@ -33,19 +33,29 @@