cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-9122) Implement integration tests for platform and plugin save/restore feature
Date Thu, 11 Jun 2015 22:29:02 GMT

    [ https://issues.apache.org/jira/browse/CB-9122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14582619#comment-14582619
] 

ASF GitHub Bot commented on CB-9122:
------------------------------------

Github user omefire commented on a diff in the pull request:

    https://github.com/apache/cordova-lib/pull/246#discussion_r32275447
  
    --- Diff: cordova-lib/spec-cordova/helpers.js ---
    @@ -43,17 +54,101 @@ if (host.match(/win/)) {
     }
     */
     
    -// Just use Android everywhere; we're mocking out any calls to the `android` binary.
    -module.exports.testPlatform = 'android';
    +module.exports.setEngineSpec = function (appPath, spec) {
    +    appPath = getConfigPath(appPath);
    +    var parser = new ConfigParser(appPath);
    +
    +    parser.removeEngine(module.exports.testPlatform);
    +    parser.addEngine(module.exports.testPlatform, spec);
    +    parser.write();
    +};
    +
    +module.exports.getEngineSpec = function (appPath) {
    +    appPath = getConfigPath(appPath);
    +    var parser = new ConfigParser(appPath),
    +        engines = parser.getEngines();
    +
    +    for (var i = 0; i < engines.length; i++) {
    +        if (engines[i].name === module.exports.testPlatform) {
    +            return engines[i].spec;
    +        }
    +    }
    +    return null;
    +};
    +
    +module.exports.removeEngine = function (appPath) {
    --- End diff --
    
    please, pass in the engine to be removed as a separate parameter. I think that makes the
intent of the function clearer.
    Hate global vars, :)


> Implement integration tests for platform and plugin save/restore feature
> ------------------------------------------------------------------------
>
>                 Key: CB-9122
>                 URL: https://issues.apache.org/jira/browse/CB-9122
>             Project: Apache Cordova
>          Issue Type: Task
>          Components: CordovaLib
>            Reporter: Alexander Sorokin
>
> List of integration tests and scenarios to be written :
>  
>    CORDOVA PLATFORM/PLUGIN ADD TESTS :
> -          Ensure that support for custom .tgz files is still enabled (VS depends on
this)
> -          cordova platform add android --save [empty config.xml]
> -          cordova platform add android --save [config.xml already contains android@3.6.0]
> -          cordova platform add android --save [config.xml contains android@file://C:/path/to/android]
> -          cordova platform add android@3.18.9 --save [invalid version => in this
case, install should fail and should not update config.xml] 
> -          cordova platform add C://path/to/android/platform --save
> -          support for custom branch checkout : cordova platform add https://github.com/apache/cordova-android.git#2.6.x
> -          cordova plugin add cordova-plugin-console –save [config.xml empty]
> -          cordova plugin add cordova-plugin-console –save [config.xml already contains
cordova-plugin-console@0.2.11]
> -          cordova plugin add facebook-plugins –variables … –save [testing variables
support]
> -          cordova plugin add git_url
> -          cordova plugin add local_folder
>  
>    CORDOVA PLATFORM/PLUGIN REMOVE TESTS :
> -          cordova platform remove android --save [config.xml is empty]
> -          cordova platform remove android --save [config.xml contains android@C:/path/to/android/platform]
> -          cordova plugin remove plugin-id --save [config.xml is empty]
> -          cordova plugin remove plugin-id --save [config.xml contains git-url of plugin]
>  
>    CORDOVA PLATFORM/PLUGIN UPDATE TESTS :
> -          cordova platform update android@3.7.0  --save [config.xml already contains
android@3.8.0]
> -          support for git-urls : cordova platform update https://github.com/apache/cordova-android.git
–save
> -          cordova plugin update cordova-plugin-console --save
> -          cordova plugin update cordova-plugin-console@0.2.11 --save
>  
>   MASS-SAVE TESTS :
> -          cordova platform save [no platforms installed => no update to config.xml]
> -          cordova platform save [with some platforms installed]
> -          cordova plugin save [no plugins installed => no update to config.xml]
> -          cordova plugin save [with some plugins installed: one with version, one with
local folder and another one via git cloning]
>  
>    PLATFORM/PLUGIN RESTORATION :
> -          cordova prepare => should restore all platforms and plugins
> -          cordova prepare android



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message