summaryrefslogtreecommitdiffhomepage
path: root/test/components
diff options
context:
space:
mode:
authoranderklander <anderklander@gmail.com>2018-03-01 07:29:08 +0100
committerAndrej Mihajlov <and@mullvad.net>2018-03-26 14:22:10 +0200
commitc8b78c79eaf33b4a29adedaddab18ba0a95cdb40 (patch)
tree5bdbb847de23e7d8166514258d8c6ce19bd51fc7 /test/components
parent08c93c5e7cfd8e236b5c0cf70e6ba413625400de (diff)
downloadmullvadvpn-c8b78c79eaf33b4a29adedaddab18ba0a95cdb40.tar.xz
mullvadvpn-c8b78c79eaf33b4a29adedaddab18ba0a95cdb40.zip
Footer visibility test
Diffstat (limited to 'test/components')
-rw-r--r--test/components/Login.spec.js17
1 files changed, 12 insertions, 5 deletions
diff --git a/test/components/Login.spec.js b/test/components/Login.spec.js
index 04bc6bd896..f8f4af54de 100644
--- a/test/components/Login.spec.js
+++ b/test/components/Login.spec.js
@@ -33,20 +33,27 @@ describe('components/Login', () => {
it('does not show the footer when logging in', () => {
const component = renderLoggingIn();
- const footer = getComponent(component, 'footer');
- //TODO: add footer check
- expect(footer.length).to.not.equal(0);
+ const visibleFooters = getComponent(component, 'footerVisibility true');
+ const invisibleFooters = getComponent(component, 'footerVisibility false');
+ expect(visibleFooters.length).to.equal(0);
+ expect(invisibleFooters.length).to.equal(1);
});
it('shows the footer and account input when not logged in', () => {
const component = renderNotLoggedIn();
- //TODO: add footer check
+ const visibleFooters = getComponent(component, 'footerVisibility true');
+ const invisibleFooters = getComponent(component, 'footerVisibility false');
+ expect(visibleFooters.length).to.equal(1);
+ expect(invisibleFooters.length).to.equal(0);
expect(getComponent(component, 'AccountInput').length).to.be.above(0);
});
it('does not show the footer nor account input when logged in', () => {
const component = renderLoggedIn();
- //TODO: add footer check
+ const visibleFooters = getComponent(component, 'footerVisibility true');
+ const invisibleFooters = getComponent(component, 'footerVisibility false');
+ expect(visibleFooters.length).to.equal(0);
+ expect(invisibleFooters.length).to.equal(1);
expect(getComponent(component, 'AccountInput').length).to.equal(0);
});