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
62
gaia/apps/settings/test/marionette/app/regions/keyboard.js
Executable file
62
gaia/apps/settings/test/marionette/app/regions/keyboard.js
Executable file
|
|
@ -0,0 +1,62 @@
|
|||
'use strict';
|
||||
var Base = require('../base');
|
||||
|
||||
/**
|
||||
* Abstraction around settings keyboard panel
|
||||
* @constructor
|
||||
* @param {Marionette.Client} client for operations.
|
||||
*/
|
||||
function KeyboardPanel(client) {
|
||||
// Call the Base constructor to initiate base class.
|
||||
Base.call(this, client, null, KeyboardPanel.Selectors);
|
||||
}
|
||||
|
||||
module.exports = KeyboardPanel;
|
||||
|
||||
KeyboardPanel.Selectors = {
|
||||
keyboardList: '.allKeyboardList li',
|
||||
header: '#keyboard gaia-header',
|
||||
panel: '#keyboard',
|
||||
selectKeyboards: '#keyboard a[href="#keyboard-selection-addMore"]',
|
||||
builtinKeyboardList: '#keyboard-selection-addMore .keyboardAppContainer ul',
|
||||
backButton: '#keyboard-selection-addMore gaia-header'
|
||||
};
|
||||
|
||||
KeyboardPanel.prototype = {
|
||||
|
||||
__proto__: Base.prototype,
|
||||
|
||||
get header() {
|
||||
return this.findElement('header');
|
||||
},
|
||||
|
||||
tapBuiltInKeyboardItem: function() {
|
||||
this.waitForElement('keyboardList').tap();
|
||||
},
|
||||
|
||||
tapSelectKeyboards: function() {
|
||||
this.waitForElement('selectKeyboards').tap();
|
||||
},
|
||||
|
||||
selectLayout: function(layoutLabel) {
|
||||
var builtinKeyboardList = this.waitForElement('builtinKeyboardList');
|
||||
var layout = builtinKeyboardList.scriptWith(function(list, layoutLabel) {
|
||||
var langs = list.querySelectorAll('bdi');
|
||||
return [].filter.call(langs, function(lang) {
|
||||
return (lang.innerHTML === layoutLabel);
|
||||
})[0];
|
||||
}, [layoutLabel]);
|
||||
layout.tap();
|
||||
},
|
||||
|
||||
tapBackButton: function() {
|
||||
var header = this.waitForElement('backButton');
|
||||
header.tap(25, 25);
|
||||
},
|
||||
|
||||
isDialog: function() {
|
||||
var dialogAttribute =
|
||||
this.findElement('panel').getAttribute('data-dialog');
|
||||
return dialogAttribute === 'true';
|
||||
}
|
||||
};
|
||||
Loading…
Reference in a new issue