Skip to content

Commit

Permalink
Merge pull request #653 from zebrunner/develop
Browse files Browse the repository at this point in the history
2.4 rc
  • Loading branch information
vdelendik authored Dec 22, 2022
2 parents 74692b9 + f0538c0 commit 8ec3906
Show file tree
Hide file tree
Showing 68 changed files with 120 additions and 13,377 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@
/tmp/
package-lock.json
lib/units/storage/tmp/
yarn.lock
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ RUN apt-get update && \

# go-ios utility to manage iOS devices connected to Linux provider host
#Grab gidevice from github and extract it in a folder
RUN wget https://github.com/danielpaulus/go-ios/releases/download/v1.0.69/go-ios-linux.zip && unzip go-ios-linux.zip -d /usr/local/bin && rm go-ios-linux.zip
RUN wget https://github.com/danielpaulus/go-ios/releases/download/v1.0.98/go-ios-linux.zip && unzip go-ios-linux.zip -d /usr/local/bin && rm go-ios-linux.zip

# Install app requirements. Trying to optimize push speed for dependant apps
# by reducing layers as much as possible. Note that one of the final steps
Expand Down Expand Up @@ -88,6 +88,11 @@ RUN set -x && \
cd /opt && \
find /tmp -mindepth 1 ! -regex '^/tmp/hsperfdata_root\(/.*\)?' -delete

RUN cp ./icon/x120/iOS.jpg /opt/node_modules/@devicefarmer/stf-device-db/dist/icon/x120/iOS && \
cp ./icon/x24/iOS.jpg /opt/node_modules/@devicefarmer/stf-device-db/dist/icon/x24/iOS && \
cp ./icon/x120/Android.jpg /opt/node_modules/@devicefarmer/stf-device-db/dist/icon/x120/Android && \
cp ./icon/x24/Android.jpg /opt/node_modules/@devicefarmer/stf-device-db/dist/icon/x24/Android

# Switch to the app user.
USER stf
##Use root user only for debug
Expand Down
Binary file added icon/x120/Android.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icon/x120/iOS.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icon/x24/Android.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icon/x24/iOS.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 0 additions & 26 deletions iosdevice.json

This file was deleted.

8 changes: 1 addition & 7 deletions lib/cli/device/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,6 @@ module.exports.builder = function(yargs) {
, type: 'number'
, demand: true
})
.option('appium-port', {
describe: 'The appium\'s port for remote debug'
, type: 'number'
, default: 4723
})
.option('device-name', {
describe: 'Device name'
, type: 'string'
Expand Down Expand Up @@ -196,8 +191,7 @@ module.exports.handler = function(argv) {
, lockRotation: argv.lockRotation
, cleanup: argv.cleanup
, screenReset: argv.screenReset
, host: argv.host
, appiumPort: argv.appiumPort
, deviceName: argv.deviceName
, host: argv.host
})
}
20 changes: 7 additions & 13 deletions lib/cli/ios-device/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,6 @@ module.exports.builder = function(yargs) {
, type: 'boolean'
, default: false
})
.option('appium-port', {
describe: 'The appium\'s port for remote debug'
, type: 'number'
, default: 4723
})
.option('device-name', {
describe: 'Device name'
, type: 'string'
Expand All @@ -188,12 +183,12 @@ module.exports.builder = function(yargs) {
, type: 'string'
, default: false
})
.option('host', {
describe: 'Provider hostname.'
, type: 'string'
, demand: true
, default: '127.0.0.1'
})
.option('host', {
describe: 'Provider hostname.'
, type: 'string'
, demand: true
, default: '127.0.0.1'
})

}

