-
Notifications
You must be signed in to change notification settings - Fork 7
/
common.feature
50 lines (48 loc) · 1.56 KB
/
common.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Feature: Show common information for tooling
Scenario: Show general help
When I run `product-type-generator`
Then the exit status should be 1
And the output should contain:
"""
Usage:
"""
Scenario: Show general help
When I run `product-type-generator --attributes ../../data/tests/product-types-attributes-all.csv --types ../../data/tests/product-types.csv --target .`
Then the exit status should be 0
And the output should contain:
"""
About to read files...
Running generator...
"""
And the output should contain:
"""
About to write files...
Generated 8 files for normal product-types
Finished generating files, checking results in target folder: .
Found 8 files in target folder .
Execution successfully finished
"""
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",
"label": {
"de": "Lokalisierter Text",
"en": "Localizable Text"
},
"type": {
"name": "ltext"
},
"attributeConstraint": "CombinationUnique",
"isRequired": false,
"isSearchable": false,
"inputHint": "SingleLine"
},
"""
When I run `product-type-update --projectKey product-type-json-generator-tests --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
"""