summaryrefslogtreecommitdiff
path: root/web-ui/test/spec/user_settings/ui/user_settings_box.spec.js
blob: d5919ca7ecd2175360ed6d95367f434ff8c5cf98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
describeComponent('user_settings/ui/user_settings_box', function () {
  'use strict';

  beforeEach(function () {
    Pixelated.mockBloodhound();
    this.setupComponent();
    this.component.render(null, {});
  });

  it('is extra high when the logout button is present', function() {
    var features = require('features');
    spyOn(features, 'isLogoutEnabled').and.returnValue(true);

    expect(this.$node.hasClass('extra-bottom-space')).toBe(true);
  });

  it('destroy it self when the close button is clicked', function () {
    var destroyEvent = spyOnEvent(document, Pixelated.events.userSettings.destroyPopup);

    this.$node.find('.fa-close').click();

    expect(destroyEvent).toHaveBeenTriggeredOn(document);
  });
});