Expand Down Expand Up @@ -229,9 +224,8 @@ module.exports.handler = function(argv) {
, screenReset: argv.screenReset
, udidStorage: argv.udidStorage
, iproxy: argv.iproxy
, host: argv.host
, appiumPort: argv.appiumPort
, deviceName: argv.deviceName
, deviceType: argv.deviceType
, host: argv.host
})
}
6 changes: 0 additions & 6 deletions lib/cli/provider/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,6 @@ module.exports.builder = function(yargs) {
, demand: true
, default: 5900
})
.option('appium-port', {
describe: 'The appium\'s port for remote debug'
, type: 'number'
, default: 4723
})
.option('device-name', {
describe: 'Device name'
, type: 'string'
Expand Down Expand Up @@ -224,7 +219,6 @@ module.exports.handler = function(argv) {
, '--vnc-initial-size', argv.vncInitialSize.join('x')
, '--mute-master', argv.muteMaster
, '--host', argv.host
, '--appium-port', argv.appiumPort
]
.concat(argv.connectSub.reduce(function(all, val) {
return all.concat(['--connect-sub', val])
Expand Down
Binary file removed lib/units/app/public/icons/appium.png
Binary file not shown.
5 changes: 1 addition & 4 deletions lib/units/device/plugins/remotedebug.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,12 @@ module.exports = syrup.serial()
.dependency(require('../support/push'))
.define((options, group, push) => {
const log = logger.createLogger('remote debug')
this.remoteAppiumUrl = `http://${options.host}:${options.appiumPort}/wd/hub`

const updateRemoteConnectUrl = (group) => {
log.info('remotedebug Appium url: ' + this.remoteAppiumUrl)
push.send([
group.group,
wireutil.envelope(new wire.UpdateRemoteConnectUrl(
options.serial,
this.remoteAppiumUrl
options.serial
))
])
}
Expand Down
5 changes: 1 addition & 4 deletions lib/units/ios-device/plugins/remotedebug.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,12 @@ module.exports = syrup.serial()
.dependency(require('../support/push'))
.define((options, group, push) => {
const log = logger.createLogger('remote debug')
this.remoteAppiumUrl = `http://${options.host}:${options.appiumPort}/wd/hub`

const updateRemoteConnectUrl = (group) => {
log.info('remotedebug Appium url: ' + this.remoteAppiumUrl)
push.send([
group.group,
wireutil.envelope(new wire.UpdateRemoteConnectUrl(
options.serial,
this.remoteAppiumUrl
options.serial
))
])
}
Expand Down
1 change: 0 additions & 1 deletion lib/units/processor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,6 @@ module.exports = db.ensureConnectivity(function(options) {
})
.on(wire.UpdateRemoteConnectUrl, function(channel, message, data) {
appDealer.send([channel, data])
dbapi.setDeviceConnectUrl(message.serial, message.url)
})
.on(wire.InstalledApplications, function(channel, message, data) {
appDealer.send([channel, data])
Expand Down
1 change: 0 additions & 1 deletion lib/units/websocket/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,6 @@ module.exports = function(options) {
socket.emit('device.change', {
important: true,
data: {
remoteConnectUrl: message.url,
serial: message.serial
}
})
Expand Down
1 change: 0 additions & 1 deletion lib/wire/wire.proto
Original file line number Diff line number Diff line change
Expand Up @@ -939,5 +939,4 @@ message TemporarilyUnavailableMessage {

message UpdateRemoteConnectUrl {
required string serial= 1;
required string url = 2;
}
59 changes: 46 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,19 @@
"in-publish": "^2.0.0",
"jws": "^3.1.0",
"ldapjs": "^1.0.0",
"lodash": "^4.14.2",
"lodash": "~>=4.17.20",
"markdown-serve": "^0.8.0",
"mime": "^1.3.4",
"minimatch": "^3.0.3",
"mjpeg-consumer": "^2.0.0",
"my-local-ip": "^1.0.0",
"openid": "^2.0.1",
"passport": "^0.4.1",
"passport": "^0.6.0",
"passport-oauth2": "^1.1.2",
"passport-saml": "^0.15.0",
"passport-saml": "^3.2.4",
"protobufjs": "^3.8.2",
"proxy-addr": "^2.0.7",
"pug": "^2.0.0-beta4",
"pug": "^3.0.1",
"request": "^2.67.0",
"request-progress": "^2.0.1",
"request-promise": "^4.2.4",
Expand Down Expand Up @@ -110,6 +110,7 @@
"async": "^2.0.1",
"bower": "^1.8.8",
"chai": "^3.4.1",
"consolidate": "^0.14.0",
"css-loader": "^0.28.11",
"del": "^2.0.1",
"eslint": "^4.19.1",
Expand All @@ -120,18 +121,18 @@
"gulp": "^4.0.2",
"gulp-angular-gettext": "^2.1.0",
"gulp-eslint": "^4.0.2",
"gulp-jsonlint": "^1.0.2",
"gulp-protractor": "^3.0.0",
"gulp-jsonlint": "^1.3.2",
"gulp-protractor": "^4.1.1",
"gulp-pug": "^4.0.1",
"gulp-run": "^1.6.12",
"gulp-util": "^3.0.7",
"gulp-run": "^1.7.1",
"gulp-util": "^3.0.8",
"html-loader": "^0.5.5",
"http-https": "^1.0.0",
"imports-loader": "^0.8.0",
"jasmine-core": "^2.4.1",
"jasmine-reporters": "^2.3.2",
"json-loader": "^0.5.4",
"karma": "^2.0.2",
"karma": "^5.2.3",
"karma-chrome-launcher": "^3.1.0",
"karma-firefox-launcher": "^1.0.0",
"karma-ie-launcher": "^1.0.0",
Expand All @@ -156,14 +157,14 @@
"sinon-chai": "^2.7.0",
"socket.io-client": "1.4.8",
"style-loader": "^0.23.1",
"template-html-loader": "^0.0.4",
"template-html-loader": "^1.0.0",
"then-jade": "^2.4.1",
"url-loader": "^0.6.2",
"webpack": "^3.1.0",
"webpack-dev-server": "^2.11.5"
"webpack": "^3.1.0"
},
"engines": {
"node": ">= 6.9"
"node": ">= 6.9",
"npm": ">= 8.3.0"
},
"externalDependencies": {
"rethinkdb": ">= 2.2",
Expand All @@ -172,6 +173,38 @@
"gm": "~1",
"adb": "~1"
},
"overrides": {
"constantinople": "~>=3.1.1",
"ejs": "~>=3.1.7",
"eventsource": "~>=1.1.1",
"https-proxy-agent": "~>2.2.2",
"loader-utils": "~>=1.4.1",
"lodash": "$lodash",
"lodash.template": "~>=4.5.0",
"pug": "$pug",
"qs": "~>=6.11.0",
"ua-parser-js": "~>0.7.23",
"uglify-js": "~>=2.6.0",
"underscore": "~>1.12.0",
"xmldom": "~>=0.6.0",
"xmlhttprequest-ssl": "~>1.6.1"
},
"resolutions": {
"constantinople": "~>=3.1.1",
"ejs": "~>=3.1.7",
"eventsource": "~>=1.1.1",
"https-proxy-agent": "~>2.2.2",
"loader-utils": "~>=1.4.1",
"lodash": "~>=4.17.20",
"lodash.template": "~>=4.5.0",
"pug": "~>=3.0.1",
"qs": "~>=6.11.0",
"ua-parser-js": "~>0.7.23",
"uglify-js": "~>=2.5.0",
"underscore": "~>1.12.0",
"xmldom": "~>=0.6.0",
"xmlhttprequest-ssl": "~>1.6.1"
},
"preferGlobal": true,
"collective": {
"type": "opencollective",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ module.exports = function EnhanceDeviceServiceFactory($filter, AppState) {
function enhanceDevice(device) {
device.enhancedName = device.name || device.model || device.serial || 'Unknown'
device.enhancedModel = device.model || 'Unknown'
device.enhancedImage120 = '/static/app/devices/icon/x120/' + (device.image || '_default.jpg')
device.enhancedImage24 = '/static/app/devices/icon/x24/' + (device.image || '_default.jpg')
device.enhancedImage120 = '/static/app/devices/icon/x120/' + (device.platform || device.image || '_default.jpg')
device.enhancedImage24 = '/static/app/devices/icon/x24/' + (device.platform || device.image || '_default.jpg')
device.enhancedStateAction = $filter('statusNameAction')(device.state)
device.enhancedStatePassive = $filter('statusNamePassive')(device.state)
}
Expand Down
3 changes: 1 addition & 2 deletions res/app/components/stf/install/install-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ module.exports = function InstallService(
$rootScope
, $http
, $filter
, StorageService,
DeviceService
, StorageService
) {
var installService = Object.create(null)

Expand Down
3 changes: 3 additions & 0 deletions res/app/control-panes/advanced/advanced.pug
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@
.col-md-6
div(ng-include='"control-panes/advanced/maintenance/maintenance.pug"')
.col-md-6
div(ng-include='"control-panes/advanced/device-settings/device-settings.pug"')

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = angular.module('stf.device-settings', [

])
.run(['$templateCache', function($templateCache) {
$templateCache.put('control-panes/automation/device-settings/device-settings.pug',
$templateCache.put('control-panes/advanced/device-settings/device-settings.pug',
require('./device-settings.pug')
)
}])
Expand Down
3 changes: 2 additions & 1 deletion res/app/control-panes/advanced/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ module.exports = angular.module('stf.advanced', [
// require('./usb').name,
// require('./vnc').name,
require('./port-forwarding').name,
require('./maintenance').name
require('./maintenance').name,
require('./device-settings').name
])
.run(['$templateCache', function($templateCache) {
$templateCache.put('control-panes/advanced/advanced.pug',
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions res/app/control-panes/automation/appium-remote-debug/index.js

This file was deleted.

Loading

0 comments on commit 8ec3906

Please sign in to comment.