Skip to content

Files

Latest commit

author
ktrzeciaknubisa
Dec 2, 2015
6a8a269 · Dec 2, 2015

History

History
This branch is up to date with jxcore/jxcore-cordova:master.

test

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Nov 16, 2015
Nov 16, 2015
Dec 2, 2015
Nov 9, 2015
Nov 9, 2015

JXcore Cordova - Node API tests

Running the tests on mobile devices

The following steps allows you to run the tests on mobile devices. You need to have Cordova and JXcore installed and available in $PATH.

Create cordova application

cordova create jxcore-cordova-tests org.jxcore.jxcorecordovatests jxcore-cordova-tests
cd jxcore-cordova-tests

Download and unpack jxcore-cordova plugin

wget http://az836273.vo.msecnd.net/0.0.8/io.jxcore.node.jx
jx io.jxcore.node.jx

Prepare the test application

rm -rf www/*
cp -r io.jxcore.node/test/* www/
cd www/jxcore
jx install --autoremove "*.gz,*.md,.*"
cd ../../

For iOS 9 you need to do an extra step and add the following block to plugin.xml into <platform name="ios"> tag:

<platform name="ios">
    ...
    <config-file target="*-Info.plist" parent="NSAppTransportSecurity">
        <dict>
            <key>NSAllowsArbitraryLoads</key>
            <true/>
        </dict>
    </config-file>
</platform>

or you can just overwrite plugin.xml with test/plugin.xml:

cp www/plugin.xml ./

Add the plugin and run the tests

cordova platforms add android
cordova plugins add io.jxcore.node
cordova run android

Running the tests on native node (as desktop application)

git clone https://github.com/jxcore/jxcore-cordova
cd test/jxcore/
jx install
mocha

#Notes

If running cordova 5.0.0 check that your not affected by this error http://stackoverflow.com/questions/30048429/cordova-does-not-actually-install-app-on-android-device

#Contributions

Tests from the superagent project have been incorporated into this project.