From 6e843df93ec35048605b6171cdbf5dcecfc71336 Mon Sep 17 00:00:00 2001 From: Alain Schlesser Date: Thu, 19 Apr 2018 15:43:52 +0200 Subject: [PATCH 1/2] Adapt post/page generation to make them resilient to added privacy policy page --- features/import.feature | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/features/import.feature b/features/import.feature index 2b38e9938..78907d4b1 100644 --- a/features/import.feature +++ b/features/import.feature @@ -2,8 +2,9 @@ Feature: Import content. Scenario: Basic export then import Given a WP install - And I run `wp post generate --post_type=post --count=3` - And I run `wp post generate --post_type=page --count=2` + And I run `wp site empty --yes` + And I run `wp post generate --post_type=post --count=4` + And I run `wp post generate --post_type=page --count=3` When I run `wp post list --post_type=any --format=count` Then STDOUT should be: """ @@ -44,9 +45,10 @@ Feature: Import content. Given a WP install And I run `mkdir export-posts` And I run `mkdir export-pages` + And I run `wp site empty --yes` - When I run `wp post generate --count=49` - When I run `wp post generate --post_type=page --count=49` + When I run `wp post generate --count=50` + When I run `wp post generate --post_type=page --count=50` And I run `wp post list --post_type=post,page --format=count` Then STDOUT should be: """ @@ -91,6 +93,9 @@ Feature: Import content. Scenario: Export and import a directory of files with .wxr and .xml extensions. Given a WP install And I run `mkdir export` + And I run `wp site empty --yes` + When I run `wp post generate --count=1` + When I run `wp post generate --post_type=page --count=1` When I run `wp post list --post_type=post,page --format=count` Then STDOUT should be: @@ -289,5 +294,5 @@ Feature: Import content. When I run `wp import {EXPORT_FILE} --authors=skip` Then STDOUT should contain: """ - -- 1 of 2 (in file wordpress.000.xml) + (in file wordpress.000.xml) """ From 58a3ee1a713047bcd00bf6a3bdd56d0c45fdd822 Mon Sep 17 00:00:00 2001 From: Alain Schlesser Date: Thu, 19 Apr 2018 16:55:52 +0200 Subject: [PATCH 2/2] Try to fix the remaining failures --- features/import.feature | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/features/import.feature b/features/import.feature index 78907d4b1..dde41acdc 100644 --- a/features/import.feature +++ b/features/import.feature @@ -141,6 +141,9 @@ Feature: Import content. # This will not work with WP 3.7.11 or PHP 7. # PHP 7 issue: https://wordpress.org/support/topic/importer-fails-to-import-menu-items-in-php7 Given a WP install + And I run `wp site empty --yes` + And I run `wp post generate --count=1` + And I run `wp post generate --post_type=page --count=1` And I run `mkdir export` # NOTE: The Hello World page ID is 2. @@ -212,6 +215,9 @@ Feature: Import content. @less-than-php-7 @require-wp-4.0 Scenario: Export and import page and referencing menu item in separate files Given a WP install + And I run `wp site empty --yes` + And I run `wp post generate --count=1` + And I run `wp post generate --post_type=page --count=1` And I run `mkdir export` # NOTE: The Hello World page ID is 2.