ember-cli-browser-navigation-button-test-helper
Advanced tools
Comparing version 0.0.4 to 0.0.5
{ | ||
"name": "ember-cli-browser-navigation-button-test-helper", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Test helper to simulate browsers back and forward button in acceptance tests.", | ||
@@ -21,3 +21,3 @@ "keywords": [ | ||
"dependencies": { | ||
"ember-cli-babel": "^6.3.0" | ||
"ember-cli-babel": "^6.6.0" | ||
}, | ||
@@ -27,7 +27,7 @@ "devDependencies": { | ||
"ember-ajax": "^3.0.0", | ||
"ember-cli": "~2.14.1", | ||
"ember-cli-dependency-checker": "^1.3.0", | ||
"ember-cli-eslint": "^3.0.0", | ||
"ember-cli": "~2.16.2", | ||
"ember-cli-dependency-checker": "^2.0.0", | ||
"ember-cli-eslint": "^4.0.0", | ||
"ember-cli-htmlbars": "^2.0.1", | ||
"ember-cli-htmlbars-inline-precompile": "^0.4.3", | ||
"ember-cli-htmlbars-inline-precompile": "^1.0.0", | ||
"ember-cli-inject-live-reload": "^1.4.1", | ||
@@ -38,3 +38,3 @@ "ember-cli-qunit": "^4.0.0", | ||
"ember-cli-sri": "^2.1.0", | ||
"ember-cli-uglify": "^1.2.0", | ||
"ember-cli-uglify": "^2.0.0", | ||
"ember-disable-prototype-extensions": "^1.1.2", | ||
@@ -44,3 +44,3 @@ "ember-export-application-global": "^2.0.0", | ||
"ember-resolver": "^4.0.0", | ||
"ember-source": "~2.14.1", | ||
"ember-source": "~2.16.0", | ||
"loader.js": "^4.2.3" | ||
@@ -47,0 +47,0 @@ }, |
import Ember from 'ember'; | ||
const pathIsSubstate = function(path) { | ||
return /(^|\.|-)(loading|error)$/.test(path); | ||
}; | ||
const backButton = function(app) { | ||
@@ -24,3 +28,5 @@ const history = app.__container__.lookup('service:history'); | ||
const currentPath = this.router.get('currentPath'); | ||
this.history.push(currentPath); | ||
if (!pathIsSubstate(currentPath)) { | ||
this.history.push(currentPath); | ||
} | ||
}, | ||
@@ -27,0 +33,0 @@ history: [], |
66
6643
7
Updatedember-cli-babel@^6.6.0