diff options
| -rw-r--r-- | app/components/Connect.js | 2 | ||||
| -rw-r--r-- | test/components/Connect.spec.js | 24 |
2 files changed, 19 insertions, 7 deletions
diff --git a/app/components/Connect.js b/app/components/Connect.js index 66696fef64..a5af9250f7 100644 --- a/app/components/Connect.js +++ b/app/components/Connect.js @@ -109,7 +109,7 @@ export default class Connect extends Component { case 'disconnected': isDisconnected = true; break; } - const { city, country } = this.props.connection; + const { city, country } = serverInfo; // 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 30228fc4c6..e116311e42 100644 --- a/test/components/Connect.spec.js +++ b/test/components/Connect.spec.js @@ -36,9 +36,15 @@ describe('components/Connect', () => { }); it('shows the connection location information when connected', () => { - const component = renderConnected({}, { - country: 'sweden', - city: 'gothenburg', + const component = renderConnected({ + getServerInfo: (_s) => ({ + address: '', + name: '', + location: [0, 0], + country: 'sweden', + city: 'gothenburg', + }), + }, { clientIp: '1.2.3.4', }); const countryAndCity = component.find('.connect__status-location'); @@ -50,9 +56,15 @@ describe('components/Connect', () => { }); it('shows the connection location information when disconnected', () => { - const component = renderNotConnected({}, { - country: 'sweden', - city: 'gothenburg', + const component = renderNotConnected({ + getServerInfo: (_s) => ({ + address: '', + name: '', + location: [0, 0], + country: 'sweden', + city: 'gothenburg', + }), + }, { clientIp: '1.2.3.4', }); const countryAndCity = component.find('.connect__status-location'); |
