From 440367c0ec86bde66ac59854daa7f6f5d17145f6 Mon Sep 17 00:00:00 2001 From: Alain Schlesser Date: Mon, 2 Nov 2026 04:03:48 +0100 Subject: [PATCH] Run setup commands in a single process in tests Co-Authored-By: Claude Opus 5.5 --- features/export.feature | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/features/export.feature b/features/export.feature index f0838036..d700dc8c 100644 --- a/features/export.feature +++ b/features/export.feature @@ -1193,8 +1193,10 @@ Feature: Export content. """ wordpress-importer """ - And I run `wp user create user user@user.com --role=editor --display_name="Test User"` - And I run `wp user create oembed_cache_user oembed_cache@user.com --role=editor --display_name="Oembed User"` + And these setup commands: + | command | + | wp user create user user@user.com --role=editor --display_name="Test User" | + | wp user create oembed_cache_user oembed_cache@user.com --role=editor --display_name="Oembed User" | And I run `wp post generate --post_type=post --count=10 --post_author=user` And I run `wp post generate --post_type=oembed_cache --count=1 --post_author=oembed_cache_user` @@ -1224,12 +1226,14 @@ Feature: Export content. @require-wp-5.2 Scenario: Allow export to proceed when orphaned terms are found Given a WP install - And I run `wp term create category orphan --parent=1` - And I run `wp term create category parent` - And I run `wp term create category child --parent=3` - And I run `wp term create post_tag atag` - And I run `wp term create post_tag btag` - And I run `wp term create post_tag ctag` + And these setup commands: + | command | + | wp term create category orphan --parent=1 | + | wp term create category parent | + | wp term create category child --parent=3 | + | wp term create post_tag atag | + | wp term create post_tag btag | + | wp term create post_tag ctag | And I run `wp db query "DELETE FROM wp_terms WHERE term_id = 1"` When I run `wp export --allow_orphan_terms`