You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by an...@apache.org on 2013/03/04 20:32:51 UTC
[72/91] [abbrv] git commit: Added another test to see if it edited
config.xml
Added another test to see if it edited config.xml
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/e019e6cc
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/e019e6cc
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/e019e6cc
Branch: refs/heads/master
Commit: e019e6cc561ca5177d3f3406bdcdd7265cc401d9
Parents: b45b3dd
Author: Tim Kim <ti...@adobe.com>
Authored: Thu Jan 31 13:05:58 2013 -0800
Committer: Tim Kim <ti...@adobe.com>
Committed: Thu Jan 31 13:05:58 2013 -0800
----------------------------------------------------------------------
test/bb10-install.js | 23 +++++------------------
1 files changed, 5 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/e019e6cc/test/bb10-install.js
----------------------------------------------------------------------
diff --git a/test/bb10-install.js b/test/bb10-install.js
index cf48fe9..f49ae1c 100644
--- a/test/bb10-install.js
+++ b/test/bb10-install.js
@@ -29,9 +29,7 @@ exports.setUp = function(callback) {
exports.tearDown = function(callback) {
// remove the temp files (projects and plugins)
- console.log(fs.readdirSync(test_dir));
shell.rm('-rf', test_dir);
- //console.log(fs.readdirSync(test_dir));
callback();
}
@@ -46,30 +44,19 @@ exports['should move the source files'] = function (test) {
test.ok(fs.existsSync(srcDir + '/simulator/echoJnext.so'));
test.done();
}
-/*
-exports['should edit config.xml'] = function (test) {
- // setting up WebNotification (with config.xml)
- var dummy_plugin_dir = path.join(test_dir, 'plugins', 'WebNotifications')
- var dummy_xml_path = path.join(test_dir, 'plugins', 'WebNotifications', 'plugin.xml')
-
- // overriding some params
- var project_dir = path.join(test_dir, 'projects', 'ios-config-xml')
- var dummy_plugin_et = new et.ElementTree(et.XML(fs.readFileSync(dummy_xml_path, 'utf-8')));
- // run the platform-specific function
- ios.handlePlugin('install', project_dir, dummy_plugin_dir, dummy_plugin_et);
+exports['should edit config.xml'] = function (test) {
+ bb10.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);
- var configXmlPath = path.join(project_dir, 'SampleApp', 'config.xml');
+ var configXmlPath = path.join(test_project_dir, 'config.xml');
var pluginsTxt = fs.readFileSync(configXmlPath, 'utf-8'),
pluginsDoc = new et.ElementTree(et.XML(pluginsTxt)),
- expected = 'plugins/plugin[@name="WebNotifications"]' +
- '[@value="WebNotifications"]';
-
+ expected = 'feature[@id="cordova.echo"]';
test.ok(pluginsDoc.find(expected));
test.done();
}
-*/
+
exports['should not install a plugin that is already installed'] = function (test) {
bb10.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);