diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2018-01-11 15:44:50 +0100 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2018-01-15 16:21:31 +0100 |
| commit | 928615a5a91ef4a3f52fbd4a6629e86993a1a3aa (patch) | |
| tree | d76821ad40b0d72f359051945b2d5c415c99fca2 /test | |
| parent | fc4178d7e3329fb1fd0014e4ce349a79eafeca51 (diff) | |
| download | mullvadvpn-928615a5a91ef4a3f52fbd4a6629e86993a1a3aa.tar.xz mullvadvpn-928615a5a91ef4a3f52fbd4a6629e86993a1a3aa.zip | |
Adapt frontend to removed ip call and changed location struct
Diffstat (limited to 'test')
| -rw-r--r-- | test/components/Connect.spec.js | 12 | ||||
| -rw-r--r-- | test/components/SelectLocation.spec.js | 6 | ||||
| -rw-r--r-- | test/connection-info.spec.js | 9 | ||||
| -rw-r--r-- | test/mocks/ipc.js | 9 |
4 files changed, 15 insertions, 21 deletions
diff --git a/test/components/Connect.spec.js b/test/components/Connect.spec.js index ed8c17982a..a14f644045 100644 --- a/test/components/Connect.spec.js +++ b/test/components/Connect.spec.js @@ -69,7 +69,7 @@ describe('components/Connect', () => { status: 'connected', country: 'Norway', city: 'Oslo', - clientIp: '4.3.2.1', + ip: '4.3.2.1', } }); const countryAndCity = component.find('.connect__status-location'); @@ -87,7 +87,7 @@ describe('components/Connect', () => { status: 'disconnected', country: 'Norway', city: 'Oslo', - clientIp: '4.3.2.1', + ip: '4.3.2.1', } }); const countryAndCity = component.find('.connect__status-location'); @@ -157,8 +157,9 @@ const defaultProps: ConnectProps = { cities: [{ name: 'Malmö', code: 'mma', + latitude: 0, + longitude: 0, hasActiveRelays: true, - position: [0, 0], }] }], allowLan: false, @@ -166,8 +167,9 @@ const defaultProps: ConnectProps = { connection: { status: 'disconnected', isOnline: true, - clientIp: null, - location: null, + ip: null, + latitude: null, + longitude: null, country: null, city: null, }, diff --git a/test/components/SelectLocation.spec.js b/test/components/SelectLocation.spec.js index 7ec17ff798..eb72b03c57 100644 --- a/test/components/SelectLocation.spec.js +++ b/test/components/SelectLocation.spec.js @@ -24,12 +24,14 @@ describe('components/SelectLocation', () => { cities: [{ name: 'Malmö', code: 'mma', - position: [0, 0], + latitude: 0, + longitude: 0, hasActiveRelays: true, }, { name: 'Stockholm', code: 'sto', - position: [0, 0], + latitude: 0, + longitude: 0, hasActiveRelays: true, }], }], diff --git a/test/connection-info.spec.js b/test/connection-info.spec.js index 76a97a35f7..875825054f 100644 --- a/test/connection-info.spec.js +++ b/test/connection-info.spec.js @@ -7,15 +7,6 @@ import connectionActions from '../app/redux/connection/actions'; describe('The connection state', () => { - it('should contain the latest IP', () => { - const store = createStore(); - - store.dispatch(connectionActions.newPublicIp('1.2.3.4')); - store.dispatch(connectionActions.newPublicIp('5.6.7.8')); - - expect(store.getState().connection.clientIp).to.equal('5.6.7.8'); - }); - it('should contain the latest location', () => { const store = createStore(); diff --git a/test/mocks/ipc.js b/test/mocks/ipc.js index fc035f55ed..2ba32ecf2f 100644 --- a/test/mocks/ipc.js +++ b/test/mocks/ipc.js @@ -56,14 +56,13 @@ export function newMockIpc() { shutdown: () => Promise.resolve(), - getPublicIp: () => Promise.resolve('1.2.3.4'), - getLocation: () => Promise.resolve({ + ip: '', country: '', - country_code: '', city: '', - city_code: '', - position: [0, 0], + latitude: 0.0, + longitude: 0.0, + mullvad_exit_ip: false, }), getState: () => Promise.resolve({ |
