Skip to content

Commit 4d826ef

Browse files
committed
Fixed command and tests
1 parent 86452a1 commit 4d826ef

20 files changed

+126
-70
lines changed

features/workspace_node_clone.feature renamed to features/node_clone.feature

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@ Feature: Clone a node from a given workspace to the current workspace
1212

1313
Scenario: Clone node
1414
Given the current workspace is "default"
15-
And I execute the "workspace:node:clone default_1 /cms/articles/article1 /cms/clone" command
15+
And I execute the "node:clone /cms/articles/article1 /cms/clone default_1" command
1616
Then the command should not fail
1717
And I save the session
1818
And there should exist a node at "/cms/clone"
1919

2020
Scenario: Clone onto existing
21-
Given I execute the "workspace:node:clone default_1 /cms/articles/article1 /cms/articles" command
21+
Given I execute the "node:clone /cms/articles/article1 /cms/articles default_1" command
2222
Then the command should fail
2323
And I should see the following:
2424
"""
2525
Node already exists at destination
2626
"""
2727

2828
Scenario: Clone onto existing but remove
29-
Given I execute the "workspace:node:clone --remove-existing default_1 /cms/articles/article1 /cms/articles/article1" command
29+
Given I execute the "node:clone --remove-existing /cms/articles/article1 /cms/articles/article1 default_1" command
3030
Then the command should not fail

features/workspace_node_copy.feature renamed to features/node_copy.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ Feature: Copy a node from a given workspace to the current workspace
1111
And I purge the current workspace
1212

1313
Scenario: Copy node from a different workspace
14-
Given I execute the "workspace:node:copy /tests_general_base/index.txt /index.txt default_1" command
14+
Given I execute the "node:copy /tests_general_base/index.txt /index.txt default_1" command
1515
Then the command should not fail
1616
And there should exist a node at "/index.txt"
1717

1818
Scenario: Copy node in the same workspace
19-
And I execute the "workspace:node:copy /tests_general_base/index.txt /tests_general_base/index.txt.2" command
19+
Given I execute the "node:copy /tests_general_base/index.txt /tests_general_base/index.txt.2" command
2020
Then the command should not fail
2121
And I save the session
2222
And there should exist a node at "/tests_general_base/index.txt.2"

features/node_corresponding.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ Feature: Display the path of any corresponding node in a given workspace
1111
And the "session_data.xml" fixtures are loaded
1212
And the current workspace is "default"
1313

14-
Scenario: Rename a node
14+
Scenario: Show corresponding nodes
1515
Given the current node is "/tests_general_base/idExample"
16-
And I execute the "node:corresponding default" command
16+
And I execute the "node:corresponding . default" command
1717
Then the command should not fail
1818
And I should see the following:
1919
"""

features/session_node_move.feature renamed to features/node_move.feature

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,16 @@ Feature: Move a node in the current session
88
And the "session_data.xml" fixtures are loaded
99

1010
Scenario: Move node
11-
Given I execute the "session:node:move /tests_general_base/index.txt /foobar" command
11+
Given I execute the "node:move /tests_general_base/index.txt /foobar" command
1212
Then the command should not fail
1313
And I execute the "session:save" command
1414
And there should exist a node at "/foobar"
1515
And there should not exist a node at "/tests_general_base/index.txt"
16+
17+
Scenario: Move node relative paths
18+
Given the current node is "/tests_general_base/index.txt"
19+
And I execute the "node:move . /barfoo" command
20+
Then the command should not fail
21+
And I execute the "session:save" command
22+
And there should exist a node at "/barfoo"
23+
And there should not exist a node at "/tests_general_base/index.txt"

features/session_property_edit.feature renamed to features/node_property_edit.feature

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@ Feature: Edit a single property
1414

1515
Examples:
1616
| command |
17-
| session:property:edit /properties/multivalue 1|
17+
| node:property:edit /properties/multivalue 1|
1818

1919
Scenario: Edit multivalue property, no index
20-
Given I execute the "session:property:edit /properties/multivalue" command
20+
Given I execute the "node:property:edit /properties/multivalue" command
2121
Then the command should fail
2222
And I should see the following:
2323
"""
2424
You specified a multivalue property but did not provide an index
2525
"""
2626

2727
Scenario: Edit multivalue property, out of range
28-
Given I execute the "session:property:edit /properties/multivalue 100" command
28+
Given I execute the "node:property:edit /properties/multivalue 100" command
2929
Then the command should fail
3030
And I should see the following:
3131
"""

