diff options
Diffstat (limited to 'gui/src')
| -rw-r--r-- | gui/src/renderer/app.tsx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gui/src/renderer/app.tsx b/gui/src/renderer/app.tsx index e78462041b..afdda1d401 100644 --- a/gui/src/renderer/app.tsx +++ b/gui/src/renderer/app.tsx @@ -253,6 +253,11 @@ export default class AppRenderer { const navigationBase = this.getNavigationBase(); this.history = new History(navigationBase); } + + if (window.env.e2e) { + // Make the current location available to the tests if running e2e tests + window.e2e = { location: this.history.location.pathname }; + } } public renderView() { @@ -507,6 +512,10 @@ export default class AppRenderer { public setNavigationHistory(history: IHistoryObject) { IpcRendererEventChannel.navigation.setHistory(history); + + if (window.env.e2e) { + window.e2e.location = history.entries[history.index].pathname; + } } private isLoggedIn(): boolean { |
