diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2018-07-23 16:29:19 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2018-07-23 16:29:19 +0200 |
| commit | 858c95cdf3bb94ff4e75eb63c8c982520a5fb629 (patch) | |
| tree | 850e39a41014918b89189be2c62283b78c099161 /test/components/SelectLocation.spec.js | |
| parent | 7a72cd6f6768716f9c38923cb6a668b81209d617 (diff) | |
| download | mullvadvpn-858c95cdf3bb94ff4e75eb63c8c982520a5fb629.tar.xz mullvadvpn-858c95cdf3bb94ff4e75eb63c8c982520a5fb629.zip | |
Fix tests
Diffstat (limited to 'test/components/SelectLocation.spec.js')
| -rw-r--r-- | test/components/SelectLocation.spec.js | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/test/components/SelectLocation.spec.js b/test/components/SelectLocation.spec.js index dbfe15221a..bb5256cf54 100644 --- a/test/components/SelectLocation.spec.js +++ b/test/components/SelectLocation.spec.js @@ -64,7 +64,7 @@ describe('components/SelectLocation', () => { onClose: () => done(), }); const node = getComponent(render(props), 'close'); - click(node); + node.simulate('press'); }); it('should call select callback for country', (done) => { @@ -82,7 +82,7 @@ describe('components/SelectLocation', () => { }); const elements = getComponent(render(props), 'country'); expect(elements).to.have.length(1); - click(elements.at(0)); + elements.at(0).simulate('press'); }); it('should call select callback for city', (done) => { @@ -100,14 +100,10 @@ describe('components/SelectLocation', () => { }); const elements = getComponent(render(props), 'city'); expect(elements).to.have.length(2); - click(elements.at(0)); + elements.at(0).simulate('press'); }); }); function getComponent(container, testName) { return container.findWhere((n) => n.prop('testName') === testName); } - -function click(component) { - component.prop('onPress')(); -} |
