diff options
| author | Erik Larkö <erik@mullvad.net> | 2017-09-27 15:19:06 +0200 |
|---|---|---|
| committer | Erik Larkö <erik@mullvad.net> | 2017-09-27 16:45:04 +0200 |
| commit | 2c66bd9c9bbbcdb1bf9c8fad41b1061b8c95003f (patch) | |
| tree | 42bc955dcdb246a431e2ac0d24de015bc4ac5f48 | |
| parent | 309245504c814e5a152c156a83afcdd419144f45 (diff) | |
| download | mullvadvpn-2c66bd9c9bbbcdb1bf9c8fad41b1061b8c95003f.tar.xz mullvadvpn-2c66bd9c9bbbcdb1bf9c8fad41b1061b8c95003f.zip | |
Show different locations if the user is connected or not
| -rw-r--r-- | app/components/Connect.js | 4 | ||||
| -rw-r--r-- | test/components/Connect.spec.js | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/app/components/Connect.js b/app/components/Connect.js index a5af9250f7..3948f58944 100644 --- a/app/components/Connect.js +++ b/app/components/Connect.js @@ -109,7 +109,9 @@ export default class Connect extends Component { case 'disconnected': isDisconnected = true; break; } - const { city, country } = serverInfo; + const { city, country } = isConnected + ? serverInfo + : { city: '\u2003', country: '\u2002' }; // We decided to not include the map in the first beta release to customers // but it MUST be included in the following releases. Therefore we choose diff --git a/test/components/Connect.spec.js b/test/components/Connect.spec.js index e116311e42..9c60ce4ed2 100644 --- a/test/components/Connect.spec.js +++ b/test/components/Connect.spec.js @@ -70,8 +70,8 @@ describe('components/Connect', () => { const countryAndCity = component.find('.connect__status-location'); const ipAddr = component.find('.connect__status-ipaddress'); - expect(countryAndCity.text()).to.contain('sweden'); - expect(countryAndCity.text()).to.not.contain('gothenburg'); + expect(countryAndCity.text()).to.contain('\u2002'); + expect(countryAndCity.text()).to.not.contain('\u2003'); expect(ipAddr.text()).to.contain('1.2.3.4'); }); |
