Github user vladimir-kotikov commented on a diff in the pull request:

    https://github.com/apache/cordova-paramedic/pull/11#discussion_r69461819
  
    --- Diff: lib/paramedic.js ---
    @@ -190,48 +192,160 @@ ParamedicRunner.prototype.writeMedicConnectionUrl = 
function(url) {
         fs.writeFileSync(path.join('www','medic.json'), 
JSON.stringify({logurl:url}));
     };
     
    -ParamedicRunner.prototype.runTests = function () {
    +ParamedicRunner.prototype.buildApp = function () {
         var self = this;
    -    if (this.config.shouldUseSauce()) {
    -        var command = this.getCommandForBuilding();
    +    var command = this.getCommandForBuilding();
    +
    +    logger.normal('cordova-paramedic: running command ' + command);
    +
    +    return execPromise(command)
    +    .fail(function(output) {
    +        // this trace is automatically available in verbose mode
    +        // so we check for this flag to not trace twice
    +        if (!self.config.verbose) {
    +            logger.normal(output);
    +        }
    +        logger.normal('cordova-paramedic: unable to build project; command 
log is available above');
    +        throw new Error('Unable to build project.');
    +    });
    +};
    +
    +ParamedicRunner.prototype.runLocalTests = function () {
    +    var self = this;
    +
    +    return self.getCommandForStartingTests()
    +    .then(function(command) {
    +        self.setPermissions();
             logger.normal('cordova-paramedic: running command ' + command);
     
    -        return execPromise(command)
    -        .then(self.runSauceTests.bind(self), function(output) {
    -            // this trace is automatically available in verbose mode
    -            // so we check for this flag to not trace twice
    -            if (!self.config.verbose) {
    -                logger.normal(output);
    -            }
    -            logger.normal('cordova-paramedic: unable to build project; 
command log is available above');
    -            throw new Error('Command "' + command + '" failed.');
    +        return execPromise(command);
    +    })
    +    .then(function() {
    +        // skip tests if it was just build
    +        if (self.shouldWaitForTestResult()) {
    +            return Q.promise(function(resolve, reject) {
    +                // reject if timed out
    +                self.waitForConnection().catch(reject);
    +                // resolve if got results
    +                self.waitForTests().then(resolve);
    +            });
    +        }
    +    }, function(output) {
    +        // this trace is automatically available in verbose mode
    +        // so we check for this flag to not trace twice
    +        if (!self.config.verbose) {
    +            logger.normal(output);
    +        }
    +        logger.normal('cordova-paramedic: unable to run tests; command log 
is available above');
    +        throw new Error('Unable to run tests.');
    +    });
    +};
    +
    +ParamedicRunner.prototype.getAppiumDeviceName = function () {
    +    if (!this.targetObj) {
    +        return '';
    --- End diff --
    
    Is this case supported by Appium? Should we throw instead?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org

Reply via email to