Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/apps/system/test/integration
diff options
context:
space:
mode:
Diffstat (limited to 'apps/system/test/integration')
-rw-r--r--apps/system/test/integration/atoms/notification.js15
-rw-r--r--apps/system/test/integration/notification_test.js41
-rw-r--r--apps/system/test/integration/system_integration.js49
3 files changed, 0 insertions, 105 deletions
diff --git a/apps/system/test/integration/atoms/notification.js b/apps/system/test/integration/atoms/notification.js
deleted file mode 100644
index cf3e44f..0000000
--- a/apps/system/test/integration/atoms/notification.js
+++ /dev/null
@@ -1,15 +0,0 @@
-(function notification(text, desc) {
- window.addEventListener('mozChromeEvent', function(e) {
- var detail = e.detail;
- if (detail.type === 'desktop-notification') {
- marionetteScriptFinished(JSON.stringify(detail));
- }
- });
-
- var notify = window.navigator.mozNotification;
- var notification = notify.createNotification(
- text, desc
- );
-
- notification.show();
-}.apply(this, arguments));
diff --git a/apps/system/test/integration/notification_test.js b/apps/system/test/integration/notification_test.js
deleted file mode 100644
index aa532e4..0000000
--- a/apps/system/test/integration/notification_test.js
+++ /dev/null
@@ -1,41 +0,0 @@
-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');
- });
-});
-
diff --git a/apps/system/test/integration/system_integration.js b/apps/system/test/integration/system_integration.js
deleted file mode 100644
index 1116e17..0000000
--- a/apps/system/test/integration/system_integration.js
+++ /dev/null
@@ -1,49 +0,0 @@
-require('/tests/js/app_integration.js');
-require('/tests/js/integration_helper.js');
-
-function SystemIntegration() {
- AppIntegration.apply(this, arguments);
-}
-
-SystemIntegration.prototype = {
- __proto__: AppIntegration.prototype,
-
- appName: 'System',
-
- selectors: {
- /** notifications */
- notificationsContainer: '#notifications-container'
- },
-
- /**
- * Override base launch method.
- * The system app is launched by directly
- * going to its url we we determine by getting
- * all the apps and finding the 'System' apps origin.
- */
- launch: function(callback) {
- var self = this;
- this.task(function(app, next, done) {
- var device = app.device;
- yield device.setScriptTimeout(5000);
-
- yield IntegrationHelper.importScript(
- device,
- '/tests/atoms/gaia_apps.js',
- MochaTask.nodeNext
- );
-
- var result = yield device.executeAsyncScript(
- 'GaiaApps.locateWithName("' + self.appName + '");'
- );
-
- // locate the origin of the system app.
- // We must append the /index.html because of the app:// protocol.
- yield device.goUrl(result.origin + '/index.html');
-
- // complete the task
- done();
- }, callback);
- }
-
-};