Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/apps/system/test/integration/notification_test.js
blob: aa532e485cc3897c96206372e11ca712f3c9b434 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
require('/apps/system/test/integration/system_integration.js');

suite('notifications', function() {

  var device;
  var app;

  MarionetteHelper.start(function(client) {
    app = new SystemIntegration(client);
    device = app.device;
  });

  setup(function() {
    yield app.launch();
  });

  test('text/description notification', function() {

    var title = 'uniq--integration--uniq';
    var description = 'q--desc--q';

    yield device.setContext('chrome');

    yield IntegrationHelper.sendAtom(
      device,
      '/apps/system/test/integration/atoms/notification',
      true,
      [title, description]
    );

    yield device.setContext('content');
    var container = yield app.element('notificationsContainer');

    var text = yield container.getAttribute('innerHTML');
    assert.ok(text, 'container should have notifications');

    assert.include(text, title, 'should include title');
    assert.include(text, description, 'should include description');
  });
});