From 39c8c4b1d8c42a5981966f28ac09df1604f3d6ca Mon Sep 17 00:00:00 2001 From: Alain Schlesser Date: Tue, 17 Apr 2018 16:05:35 +0200 Subject: [PATCH 1/4] Fix break in "Creating/getting/editing posts" --- features/post.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/post.feature b/features/post.feature index ff510fe74..cad7dc323 100644 --- a/features/post.feature +++ b/features/post.feature @@ -223,7 +223,7 @@ Feature: Manage WordPress posts Then STDOUT should be: """ http://example.com/?p=1 - http://example.com/?p=3 + http://example.com/?p=4 """ Scenario: Update a post from file or STDIN From 3248f34741cb61e0004e175c300fa24aa0c09496 Mon Sep 17 00:00:00 2001 From: Alain Schlesser Date: Tue, 17 Apr 2018 16:07:14 +0200 Subject: [PATCH 2/4] Fix scenario "Creating/listing posts" --- features/post.feature | 1 + 1 file changed, 1 insertion(+) diff --git a/features/post.feature b/features/post.feature index cad7dc323..2b46eaff0 100644 --- a/features/post.feature +++ b/features/post.feature @@ -311,6 +311,7 @@ Feature: Manage WordPress posts Then STDOUT should be: """ Sample Page + Privacy Policy """ When I run `wp post list --post_type=any --fields=post_title,post_name,post_status --format=csv --orderby=post_title --order=ASC` From c954febb0758e4969ccecdc63e9034ee8e6aa1d7 Mon Sep 17 00:00:00 2001 From: Alain Schlesser Date: Tue, 17 Apr 2018 16:12:32 +0200 Subject: [PATCH 3/4] Fix scenario "Empty a site" --- features/site-empty.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/site-empty.feature b/features/site-empty.feature index f04fe85c3..35cbd402e 100644 --- a/features/site-empty.feature +++ b/features/site-empty.feature @@ -20,7 +20,7 @@ Feature: Empty a WordPress site of its data When I run `wp post create --post_title='Test post' --post_content='Test content.' --porcelain` Then STDOUT should be: """ - 4 + 5 """ When I run `wp term create post_tag 'Test term' --slug=test --description='This is a test term'` From a4c0adf4cbd374aae967cdcb557013b9d7690cb9 Mon Sep 17 00:00:00 2001 From: Alain Schlesser Date: Tue, 17 Apr 2018 17:42:09 +0200 Subject: [PATCH 4/4] Fix the fixes We need to fix the tests in such a way that they don't break for everything that is not `trunk`, of course. --- features/post.feature | 5 ++--- features/site-empty.feature | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/features/post.feature b/features/post.feature index 2b46eaff0..9fb286ac4 100644 --- a/features/post.feature +++ b/features/post.feature @@ -223,7 +223,7 @@ Feature: Manage WordPress posts Then STDOUT should be: """ http://example.com/?p=1 - http://example.com/?p=4 + http://example.com/?p={POST_ID} """ Scenario: Update a post from file or STDIN @@ -308,10 +308,9 @@ Feature: Manage WordPress posts """ When I run `wp post list --post_type='page' --field=title` - Then STDOUT should be: + Then STDOUT should contain: """ Sample Page - Privacy Policy """ When I run `wp post list --post_type=any --fields=post_title,post_name,post_status --format=csv --orderby=post_title --order=ASC` diff --git a/features/site-empty.feature b/features/site-empty.feature index 35cbd402e..11d33db04 100644 --- a/features/site-empty.feature +++ b/features/site-empty.feature @@ -17,10 +17,10 @@ Feature: Empty a WordPress site of its data """ And the return code should be 1 - When I run `wp post create --post_title='Test post' --post_content='Test content.' --porcelain` - Then STDOUT should be: + When I run `wp post create --post_title='Test post' --post_content='Test content.'` + Then STDOUT should contain: """ - 5 + Success: Created post """ When I run `wp term create post_tag 'Test term' --slug=test --description='This is a test term'`