diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-06-17 18:14:40 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-06-17 18:14:40 +0200 |
| commit | 712deb604be9d608b990c6ba1f9af2560e8f20e3 (patch) | |
| tree | dfa8889be024038eaedcc238cb2892fdcc38f12e | |
| parent | 76df508468975b9ffdd47373e5a406e21ac8cfdf (diff) | |
confirm error msg better
| -rwxr-xr-x | StoneIsland/config.xml | 2 | ||||
| -rw-r--r-- | StoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist | 4 | ||||
| -rwxr-xr-x | StoneIsland/platforms/ios/Stone Island/config.xml | 2 | ||||
| -rwxr-xr-x | StoneIsland/www/js/index.js | 8 | ||||
| -rwxr-xr-x | StoneIsland/www/js/lib/_router.js | 3 | ||||
| -rwxr-xr-x | StoneIsland/www/js/lib/blogs/BlogView.js | 1 | ||||
| -rwxr-xr-x | StoneIsland/www/js/lib/view/Serializable.js | 4 | ||||
| -rwxr-xr-x | StoneIsland/www/js/sdk/_sdk.js | 2 | ||||
| -rwxr-xr-x | proxy/index.js | 2 | ||||
| -rwxr-xr-x | test/package.json | 2 | ||||
| -rwxr-xr-x | test/test/01-product.js | 15 | ||||
| -rwxr-xr-x | test/test/05-cart-flows.js | 26 |
12 files changed, 45 insertions, 26 deletions
diff --git a/StoneIsland/config.xml b/StoneIsland/config.xml index 7d8b8a8d..596b086a 100755 --- a/StoneIsland/config.xml +++ b/StoneIsland/config.xml @@ -1,5 +1,5 @@ <?xml version='1.0' encoding='utf-8'?> -<widget android-versionCode="6101" id="us.okfoc.stoneisland" version="1.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> +<widget android-versionCode="6102" id="us.okfoc.stoneisland" version="1.0.2" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <name>Stone Island</name> <description> Stone Island diff --git a/StoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist b/StoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist index 491a45aa..7e3de9c9 100644 --- a/StoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist +++ b/StoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist @@ -21,11 +21,11 @@ <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> - <string>1.0.1</string> + <string>1.0.2</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> - <string>1.0.1</string> + <string>1.0.2</string> <key>LSRequiresIPhoneOS</key> <true/> <key>NSMainNibFile</key> diff --git a/StoneIsland/platforms/ios/Stone Island/config.xml b/StoneIsland/platforms/ios/Stone Island/config.xml index 7c355416..4046e5d8 100755 --- a/StoneIsland/platforms/ios/Stone Island/config.xml +++ b/StoneIsland/platforms/ios/Stone Island/config.xml @@ -1,5 +1,5 @@ <?xml version='1.0' encoding='utf-8'?> -<widget android-versionCode="6101" id="us.okfoc.stoneisland" version="1.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> +<widget android-versionCode="6102" id="us.okfoc.stoneisland" version="1.0.2" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <feature name="LocalStorage"> <param name="ios-package" value="CDVLocalStorage" /> </feature> diff --git a/StoneIsland/www/js/index.js b/StoneIsland/www/js/index.js index 9b54ad44..a5a2cdfa 100755 --- a/StoneIsland/www/js/index.js +++ b/StoneIsland/www/js/index.js @@ -96,9 +96,9 @@ var app = (function(){ app.view = null app.router = new SiteRouter () -// if (sdk.env == "test") { -// app.router.launch() -// } + // if (sdk.env == "test") { + // app.router.launch() + // } // else { // } @@ -106,7 +106,7 @@ var app = (function(){ app.account.connect(window.deepLinkRoute || '/intro') app.blog.fetch(function(){ console.log("navigating to deep link route after fetch") - app.router.initial_route = window.deepLinkRoute || "/intro" + app.router.initial_route = window.deepLinkRoute || null app.router.launch() }) } diff --git a/StoneIsland/www/js/lib/_router.js b/StoneIsland/www/js/lib/_router.js index 19bd3247..19b6fd63 100755 --- a/StoneIsland/www/js/lib/_router.js +++ b/StoneIsland/www/js/lib/_router.js @@ -51,6 +51,7 @@ var SiteRouter = Router.extend({ initial_route: null, launch: function(){ + console.log("LAUNCH!") if (this.initial_route) { this.parseRoute( this.initial_route ) } @@ -89,7 +90,7 @@ var SiteRouter = Router.extend({ } // window.FirebasePlugin && window.FirebasePlugin.setScreenName(name) - +console.log("view >>", app.view) app.header.set_back( !! app.view.back ) app.view.show() }.bind(this) diff --git a/StoneIsland/www/js/lib/blogs/BlogView.js b/StoneIsland/www/js/lib/blogs/BlogView.js index 6eea977f..e9086982 100755 --- a/StoneIsland/www/js/lib/blogs/BlogView.js +++ b/StoneIsland/www/js/lib/blogs/BlogView.js @@ -54,6 +54,7 @@ var BlogView = View.extend({ app.closed.storeClosedMessageTwo = app.store.StoreClosedMessageTwo break } + console.log(data) if (app.closed.storeIsClosed && sdk.env !== 'test') { app.closed.populate(app.store.ClosedStoreImages) diff --git a/StoneIsland/www/js/lib/view/Serializable.js b/StoneIsland/www/js/lib/view/Serializable.js index de5fe951..f1c61072 100755 --- a/StoneIsland/www/js/lib/view/Serializable.js +++ b/StoneIsland/www/js/lib/view/Serializable.js @@ -105,7 +105,9 @@ var SerializableView = View.extend({ var msgs = [] errors.forEach(function(e, i){ if (i > 0) { return } - this.$("[name=" + e[0] + "]").addClass('error_hilite') + if (e[0]) { + this.$("[name=" + e[0] + "]").addClass('error_hilite') + } msgs.push(e[1]) }.bind(this)) this.$msg.html(msgs.join("<br>")) diff --git a/StoneIsland/www/js/sdk/_sdk.js b/StoneIsland/www/js/sdk/_sdk.js index ef29ff92..aba05ca3 100755 --- a/StoneIsland/www/js/sdk/_sdk.js +++ b/StoneIsland/www/js/sdk/_sdk.js @@ -9,7 +9,7 @@ var sdk = (function(){ sdk.init = function(opt){ switch (sdk.env = opt.env || "development") { case 'test': - endpoint = window.location.origin + "/" + endpoint = ('window' in this ? window.location.origin + "/" : "http://lvh.me:9090/") break default: case 'development': diff --git a/proxy/index.js b/proxy/index.js index 18d61f13..425f97f6 100755 --- a/proxy/index.js +++ b/proxy/index.js @@ -8,7 +8,7 @@ var PORT = 9090 var cache = {} var DEBUG = false -var USE_CACHE = true +var USE_CACHE = false var server = http.createServer().listen(PORT, function(){ console.log('Proxy listening on: http://lvh.me:%s', PORT) diff --git a/test/package.json b/test/package.json index dd095e58..e6a2d845 100755 --- a/test/package.json +++ b/test/package.json @@ -10,7 +10,7 @@ "license": "LNT", "dependencies": { "jquery": "^2.1.4", - "mocha": "^2.3.3", + "mocha": "^5.2.0", "najax": "^0.2.1" } } diff --git a/test/test/01-product.js b/test/test/01-product.js index 636c3187..66e89626 100755 --- a/test/test/01-product.js +++ b/test/test/01-product.js @@ -8,6 +8,21 @@ var assert = require("assert") describe('product', function(){ var test_item + describe('#collection_by_gallery()', function(){ + it('returns a collection', function(done){ + promise(sdk.product.collection_by_gallery).then(function(data){ +console.log(data) + assert(data.Header.StatusCode == 200) + assert(data.SearchResponseFull.Results.Items.length > 0) + test_item = data.SearchResponseFull.Results.Items[0] + done() + }).error(function(error){ + console.log(error) + done() + }) + }) + }) + describe('#collection()', function(){ it('returns a collection', function(done){ promise(sdk.product.collection).then(function(data){ diff --git a/test/test/05-cart-flows.js b/test/test/05-cart-flows.js index 3a139ba0..f907e613 100755 --- a/test/test/05-cart-flows.js +++ b/test/test/05-cart-flows.js @@ -8,6 +8,7 @@ var assert = require("assert") // sdk.cart.delete_item // sdk.cart.get_status +/* describe('finalize_cart', function(){ var new_user_data = { "Email": "blahtest+" + Math.floor(Math.random() * 10000000) + "@blahtest.com", @@ -263,18 +264,17 @@ describe('finalize_cart', function(){ }) }) -/* - describe('#secure_finalize()', function(){ - it('fails to finalize a cart with test data', function(done){ - promise(sdk.cart.secure_finalize, { ReturnUrl: "stoneisland.com", Token: sdk.auth.access_token }).then(function(data){ - console.log("SUCCESS", data) - done() - }).error(function(data){ - console.log("FAILURE", data) - done() - }) - }) - }) + // describe('#secure_finalize()', function(){ + // it('fails to finalize a cart with test data', function(done){ + // promise(sdk.cart.secure_finalize, { ReturnUrl: "stoneisland.com", Token: sdk.auth.access_token }).then(function(data){ + // console.log("SUCCESS", data) + // done() + // }).error(function(data){ + // console.log("FAILURE", data) + // done() + // }) + // }) + // }) +}) */ -}) |
