Skip to content

Commit

Permalink
Adjust to new test data. Give more feedback on data error while uploa…
Browse files Browse the repository at this point in the history
…ding.
  • Loading branch information
hajoeichler committed Jul 30, 2015
1 parent 78f0000 commit 3accb05
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
16 changes: 10 additions & 6 deletions features/common.feature
Expand Up @@ -19,13 +19,13 @@ Feature: Show common information for tooling
And the output should contain:
"""
About to write files...
Generated 1 files for normal product-types
Generated 8 files for normal product-types
Finished generating files, checking results in target folder: .
Found 1 files in target folder .
Found 8 files in target folder .
Execution successfully finished
"""
Then a file named "product-type-all.json" should exist
And the file "product-type-all.json" should contain:
Then a file named "product-type-boo-txt-num.json" should exist
And the file "product-type-boo-txt-num.json" should contain:
"""
{
"name": "LocTextCFF",
Expand All @@ -42,5 +42,9 @@ Feature: Show common information for tooling
"inputHint": ""
}
"""
When I run `product-type-update --projectKey import-101-64 --source product-type-all.json`
Then the exit status should be 0
When I run `product-type-update --projectKey import-101-64 --source product-type-boo-txt-num.json`
#Then the exit status should be 0
And the output should contain:
"""
Product Types successfully posted to SPHERE.IO
"""
3 changes: 2 additions & 1 deletion src/coffee/update.coffee
Expand Up @@ -53,7 +53,8 @@ ProjectCredentialsConfig.create()
console.log 'Product Types successfully posted to SPHERE.IO'
process.exit 0
.catch (e) ->
console.error "Oops, something went wrong: #{e.message}"
console.error "Oops, something went wrong: #{e}"
console.error("Body: %j", e.body) if e.body
process.exit 1
else
console.error "Could not find #{argv.source} path"
Expand Down

0 comments on commit 3accb05

Please sign in to comment.