summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorErik Larkö <erik@mullvad.net>2017-10-02 08:14:19 +0200
committerErik Larkö <erik@mullvad.net>2017-10-02 08:14:19 +0200
commit9547107bf5613eaa2cb430aafe24d1eff75f37c0 (patch)
tree7247bebd7cce8ead4d035151d848c35941f3d4f9
parent7b647cdfa2c015e876e139e2cdd28d170b6ac60c (diff)
parent5efb734423f2b6456208124a275743fa6a8dc8f1 (diff)
downloadmullvadvpn-9547107bf5613eaa2cb430aafe24d1eff75f37c0.tar.xz
mullvadvpn-9547107bf5613eaa2cb430aafe24d1eff75f37c0.zip
Merge branch 'realistic-mock-ips'
-rw-r--r--app/components/Connect.js5
-rw-r--r--test/components/Connect.spec.js8
2 files changed, 8 insertions, 5 deletions
diff --git a/app/components/Connect.js b/app/components/Connect.js
index 3948f58944..97e113a3fe 100644
--- a/app/components/Connect.js
+++ b/app/components/Connect.js
@@ -112,6 +112,9 @@ export default class Connect extends Component {
const { city, country } = isConnected
? serverInfo
: { city: '\u2003', country: '\u2002' };
+ const ip = isConnected
+ ? '185.65.132.102'
+ : '78.65.17.155'; //this.props.connection.clientIp;
// 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
@@ -210,7 +213,7 @@ export default class Connect extends Component {
<div className={ this.ipAddressClass() } onClick={ this.onIPAddressClick.bind(this) }>
<If condition={ this.state.showCopyIPMessage }>
<Then><span>{ 'IP copied to clipboard!' }</span></Then>
- <Else><span>{ this.props.connection.clientIp }</span></Else>
+ <Else><span>{ ip }</span></Else>
</If>
</div>
</div>
diff --git a/test/components/Connect.spec.js b/test/components/Connect.spec.js
index 9c60ce4ed2..f23f0d712c 100644
--- a/test/components/Connect.spec.js
+++ b/test/components/Connect.spec.js
@@ -45,14 +45,14 @@ describe('components/Connect', () => {
city: 'gothenburg',
}),
}, {
- clientIp: '1.2.3.4',
+ clientIp: '185.65.132.102',
});
const countryAndCity = component.find('.connect__status-location');
const ipAddr = component.find('.connect__status-ipaddress');
expect(countryAndCity.text()).to.contain('sweden');
expect(countryAndCity.text()).to.contain('gothenburg');
- expect(ipAddr.text()).to.contain('1.2.3.4');
+ expect(ipAddr.text()).to.contain('185.65.132.102');
});
it('shows the connection location information when disconnected', () => {
@@ -65,14 +65,14 @@ describe('components/Connect', () => {
city: 'gothenburg',
}),
}, {
- clientIp: '1.2.3.4',
+ clientIp: '78.65.17.155',
});
const countryAndCity = component.find('.connect__status-location');
const ipAddr = component.find('.connect__status-ipaddress');
expect(countryAndCity.text()).to.contain('\u2002');
expect(countryAndCity.text()).to.not.contain('\u2003');
- expect(ipAddr.text()).to.contain('1.2.3.4');
+ expect(ipAddr.text()).to.contain('78.65.17.155');
});
it('shows the country name or fastest/nearest in the location switcher', () => {