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.
This commit is contained in:
parent
93e3a48004
commit
b38dea0597
25901 changed files with 9982925 additions and 369 deletions
49
gaia/apps/homescreen/test/marionette/pinning_test.js
Executable file
49
gaia/apps/homescreen/test/marionette/pinning_test.js
Executable file
|
|
@ -0,0 +1,49 @@
|
|||
'use strict';
|
||||
/* global __dirname */
|
||||
|
||||
var Pinning = require(
|
||||
'../../../../apps/system/test/marionette/lib/pinning_the_web');
|
||||
var Server = require('../../../../shared/test/integration/server');
|
||||
|
||||
marionette('Homescreen - Pinned Sites', function() {
|
||||
var client = marionette.client({
|
||||
desiredCapabilities: { raisesAccessibilityExceptions: false }
|
||||
});
|
||||
var pinning, home, server, system;
|
||||
|
||||
suiteSetup(function(done) {
|
||||
Server.create(__dirname + '/fixtures/', function(err, _server) {
|
||||
server = _server;
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
suiteTeardown(function() {
|
||||
server.stop();
|
||||
});
|
||||
|
||||
setup(function() {
|
||||
home = client.loader.getAppClass('homescreen');
|
||||
pinning = new Pinning(client);
|
||||
system = client.loader.getAppClass('system');
|
||||
system.waitForFullyLoaded();
|
||||
home.waitForLaunch();
|
||||
});
|
||||
|
||||
test('Pinning a site adds pin to homescreen', function() {
|
||||
var numIcons = home.visibleIcons.length;
|
||||
var url = server.url('sample.html');
|
||||
|
||||
client.switchToFrame();
|
||||
pinning.openAndPinSiteFromBrowser(url);
|
||||
system.dismissBanner();
|
||||
|
||||
system.tapHome();
|
||||
client.switchToFrame(system.getHomescreenIframe());
|
||||
|
||||
client.waitFor(function() {
|
||||
return numIcons + 1 === home.visibleIcons.length;
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
Loading…
Reference in a new issue