diff options
| author | Hank <hank@mullvad.net> | 2022-09-15 11:33:46 +0200 |
|---|---|---|
| committer | Hank <hank@mullvad.net> | 2022-09-20 11:34:19 +0200 |
| commit | ed45531a88295061bf79a7a57385ad36f8901997 (patch) | |
| tree | 85828893127abd99d00eeac8ee71fb8c56182737 /gui/src | |
| parent | e7cbfca6e4fb0b55fb4d4b2dca460623c850f218 (diff) | |
| download | mullvadvpn-ed45531a88295061bf79a7a57385ad36f8901997.tar.xz mullvadvpn-ed45531a88295061bf79a7a57385ad36f8901997.zip | |
Disable transitions globally when running tests
Diffstat (limited to 'gui/src')
| -rw-r--r-- | gui/src/renderer/app.tsx | 13 | ||||
| -rw-r--r-- | gui/src/renderer/components/SvgMap.tsx | 2 |
2 files changed, 14 insertions, 1 deletions
diff --git a/gui/src/renderer/app.tsx b/gui/src/renderer/app.tsx index 1c222c9299..80d8fb2c4c 100644 --- a/gui/src/renderer/app.tsx +++ b/gui/src/renderer/app.tsx @@ -1,6 +1,7 @@ import { batch, Provider } from 'react-redux'; import { Router } from 'react-router'; import { bindActionCreators } from 'redux'; +import { createGlobalStyle } from 'styled-components'; import { ILinuxSplitTunnelingApplication, IWindowsApplication } from '../shared/application-types'; import { @@ -265,8 +266,20 @@ export default class AppRenderer { } public renderView() { + // eslint-disable-next-line @typescript-eslint/naming-convention + let GlobalStyle = createGlobalStyle({}); + + if (window.env.e2e) { + GlobalStyle = createGlobalStyle({ + '*': { + transitionDuration: '1ms !important', + }, + }); + } + return ( <AppContext.Provider value={{ app: this }}> + <GlobalStyle /> <Provider store={this.reduxStore}> <Router history={this.history.asHistory}> <ErrorBoundary> diff --git a/gui/src/renderer/components/SvgMap.tsx b/gui/src/renderer/components/SvgMap.tsx index 41fbb2697b..8b2c2deaf4 100644 --- a/gui/src/renderer/components/SvgMap.tsx +++ b/gui/src/renderer/components/SvgMap.tsx @@ -23,7 +23,7 @@ const provincesStatesLinesTree = rbush<IProvinceAndStateLineLeaf>().fromJSON( type BBox = [number, number, number, number]; -const MOVE_SPEED = window.env.e2e ? 0 : 2000; +const MOVE_SPEED = 2000; const mapStyle = { width: '100%', |
