diff --git a/gulpfile.js b/gulpfile.js index 4966f2d1..1ae034cb 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -96,10 +96,10 @@ if (gutil.env.multi) { protractorConfig = './res/test/protractor-appium.conf' } -gulp.task('webdriver-update', protractor.webdriver_update) -gulp.task('webdriver-standalone', protractor.webdriver_standalone) +gulp.task('webdriver-update', protractor.webdriverUpdate) +gulp.task('webdriver-standalone', protractor.webdriverStandalone) gulp.task('protractor-explorer', function (callback) { - protractor.protractor_explorer({ + protractor.protractorExplorer({ url: require(protractorConfig).config.baseUrl }, callback) }) diff --git a/res/app/components/stf/browser-info/browser-info-spec.js b/res/app/components/stf/browser-info/browser-info-spec.js index 8f9a8533..101d5bf2 100644 --- a/res/app/components/stf/browser-info/browser-info-spec.js +++ b/res/app/components/stf/browser-info/browser-info-spec.js @@ -1,11 +1,11 @@ describe('BrowserInfo', function() { - beforeEach(angular.mock.module(require('./').name)); + beforeEach(angular.mock.module(require('./').name)) - it('should ...', inject(function(BrowserInfo) { + it('should ...', inject(function() { //expect(BrowserInfo.doSomething()).toEqual('something'); - })); + })) }) diff --git a/res/app/components/stf/common-ui/modals/add-adb-key-modal/add-adb-key-modal-spec.js b/res/app/components/stf/common-ui/modals/add-adb-key-modal/add-adb-key-modal-spec.js index f54a5135..1639a7be 100644 --- a/res/app/components/stf/common-ui/modals/add-adb-key-modal/add-adb-key-modal-spec.js +++ b/res/app/components/stf/common-ui/modals/add-adb-key-modal/add-adb-key-modal-spec.js @@ -2,7 +2,7 @@ describe('FatalMessageService', function() { beforeEach(angular.mock.module(require('./').name)); - it('should ...', inject(function(FatalMessageService) { + it('should ...', inject(function() { //expect(FatalMessageService.doSomething()).toEqual('something'); diff --git a/res/app/components/stf/common-ui/modals/external-url-modal/external-url-modal-spec.js b/res/app/components/stf/common-ui/modals/external-url-modal/external-url-modal-spec.js index 6ccee1a8..863a675c 100644 --- a/res/app/components/stf/common-ui/modals/external-url-modal/external-url-modal-spec.js +++ b/res/app/components/stf/common-ui/modals/external-url-modal/external-url-modal-spec.js @@ -2,7 +2,7 @@ describe('ExternalUrlModalService', function() { beforeEach(angular.mock.module(require('./').name)); - it('should ...', inject(function(ExternalUrlModalService) { + it('should ...', inject(function() { //expect(FatalMessageService.doSomething()).toEqual('something'); diff --git a/res/app/components/stf/common-ui/modals/fatal-message/fatal-message-spec.js b/res/app/components/stf/common-ui/modals/fatal-message/fatal-message-spec.js index f54a5135..1639a7be 100644 --- a/res/app/components/stf/common-ui/modals/fatal-message/fatal-message-spec.js +++ b/res/app/components/stf/common-ui/modals/fatal-message/fatal-message-spec.js @@ -2,7 +2,7 @@ describe('FatalMessageService', function() { beforeEach(angular.mock.module(require('./').name)); - it('should ...', inject(function(FatalMessageService) { + it('should ...', inject(function() { //expect(FatalMessageService.doSomething()).toEqual('something'); diff --git a/res/app/components/stf/common-ui/modals/lightbox-image/lightbox-image-spec.js b/res/app/components/stf/common-ui/modals/lightbox-image/lightbox-image-spec.js index c0e011fd..7a2b9a72 100644 --- a/res/app/components/stf/common-ui/modals/lightbox-image/lightbox-image-spec.js +++ b/res/app/components/stf/common-ui/modals/lightbox-image/lightbox-image-spec.js @@ -2,7 +2,7 @@ describe('LightboxImageService', function() { beforeEach(angular.mock.module(require('./').name)); - it('should ...', inject(function(LightboxImageService) { + it('should ...', inject(function() { //expect(XLightboxImageService.doSomething()).toEqual('something'); diff --git a/res/app/components/stf/common-ui/modals/socket-disconnected/socket-disconnected-spec.js b/res/app/components/stf/common-ui/modals/socket-disconnected/socket-disconnected-spec.js index 22a4a17e..0e3f29eb 100644 --- a/res/app/components/stf/common-ui/modals/socket-disconnected/socket-disconnected-spec.js +++ b/res/app/components/stf/common-ui/modals/socket-disconnected/socket-disconnected-spec.js @@ -2,7 +2,7 @@ describe('SocketDisconnectedService', function() { beforeEach(angular.mock.module(require('./index').name)) - it('should ...', inject(function(SocketDisconnectedService) { + it('should ...', inject(function() { //expect(SocketDisconnectedService.doSomething()).toEqual('something') diff --git a/res/app/components/stf/common-ui/modals/version-update/version-update-spec.js b/res/app/components/stf/common-ui/modals/version-update/version-update-spec.js index f8acf372..1fb2587c 100644 --- a/res/app/components/stf/common-ui/modals/version-update/version-update-spec.js +++ b/res/app/components/stf/common-ui/modals/version-update/version-update-spec.js @@ -3,7 +3,7 @@ describe('VersionUpdateService', function() { beforeEach(angular.mock.module(require('ui-bootstrap').name)); beforeEach(angular.mock.module(require('./').name)); - it('should ...', inject(function(VersionUpdateService) { + it('should ...', inject(function() { //expect(VersionUpdateService.doSomething()).toEqual('something'); diff --git a/res/app/components/stf/filter-string/filter-string-spec.js b/res/app/components/stf/filter-string/filter-string-spec.js index 150cde7c..b0848f9c 100644 --- a/res/app/components/stf/filter-string/filter-string-spec.js +++ b/res/app/components/stf/filter-string/filter-string-spec.js @@ -1,11 +1,11 @@ describe('FilterStringService', function() { - beforeEach(angular.mock.module(require('./').name)); + beforeEach(angular.mock.module(require('./').name)) - it('should ...', inject(function(FilterStringService) { + it('should ...', inject(function() { - //expect(FilterStringService.doSomething()).toEqual('something'); + //expect(FilterStringService.doSomething()).toEqual('something') - })); + })) }) diff --git a/res/app/components/stf/install/install-spec.js b/res/app/components/stf/install/install-spec.js index c11280fd..704432ee 100644 --- a/res/app/components/stf/install/install-spec.js +++ b/res/app/components/stf/install/install-spec.js @@ -2,9 +2,9 @@ describe('install', function() { beforeEach(angular.mock.module(require('./').name)) - it('should ...', inject(function($filter) { + it('should ...', inject(function() { - var filter = $filter('installError') + //var filter = $filter('installError') //expect(filter('input')).toEqual('output') diff --git a/res/app/components/stf/logcat/logcat-spec.js b/res/app/components/stf/logcat/logcat-spec.js index df9fc51b..7d386944 100644 --- a/res/app/components/stf/logcat/logcat-spec.js +++ b/res/app/components/stf/logcat/logcat-spec.js @@ -1,11 +1,11 @@ describe('LogcatService', function() { - beforeEach(angular.mock.module(require('./').name)); + beforeEach(angular.mock.module(require('./').name)) - it('should ...', inject(function(LogcatService) { + it('should ...', inject(function() { - //expect(LogcatService.doSomething()).toEqual('something'); + //expect(LogcatService.doSomething()).toEqual('something') - })); + })) }) diff --git a/res/app/components/stf/native-url/native-url-spec.js b/res/app/components/stf/native-url/native-url-spec.js index 39b7baf1..fd1db94a 100644 --- a/res/app/components/stf/native-url/native-url-spec.js +++ b/res/app/components/stf/native-url/native-url-spec.js @@ -2,7 +2,7 @@ describe('NativeUrlService', function() { beforeEach(angular.mock.module(require('./').name)) - it('should ...', inject(function(NativeUrlService) { + it('should ...', inject(function() { //expect(NativeUrlService.doSomething()).toEqual('something') diff --git a/res/app/components/stf/port-forwarding/port-forwarding-spec.js b/res/app/components/stf/port-forwarding/port-forwarding-spec.js index 84b3df71..2574bde2 100644 --- a/res/app/components/stf/port-forwarding/port-forwarding-spec.js +++ b/res/app/components/stf/port-forwarding/port-forwarding-spec.js @@ -1,11 +1,10 @@ describe('PortForwardingService', function() { - beforeEach(angular.mock.module(require('./').name)); + beforeEach(angular.mock.module(require('./').name)) - it('should ...', inject(function(PortForwardingService) { - expect(1).toBe(1) - //expect(PortForwardingService.doSomething()).toEqual('something'); + it('should ...', inject(function() { + //expect(PortForwardingService.doSomething()).toEqual('something') - })); + })) }) diff --git a/res/app/components/stf/scoped-hotkeys/scoped-hotkeys-spec.js b/res/app/components/stf/scoped-hotkeys/scoped-hotkeys-spec.js index c22ba96d..deef34f6 100644 --- a/res/app/components/stf/scoped-hotkeys/scoped-hotkeys-spec.js +++ b/res/app/components/stf/scoped-hotkeys/scoped-hotkeys-spec.js @@ -1,11 +1,11 @@ describe('ScopedHotkeysService', function() { - beforeEach(angular.mock.module(require('./').name)); + beforeEach(angular.mock.module(require('./').name)) - it('should ...', inject(function(ScopedHotkeysService) { + it('should ...', inject(function() { - //expect(ScopedHotkeysService.doSomething()).toEqual('something'); + //expect(ScopedHotkeysService.doSomething()).toEqual('something') - })); + })) }) diff --git a/res/app/components/stf/screen/fast-image-render/test/performance_test.js b/res/app/components/stf/screen/fast-image-render/test/performance_test.js index ebba7712..f9f3afa6 100644 --- a/res/app/components/stf/screen/fast-image-render/test/performance_test.js +++ b/res/app/components/stf/screen/fast-image-render/test/performance_test.js @@ -7,6 +7,10 @@ var frame = { current: 0 } +function FastImageRender () { + +} + var imageRender = new FastImageRender( canvasElement , { diff --git a/res/app/components/stf/screen/screen-keyboard/screen-keyboard-directive.js b/res/app/components/stf/screen/screen-keyboard/screen-keyboard-directive.js index 1b3449b2..fd85ff98 100644 --- a/res/app/components/stf/screen/screen-keyboard/screen-keyboard-directive.js +++ b/res/app/components/stf/screen/screen-keyboard/screen-keyboard-directive.js @@ -3,8 +3,7 @@ module.exports = function screenKeyboardDirective() { restrict: 'E', template: require('./screen-keyboard.jade'), link: function (scope, element) { - var input = element.find('input') - + element.find('input') } } diff --git a/res/app/components/stf/screen/screen-touch/screen-touch-directive.js b/res/app/components/stf/screen/screen-touch/screen-touch-directive.js index f4291fc8..272ab552 100644 --- a/res/app/components/stf/screen/screen-touch/screen-touch-directive.js +++ b/res/app/components/stf/screen/screen-touch/screen-touch-directive.js @@ -1,7 +1,7 @@ module.exports = function screenTouchDirective() { return { restrict: 'A', - link: function (scope, element, attrs) { + link: function () { } } diff --git a/res/app/components/stf/text-history/text-history-directive.js b/res/app/components/stf/text-history/text-history-directive.js index cba78b07..0714889b 100644 --- a/res/app/components/stf/text-history/text-history-directive.js +++ b/res/app/components/stf/text-history/text-history-directive.js @@ -5,7 +5,7 @@ module.exports = function textHistoryDirective() { return { restrict: 'A', template: '', - link: function (scope, element, attrs) { + link: function () { } } diff --git a/res/app/components/stf/timeline/timeline-spec.js b/res/app/components/stf/timeline/timeline-spec.js index d1e22933..6bc2050f 100644 --- a/res/app/components/stf/timeline/timeline-spec.js +++ b/res/app/components/stf/timeline/timeline-spec.js @@ -2,7 +2,7 @@ describe('TimelineService', function() { beforeEach(angular.mock.module(require('./').name)); - it('should ...', inject(function(TimelineService) { + it('should ...', inject(function() { //expect(TimelineService.doSomething()).toEqual('something'); diff --git a/res/app/components/stf/upload/upload-spec.js b/res/app/components/stf/upload/upload-spec.js index a7ed030c..a2abb45f 100644 --- a/res/app/components/stf/upload/upload-spec.js +++ b/res/app/components/stf/upload/upload-spec.js @@ -2,9 +2,9 @@ describe('upload', function() { beforeEach(angular.mock.module(require('./').name)) - it('should ...', inject(function($filter) { + it('should ...', inject(function() { - var filter = $filter('uploadError') + //var filter = $filter('uploadError') //expect(filter('input')).toEqual('output') diff --git a/res/app/control-panes/advanced/run-js/run-js-controller.js b/res/app/control-panes/advanced/run-js/run-js-controller.js index 7c940582..cf42a383 100644 --- a/res/app/control-panes/advanced/run-js/run-js-controller.js +++ b/res/app/control-panes/advanced/run-js/run-js-controller.js @@ -1,3 +1,3 @@ -module.exports = function RunJsCtrl($scope) { - +module.exports = function RunJsCtrl() { + } diff --git a/res/app/control-panes/advanced/usb/usb-controller.js b/res/app/control-panes/advanced/usb/usb-controller.js index 09ee2aed..e7ad2488 100644 --- a/res/app/control-panes/advanced/usb/usb-controller.js +++ b/res/app/control-panes/advanced/usb/usb-controller.js @@ -1,3 +1,3 @@ -module.exports = function UsbCtrl($scope) { - +module.exports = function UsbCtrl() { + } diff --git a/res/test/e2e/control/control-spec.js b/res/test/e2e/control/control-spec.js index 02d12869..26e32884 100644 --- a/res/test/e2e/control/control-spec.js +++ b/res/test/e2e/control/control-spec.js @@ -36,9 +36,9 @@ describe('Control Page', function () { }) describe('Remote Control', function () { - var RemoteCtrl = function () { - this.paneHandleHorizontal = element(by.css('.fa-pane-handle.horizontal')) - } + //var RemoteCtrl = function () { + // this.paneHandleHorizontal = element(by.css('.fa-pane-handle.horizontal')) + //} it('should resize panel to the right', function () { }) diff --git a/res/test/e2e/help/help-spec.js b/res/test/e2e/help/help-spec.js index cb04cfba..ff9bdab2 100644 --- a/res/test/e2e/help/help-spec.js +++ b/res/test/e2e/help/help-spec.js @@ -1,7 +1,7 @@ describe('Help Page', function () { - var HelpPage = function () { - this.get = function () { - browser.get(protractor.getInstance().baseUrl + 'help') - } - } + //var HelpPage = function () { + // this.get = function () { + // browser.get(protractor.getInstance().baseUrl + 'help') + // } + //} }) diff --git a/res/test/e2e/helpers/fail-fast.js b/res/test/e2e/helpers/fail-fast.js index b9ae6fe8..342a14c7 100644 --- a/res/test/e2e/helpers/fail-fast.js +++ b/res/test/e2e/helpers/fail-fast.js @@ -3,7 +3,7 @@ module.exports = function FailFast() { var passed = jasmine.getEnv().currentSpec.results().passed() if (!passed) { - jasmine.getEnv().specFilter = function (spec) { + jasmine.getEnv().specFilter = function () { return false } } diff --git a/res/test/e2e/helpers/gulp-protractor-adv.js b/res/test/e2e/helpers/gulp-protractor-adv.js index 8238f0e0..e4b4ad7d 100644 --- a/res/test/e2e/helpers/gulp-protractor-adv.js +++ b/res/test/e2e/helpers/gulp-protractor-adv.js @@ -8,10 +8,8 @@ */ var es = require('event-stream') -var fs = require('fs') var path = require('path') -var child_process = require('child_process') -var async = require('async') +var childProcess = require('child_process') var PluginError = require('gulp-util').PluginError var winExt = /^win/.test(process.platform) ? ".cmd" : "" var http = require('http') @@ -72,7 +70,7 @@ var protractor = function (options) { args.unshift(options.configFile) child = - child_process.spawn(path.resolve(getProtractorDir() + '/protractor' + + childProcess.spawn(path.resolve(getProtractorDir() + '/protractor' + winExt), args, { stdio: 'inherit', env: process.env @@ -93,30 +91,30 @@ var protractor = function (options) { }) } -var webdriver_update = function (opts, cb) { +var webdriverUpdate = function (opts, cb) { var callback = (cb ? cb : opts) var options = (cb ? opts : null) var args = ["update", "--standalone"] if (options) { if (options.browsers) { - options.browsers.forEach(function (element, index, array) { + options.browsers.forEach(function (element) { args.push("--" + element) }) } } - child_process.spawn(path.resolve(getProtractorDir() + '/webdriver-manager' + + childProcess.spawn(path.resolve(getProtractorDir() + '/webdriver-manager' + winExt), args, { stdio: 'inherit' }).once('close', callback) } -var webdriver_update_specific = function (opts) { - return webdriver_update.bind(this, opts) +var webdriverUpdateSpecific = function (opts) { + return webdriverUpdate.bind(this, opts) } -webdriver_update.bind(null, ["ie", "chrome"]) +webdriverUpdate.bind(null, ["ie", "chrome"]) -var webdriver_standalone = function (opts, cb) { +var webdriverStandalone = function (opts, cb) { var callback = (cb ? cb : opts) var options = (cb ? opts : null) var stdio = 'inherit' @@ -127,7 +125,7 @@ var webdriver_standalone = function (opts, cb) { } } - var child = child_process.spawn(path.resolve(getProtractorDir() + + var child = childProcess.spawn(path.resolve(getProtractorDir() + '/webdriver-manager' + winExt), ['start'], { stdio: stdio }) @@ -179,18 +177,18 @@ var isWebDriverRunning = function () { }) } -var ensureWebDriverRunning = function () { - return new Promise(function (resolve) { - isWebDriverRunning().then(function (running) { - if (running) { - resolve() - } - }) - }) -} +//var ensureWebDriverRunning = function () { +// return new Promise(function (resolve) { +// isWebDriverRunning().then(function (running) { +// if (running) { +// resolve() +// } +// }) +// }) +//} -var protractor_explorer = function (opts, cb) { +var protractorExplorer = function (opts, cb) { var callback = (cb ? cb : opts) var options = (cb ? opts : null) var url = 'https://angularjs.org/' @@ -209,7 +207,7 @@ var protractor_explorer = function (opts, cb) { } function runElementExplorer(callback) { - var child = child_process.spawn(path.resolve(getProtractorExplorerDir() + + var child = childProcess.spawn(path.resolve(getProtractorExplorerDir() + '/elementexplorer.js'), [url], { stdio: 'inherit' }) @@ -226,7 +224,7 @@ var protractor_explorer = function (opts, cb) { if (running) { runElementExplorer(callback) } else { - webdriver_standalone({stdio: ['pipe', 'pipe', process.stderr]}, + webdriverStandalone({stdio: ['pipe', 'pipe', process.stderr]}, function () { }) @@ -243,9 +241,9 @@ var protractor_explorer = function (opts, cb) { module.exports = { getProtractorDir: getProtractorDir, protractor: protractor, - webdriver_standalone: webdriver_standalone, - webdriver_update: webdriver_update, - webdriver_update_specific: webdriver_update_specific, - protractor_explorer: protractor_explorer, + webdriverStandalone: webdriverStandalone, + webdriverUpdate: webdriverUpdate, + webdriverUpdateSpecific: webdriverUpdateSpecific, + protractorExplorer: protractorExplorer, isWebDriverRunning: isWebDriverRunning } diff --git a/res/test/e2e/settings/settings-spec.js b/res/test/e2e/settings/settings-spec.js index 8a9646c9..eb510292 100644 --- a/res/test/e2e/settings/settings-spec.js +++ b/res/test/e2e/settings/settings-spec.js @@ -1,7 +1,7 @@ describe('Settings Page', function () { - var SettingsPage = function () { - this.get = function () { - browser.get(protractor.getInstance().baseUrl + 'settings') - } - } + //var SettingsPage = function () { + // this.get = function () { + // browser.get(protractor.getInstance().baseUrl + 'settings') + // } + //} }) diff --git a/res/test/karma.conf.js b/res/test/karma.conf.js index ab93b673..d93bf12a 100644 --- a/res/test/karma.conf.js +++ b/res/test/karma.conf.js @@ -1,4 +1,3 @@ -var _ = require('lodash') var webpackConfig = require('./../../webpack.config') var webpack = require('webpack') diff --git a/res/test/protractor-appium.conf.js b/res/test/protractor-appium.conf.js index 8bd5909c..ef3dbdfe 100644 --- a/res/test/protractor-appium.conf.js +++ b/res/test/protractor-appium.conf.js @@ -14,4 +14,4 @@ config.capabilities = { browserName: 'Chrome' } -exports.config = config +module.exports.config = config diff --git a/res/test/protractor-multi.conf.js b/res/test/protractor-multi.conf.js index 4b39bab4..fbe7ea24 100644 --- a/res/test/protractor-multi.conf.js +++ b/res/test/protractor-multi.conf.js @@ -1,7 +1,7 @@ var config = require('./protractor.conf').config -var LoginPage = require('./e2e/login') -var HtmlReporter = require('protractor-html-screenshot-reporter') -var WaitUrl = require('./e2e/helpers/wait-url') +//var LoginPage = require('./e2e/login') +//var HtmlReporter = require('protractor-html-screenshot-reporter') +//var WaitUrl = require('./e2e/helpers/wait-url') config.chromeOnly = false config.capabilities = null @@ -34,4 +34,4 @@ config.multiCapabilities = [ //} -exports.config = config +module.exports.config = config diff --git a/res/test/protractor.conf.js b/res/test/protractor.conf.js index 7548a7d9..e12a153e 100644 --- a/res/test/protractor.conf.js +++ b/res/test/protractor.conf.js @@ -1,11 +1,11 @@ // Reference: https://github.com/angular/protractor/blob/master/referenceConf.js var LoginPage = require('./e2e/login') var BrowserLogs = require('./e2e/helpers/browser-logs') -var FailFast = require('./e2e/helpers/fail-fast') +//var FailFast = require('./e2e/helpers/fail-fast') var HtmlReporter = require('protractor-html-screenshot-reporter') var WaitUrl = require('./e2e/helpers/wait-url') -exports.config = { +module.exports.config = { baseUrl: process.env.STF_URL || 'http://localhost:7100/#!/', suites: { control: 'e2e/control/**/*-spec.js',