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:
OverSu 2026-09-30 23:13:03 +02:00
commit b38dea0597
25901 changed files with 9982925 additions and 369 deletions

View file

@ -0,0 +1,14 @@
{
"extends": "../../../../.jshintrc",
"node": true,
"predef": [
"suite",
"test",
"setup",
"teardown",
"suiteSetup",
"suiteTeardown",
"marionette",
"marionetteScriptFinished"
]
}

View file

@ -0,0 +1,123 @@
'use strict';
var APP_URL = 'app://dashboard.gaiamobile.org';
var Keys = {
'up': '\ue013',
'right': '\ue014',
'down': '\ue015',
'left': '\ue012'
};
var assert = require('chai').assert;
// Skip because the dashboard is not needed app now.
// Should re-enable the test when we need it.
marionette.skip('Test Arrow Key Events', function() {
var opts = {
hostOptions: {
screen: {
width: 1920,
height: 1080
}
}
};
var client = marionette.client({
profile: opts,
// XXX: Set this to true once Accessibility is implemented in TV
desiredCapabilities: { raisesAccessibilityExceptions: false }
});
setup(function() {
// Launch test app
client.apps.launch(APP_URL);
client.apps.switchToApp(APP_URL);
});
test('Display and hide top widget after pressing up/down',
{ devices: ['tv'] }, function () {
var element = client.helper.waitForElement('body');
element.sendKeys(Keys.up);
assert.equal(element.scriptWith(function(elem) {
return elem.dataset.activeDirection;
}), 'up');
element.sendKeys(Keys.down);
assert.equal(element.scriptWith(function(elem) {
return elem.dataset.activeDirection;
}), '');
});
test('Display and hide right widget after pressing right/left',
{ devices: ['tv'] }, function () {
var element = client.helper.waitForElement('body');
element.sendKeys(Keys.right);
assert.equal(element.scriptWith(function(elem) {
return elem.dataset.activeDirection;
}), 'right');
element.sendKeys(Keys.left);
assert.equal(element.scriptWith(function(elem) {
return elem.dataset.activeDirection;
}), '');
});
test('Display and hide bottom widget after pressing down/up',
{ devices: ['tv'] }, function () {
var element = client.helper.waitForElement('body');
element.sendKeys(Keys.down);
assert.equal(element.scriptWith(function(elem) {
return elem.dataset.activeDirection;
}), 'down');
element.sendKeys(Keys.up);
assert.equal(element.scriptWith(function(elem) {
return elem.dataset.activeDirection;
}), '');
});
test('Display and hide left widget after pressing left/right',
{ devices: ['tv'] }, function () {
var element = client.helper.waitForElement('body');
element.sendKeys(Keys.left);
assert.equal(element.scriptWith(function(elem) {
return elem.dataset.activeDirection;
}), 'left');
element.sendKeys(Keys.right);
assert.equal(element.scriptWith(function(elem) {
return elem.dataset.activeDirection;
}), '');
});
test('Doesn\'t hide top widgets after pressing up when top widget is visible',
{ devices: ['tv'] }, function () {
var element = client.helper.waitForElement('body');
// test top widget
element.sendKeys(Keys.up);
assert.equal(element.scriptWith(function(elem) {
return elem.dataset.activeDirection;
}), 'up');
element.sendKeys(Keys.up);
assert.equal(element.scriptWith(function(elem) {
return elem.dataset.activeDirection;
}), 'up');
});
test('Doesn\'t hide top widgets after pressing right or left ' +
'when top widget is visible', { devices: ['tv'] }, function () {
var element = client.helper.waitForElement('body');
// test top widget
element.sendKeys(Keys.up);
assert.equal(element.scriptWith(function(elem) {
return elem.dataset.activeDirection;
}), 'up');
element.sendKeys(Keys.right);
assert.equal(element.scriptWith(function(elem) {
return elem.dataset.activeDirection;
}), 'up');
element.sendKeys(Keys.left);
assert.equal(element.scriptWith(function(elem) {
return elem.dataset.activeDirection;
}), 'up');
});
});

View file

@ -0,0 +1,109 @@
'use strict';
var APP_URL = 'app://dashboard.gaiamobile.org';
var assert = require('chai').assert;
// Skip because the dashboard is not needed app now.
// Should re-enable the test when we need it.
marionette.skip('Test Digital Clock', function() {
var opts = {
hostOptions: {
screen: {
width: 1920,
height: 1080
}
}
};
var client = marionette.client({ profile: opts });
setup(function() {
// Launch test app
client.apps.launch(APP_URL);
client.apps.switchToApp(APP_URL);
});
test('Should display the current time',
{ devices: ['tv'] }, function () {
var element = client.helper.waitForElement('body');
var hoursTens = element.findElement('#hours-tens-digit');
assert.ok(hoursTens.scriptWith(function(elem) {
var now = new Date();
return parseInt(elem.textContent, 10) ===
Math.floor(now.getHours() / 10);
}));
var hoursUnits = element.findElement('#hours-units-digit');
assert.ok(hoursUnits.scriptWith(function(elem) {
var now = new Date();
return parseInt(elem.textContent, 10) === now.getHours() % 10;
}));
var minutesTens = element.findElement('#minutes-tens-digit');
assert.ok(minutesTens.scriptWith(function(elem) {
var now = new Date();
return parseInt(elem.textContent, 10) ===
Math.floor(now.getMinutes() / 10);
}));
var minutesUnits = element.findElement('#minutes-units-digit');
assert.ok(minutesUnits.scriptWith(function(elem) {
var now = new Date();
return parseInt(elem.textContent, 10) === now.getMinutes() % 10;
}));
var secondsTens = element.findElement('#seconds-tens-digit');
assert.ok(secondsTens.scriptWith(function(elem) {
var now = new Date();
return parseInt(elem.textContent, 10) ===
Math.floor(now.getSeconds() / 10);
}));
var secondsUnits = element.findElement('#seconds-units-digit');
assert.ok(secondsUnits.scriptWith(function(elem) {
var now = new Date();
return parseInt(elem.textContent, 10) === now.getSeconds() % 10;
}));
});
test('Should display the month, date and weekday info',
{ devices: ['tv'] }, function () {
var element = client.helper.waitForElement('body');
var today = element.findElement('#today-is');
assert.ok(today.scriptWith(function(elem) {
var weekday = [
'Sunday',
'Monday',
'Tuesday',
'Wednesday',
'Thursday',
'Friday',
'Saturday'
];
var month = [
'Jan',
'Feb',
'Mar',
'Apr',
'May',
'Jun',
'Jul',
'Aug',
'Sep',
'Oct',
'Nov',
'Dec'
];
var now = new Date();
var dateString = 'Today is ' + weekday[now.getDay()] + ', ' +
month[now.getMonth()] + ' ' + now.getDate();
return elem.textContent === dateString;
}));
});
});