Skip to content

Commit c1c8cf9

Browse files
Copilotswissspidy
andcommitted
Complete test scenario for diff between two revisions
Co-authored-by: swissspidy <[email protected]>
1 parent acc2907 commit c1c8cf9

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

features/post-revision.feature

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,24 @@ Feature: Manage WordPress post revisions
4949
Success: Updated post {POST_ID}.
5050
"""
5151

52-
When I run `wp post list --post_type=revision --post_parent={POST_ID} --fields=ID --format=csv --orderby=ID --order=ASC`
53-
Then STDOUT should not be empty
52+
When I run `wp post update {POST_ID} --post_content='Third version'`
53+
Then STDOUT should contain:
54+
"""
55+
Success: Updated post {POST_ID}.
56+
"""
5457

55-
When I run `wp post list --post_type=revision --post_parent={POST_ID} --format=ids --orderby=ID --order=ASC`
58+
When I run `wp post list --post_type=revision --post_parent={POST_ID} --fields=ID --format=ids --orderby=ID --order=ASC`
5659
Then STDOUT should not be empty
60+
And save STDOUT as {REVISION_IDS}
61+
62+
When I run `echo "{REVISION_IDS}" | awk '{print $1}'`
63+
Then save STDOUT as {REVISION_ID_1}
64+
65+
When I run `echo "{REVISION_IDS}" | awk '{print $2}'`
66+
Then save STDOUT as {REVISION_ID_2}
67+
68+
When I run `wp post revision diff {REVISION_ID_1} {REVISION_ID_2}`
69+
Then the return code should be 0
5770

5871
Scenario: Show diff between revision and current post
5972
When I run `wp post create --post_title='Diff Test' --post_content='Original text' --porcelain`

0 commit comments

Comments
 (0)