From 0adb7804d76816de018854fa69d5bf1db5d4fe35 Mon Sep 17 00:00:00 2001 From: Daniel Bachhuber Date: Fri, 17 Feb 2023 09:07:34 -0800 Subject: [PATCH 1/2] Fix failing tests with `@require-wp-5.2` The WordPress importer now requires a minimum of WP 5.2 --- features/import.feature | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/features/import.feature b/features/import.feature index a7039cb0..4db7ff04 100644 --- a/features/import.feature +++ b/features/import.feature @@ -1,5 +1,6 @@ Feature: Import content. + @require-wp-5.2 Scenario: Basic export then import Given a WP install And I run `wp site empty --yes` @@ -41,6 +42,7 @@ Feature: Import content. When I run `wp import {EXPORT_FILE} --authors=skip --skip=image_resize` Then STDOUT should not be empty + @require-wp-5.2 Scenario: Export and import a directory of files Given a WP install And I run `mkdir export-posts` @@ -90,6 +92,7 @@ Feature: Import content. 100 """ + @require-wp-5.2 Scenario: Export and import a directory of files with .wxr and .xml extensions. Given a WP install And I run `mkdir export` @@ -136,7 +139,7 @@ Feature: Import content. 2 """ - @require-wp-4.0 + @require-wp-5.2 Scenario: Export and import page and referencing menu item Given a WP install And I run `wp site empty --yes` @@ -213,7 +216,7 @@ Feature: Import content. 2 """ - @require-wp-4.0 + @require-wp-5.2 Scenario: Export and import page and referencing menu item in separate files Given a WP install And I run `wp site empty --yes` @@ -291,6 +294,7 @@ Feature: Import content. 2 """ + @require-wp-5.2 Scenario: Indicate current file when importing Given a WP install And I run `wp plugin install --activate wordpress-importer` @@ -307,6 +311,7 @@ Feature: Import content. (in file wordpress.000.xml) """ + @require-wp-5.2 Scenario: Handling of non-existing files and directories Given a WP install And I run `wp plugin install --activate wordpress-importer` From 198a9b08e73e1b98809a070322e83d826e10dc89 Mon Sep 17 00:00:00 2001 From: Daniel Bachhuber Date: Fri, 17 Feb 2023 09:22:43 -0800 Subject: [PATCH 2/2] Add a test that can always run --- features/import.feature | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/features/import.feature b/features/import.feature index 4db7ff04..ed180633 100644 --- a/features/import.feature +++ b/features/import.feature @@ -1,5 +1,14 @@ Feature: Import content. + Scenario: Importing requires plugin installation + Given a WP install + + When I try `wp import file.xml --authors=create` + Then STDERR should contain: + """ + Error: WordPress Importer needs to be installed. Try 'wp plugin install wordpress-importer --activate'. + """ + @require-wp-5.2 Scenario: Basic export then import Given a WP install