summaryrefslogtreecommitdiffhomepage
path: root/test/components
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2018-01-13 17:54:08 +0100
committerAndrej Mihajlov <and@mullvad.net>2018-01-13 17:54:08 +0100
commit2f9a4123b5fa2c42ad6efccb96c2e9df1dff9a42 (patch)
tree1dbc9cd2ee8cdb6b4b68b2a66c437745fc87f80b /test/components
parent41d9202093c3ac527a2385eca6fbeb4450a91751 (diff)
downloadmullvadvpn-2f9a4123b5fa2c42ad6efccb96c2e9df1dff9a42.tar.xz
mullvadvpn-2f9a4123b5fa2c42ad6efccb96c2e9df1dff9a42.zip
Update SelectLocation tests
Now since we hide the list of cities when there is only one we need to add one more city to the list to be able to test the callback
Diffstat (limited to 'test/components')
-rw-r--r--test/components/SelectLocation.spec.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/components/SelectLocation.spec.js b/test/components/SelectLocation.spec.js
index 459eb366ce..7ec17ff798 100644
--- a/test/components/SelectLocation.spec.js
+++ b/test/components/SelectLocation.spec.js
@@ -26,6 +26,11 @@ describe('components/SelectLocation', () => {
code: 'mma',
position: [0, 0],
hasActiveRelays: true,
+ }, {
+ name: 'Stockholm',
+ code: 'sto',
+ position: [0, 0],
+ hasActiveRelays: true,
}],
}],
allowLan: false,
@@ -86,7 +91,7 @@ describe('components/SelectLocation', () => {
}
});
const elements = ReactTestUtils.scryRenderedDOMComponentsWithClass(render(props), 'select-location__sub-cell');
- expect(elements).to.have.length(1);
+ expect(elements).to.have.length(2);
Simulate.click(elements[0]);
});