features/session_property_remove.feature renamed to features/node_property_remove.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ Feature: Remove a single property at a specified path
88
And the "cms.xml" fixtures are loaded
99

1010
Scenario: Remove a property
11-
Given I execute the "session:property:remove /cms/articles/article1/title" command
11+
Given I execute the "node:property:remove /cms/articles/article1/title" command
1212
Then the command should not fail
1313
And I save the session
1414
And there should not exist a property at "/cms/articles/article1/title"
1515

1616
Scenario: Try and remove a node
17-
And I execute the "session:property:remove /tests_general_base" command
17+
And I execute the "node:property:remove /tests_general_base" command
1818
Then the command should fail
1919
And I should see the following:
2020
"""

features/session_property_show.feature renamed to features/node_property_show.feature

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Feature: Display the contents of a single property
88
And the "session_data.xml" fixtures are loaded
99

1010
Scenario: Show binary property
11-
Given I execute the "session:property:show /tests_general_base/index.txt/jcr:content/jcr:data" command
11+
Given I execute the "node:property:show /tests_general_base/index.txt/jcr:content/jcr:data" command
1212
Then the command should not fail
1313
And I should see the following:
1414
"""
@@ -29,15 +29,15 @@ hello world
2929
"""
3030

3131
Scenario: Show date property
32-
Given I execute the "session:property:show /tests_general_base/index.txt/jcr:content/mydateprop" command
32+
Given I execute the "node:property:show /tests_general_base/index.txt/jcr:content/mydateprop" command
3333
Then the command should not fail
3434
And I should see the following:
3535
"""
3636
2011-04-21T14:34:20+01:00
3737
"""
3838

3939
Scenario: Try to show non-existing property
40-
Given I execute the "session:property:show /this/path/does/not/exist" command
40+
Given I execute the "node:property:show /this/path/does/not/exist" command
4141
Then the command should fail
4242
And I should see the following:
4343
"""

features/node_set.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ Feature: Set a node property
1616

1717
Examples:
1818
| command | name | type |
19-
| node:set uri http://foobar | uri | http://foobar |
20-
| node:set double 12.12 | double | 12.12 |
21-
| node:set long 123 | long | 123 |
22-
| node:set thisisnew foobar --type=string | /properties/thisisnew | foobar |
19+
| node:property:set uri http://foobar | uri | http://foobar |
20+
| node:property:set double 12.12 | double | 12.12 |
21+
| node:property:set long 123 | long | 123 |
22+
| node:property:set thisisnew foobar --type=string | /properties/thisisnew | foobar |
2323

2424
Scenario: Update a property but do not specify the type
2525
Given I execute the "node:set /properties/decimal 1234" command

features/node_shared_remove.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Feature: Remove the current node from any shared set to which it belongs
1212

1313
Scenario: Remove the current node and all of its shared paths
1414
Given the current node is "/foobar"
15-
And I execute the "node:shared:remove" command
15+
And I execute the "node:shared:remove ." command
1616
Then the command should fail
1717
And I should see the following:
1818
"""

features/node_shared_show.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Feature: Show the current nodes shared set
1212

1313
Scenario: Show the current nodes shared set
1414
Given the current node is "/foobar"
15-
And I execute the "node:shared:show" command
15+
And I execute the "node:shared:show ." command
1616
Then the command should fail
1717
And I should see the following:
1818
"""

0 commit comments

Comments
 (0)