mirror of
https://github.com/openstf/stf
synced 2025-10-05 19:42:01 +02:00
Added stub for refactoring screen to screen-keyboard and screen-touch.
This commit is contained in:
parent
9303c073b6
commit
321e61db64
8 changed files with 80 additions and 0 deletions
6
res/app/components/stf/screen/screen-keyboard/index.js
Normal file
6
res/app/components/stf/screen/screen-keyboard/index.js
Normal file
|
@ -0,0 +1,6 @@
|
|||
require('./screen-keyboard.css')
|
||||
|
||||
module.exports = angular.module('stf.screen-keyboard', [
|
||||
|
||||
])
|
||||
.directive('screenKeyboard', require('./screen-keyboard-directive'))
|
|
@ -0,0 +1,11 @@
|
|||
module.exports = function screenKeyboardDirective() {
|
||||
return {
|
||||
restrict: 'E',
|
||||
template: require('./screen-keyboard.jade'),
|
||||
link: function (scope, element) {
|
||||
var input = element.find('input')
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
describe('screenKeyboard', function () {
|
||||
|
||||
beforeEach(module('stf.screen-keyboard'));
|
||||
|
||||
var scope, compile;
|
||||
|
||||
beforeEach(inject(function ($rootScope, $compile) {
|
||||
scope = $rootScope.$new();
|
||||
compile = $compile;
|
||||
}));
|
||||
|
||||
it('should ...', function () {
|
||||
|
||||
/*
|
||||
To test your directive, you need to create some html that would use your directive,
|
||||
send that through compile() then compare the results.
|
||||
|
||||
var element = compile('<div screen-keyboard name="name">hi</div>')(scope);
|
||||
expect(element.text()).toBe('hello, world');
|
||||
*/
|
||||
|
||||
});
|
||||
});
|
|
@ -0,0 +1,3 @@
|
|||
.stf-screen-keyboard {
|
||||
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
input(type='password', tabindex='40', accesskey='C',
|
||||
autocorrect='off', autocapitalize='off').stf-screen-keyboard
|
4
res/app/components/stf/screen/screen-touch/index.js
Normal file
4
res/app/components/stf/screen/screen-touch/index.js
Normal file
|
@ -0,0 +1,4 @@
|
|||
module.exports = angular.module('stf.screen-touch', [
|
||||
|
||||
])
|
||||
.directive('screenTouch', require('./screen-touch-directive'))
|
|
@ -0,0 +1,8 @@
|
|||
module.exports = function screenTouchDirective() {
|
||||
return {
|
||||
restrict: 'A',
|
||||
link: function (scope, element, attrs) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
describe('screenTouch', function () {
|
||||
|
||||
beforeEach(module('stf.screen-touch'));
|
||||
|
||||
var scope, compile;
|
||||
|
||||
beforeEach(inject(function ($rootScope, $compile) {
|
||||
scope = $rootScope.$new();
|
||||
compile = $compile;
|
||||
}));
|
||||
|
||||
it('should ...', function () {
|
||||
|
||||
/*
|
||||
To test your directive, you need to create some html that would use your directive,
|
||||
send that through compile() then compare the results.
|
||||
|
||||
var element = compile('<div screen-touch name="name">hi</div>')(scope);
|
||||
expect(element.text()).toBe('hello, world');
|
||||
*/
|
||||
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue