summaryrefslogtreecommitdiff
path: root/web-ui/test/spec/page/logout_shortcut.spec.js
diff options
context:
space:
mode:
authorLisa Junger <ljunger@thoughtworks.com>2015-01-27 10:37:10 +0100
committerLisa Junger <ljunger@thoughtworks.com>2015-01-29 15:01:29 +0100
commitbf562653fbdb2c6ef85df22f8dd5398f4a5cef44 (patch)
tree4bc47ebc639e75d26819db9f611832b40878ed8d /web-ui/test/spec/page/logout_shortcut.spec.js
parent7585c7afe36ff3149d62bef3756f5667059697dc (diff)
Issue #242 added logout shortcut for dispatcher mode.
- some new style to logout in expanded nav bar and shortcut. - to be complemented by #239.
Diffstat (limited to 'web-ui/test/spec/page/logout_shortcut.spec.js')
-rw-r--r--web-ui/test/spec/page/logout_shortcut.spec.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/web-ui/test/spec/page/logout_shortcut.spec.js b/web-ui/test/spec/page/logout_shortcut.spec.js
new file mode 100644
index 00000000..9882b343
--- /dev/null
+++ b/web-ui/test/spec/page/logout_shortcut.spec.js
@@ -0,0 +1,31 @@
+describeComponent('page/logout_shortcut', function () {
+ 'use strict';
+
+ describe('logout icon', function () {
+ var features;
+
+ beforeEach(function() {
+ features = require('features');
+ });
+
+ it('should provide logout icon if logout is enabled', function () {
+ spyOn(features, 'isLogoutEnabled').and.returnValue(true);
+
+ this.setupComponent('<ul id="logout-shortcut" class="shortcuts">, {}');
+
+ var logout_icon = this.component.$node.find('a')[0];
+ expect(logout_icon).toExist();
+ expect(logout_icon.innerHTML).toContain('i class="fa fa-sign-out"></i>');
+ //expect(logout_icon.innerHTML).toContain('foobar')
+ });
+
+ it('should not provide logout icon if logout is disabled', function () {
+ spyOn(features, 'isLogoutEnabled').and.returnValue(false);
+
+ this.setupComponent('<ul id="logout-shortcut" class="shortcuts">, {}');
+
+ var logout_icon = this.component.$node.find('a')[0];
+ expect(logout_icon).not.toExist();
+ });
+ });
+}); \ No newline at end of file