VulpesOS/gaia/apps/system/test/marionette/notification_count_test.js
OverSu b38dea0597 Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
2026-09-30 23:13:03 +02:00

35 lines
981 B
JavaScript
Executable file

'use strict';
var assert = require('assert'),
NotificationTest = require('./lib/notification').NotificationTest,
NotificationList = require('./lib/notification').NotificationList;
marionette('notification count tests', function() {
var client = marionette.client();
var notificationList = new NotificationList(client);
var system;
setup(function() {
system = client.loader.getAppClass('system');
system.waitForFullyLoaded();
});
test('notifications count should be updated', function(done) {
client.switchToFrame();
assert.ok(notificationList.waitForNotificationCount(0));
// create a notification
var notification = new NotificationTest(client, {
tag: '123',
title: 'test',
body: 'test'
});
assert.ok(notification);
assert.ok(notificationList.waitForNotificationCount(1));
system.sendSystemUpdateNotification();
assert.ok(notificationList.waitForNotificationCount(2));
done();
});
});