Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 25 additions & 21 deletions features/export.feature
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Feature: Export content.
"""
And the return code should be 1

@require-wp-5.2 @require-mysql
@require-wp-5.2
Scenario: Export with post_type and post_status argument
Given a WP install

Expand Down Expand Up @@ -79,7 +79,7 @@ Feature: Export content.
10
"""

@require-wp-5.2 @require-mysql
@require-wp-5.2
Scenario: Export a comma-separated list of post types
Given a WP install

Expand Down Expand Up @@ -132,7 +132,7 @@ Feature: Export content.
10
"""

@require-wp-5.2 @require-mysql
@require-wp-5.2
Scenario: Export only one post
Given a WP install

Expand Down Expand Up @@ -203,7 +203,7 @@ Feature: Export content.
2
"""

@require-wp-5.2 @require-mysql
@require-wp-5.2
Scenario: Export multiple posts, separated by spaces
Given a WP install

Expand Down Expand Up @@ -236,7 +236,7 @@ Feature: Export content.
2
"""

@require-wp-5.2 @require-mysql
@require-wp-5.2
Scenario: Export multiple posts, separated by comma
Given a WP install

Expand Down Expand Up @@ -269,7 +269,7 @@ Feature: Export content.
2
"""

@require-wp-5.2 @require-mysql
@require-wp-5.2
Scenario: Export posts within a given date range
Given a WP install

Expand Down Expand Up @@ -310,7 +310,7 @@ Feature: Export content.
10
"""

@require-wp-5.2 @require-mysql
@require-wp-5.2
Scenario: Export posts from a given category
Given a WP install
And I run `wp site empty --yes`
Expand Down Expand Up @@ -392,7 +392,7 @@ Feature: Export content.
Apple Post
"""

@require-wp-5.2 @require-mysql
@require-wp-5.2
Scenario: Export posts from a given author
Given a WP install
And I run `wp site empty --yes`
Expand Down Expand Up @@ -475,7 +475,7 @@ Feature: Export content.
john.doe@example.com
"""

@require-wp-5.2 @require-mysql
@require-wp-5.2
Scenario: Export posts should include user information
Given a WP install
And I run `wp plugin install wordpress-importer --activate`
Expand All @@ -502,7 +502,7 @@ Feature: Export content.
Test User
"""

@require-wp-5.2 @require-mysql
@require-wp-5.2
Scenario: Export posts from a given starting post ID
Given a WP install

Expand All @@ -520,7 +520,11 @@ Feature: Export content.
10
"""

When I run `wp export --start_id=6`
# Read the 6th post's ID instead of hardcoding --start_id=6. SQLite does not reset auto-increment on `wp site empty`, so generated IDs aren't always 1..10.
When I run `wp post list --post_type=post --orderby=ID --order=ASC --posts_per_page=1 --offset=5 --format=ids`
Then save STDOUT as {START_ID}

When I run `wp export --start_id={START_ID}`
Then save STDOUT 'Writing to file %s' as {EXPORT_FILE}

When I run `wp site empty --yes`
Expand All @@ -541,7 +545,7 @@ Feature: Export content.
5
"""

@require-wp-5.2 @require-mysql
@require-wp-5.2
Scenario: Exclude a specific post type from export
Given a WP install
And I run `wp site empty --yes`
Expand Down Expand Up @@ -604,7 +608,7 @@ Feature: Export content.
0
"""

@require-mysql

Scenario: Export posts using --max_num_posts
Given a WP install
And I run `wp site empty --yes`
Expand Down Expand Up @@ -662,7 +666,7 @@ Feature: Export content.
thisisaverylongsitenamethatexceedsfiftycharactersandshouldbetruncated
"""

@require-wp-5.2 @require-mysql
@require-wp-5.2
Scenario: Export a site and skip the comments
Given a WP install
And I run `wp comment generate --post_id=1 --count=2`
Expand Down Expand Up @@ -843,7 +847,7 @@ Feature: Export content.
"""
And STDERR should be empty

@require-wp-5.2 @require-mysql
@require-wp-5.2
Scenario: Export a site to stdout
Given a WP install
And I run `wp comment generate --post_id=1 --count=1`
Expand Down Expand Up @@ -897,7 +901,7 @@ Feature: Export content.
"""
And the return code should be 1

@require-wp-5.2 @require-mysql
@require-wp-5.2
Scenario: Export individual post with attachments
Given a WP install
And I run `wp plugin install wordpress-importer --activate`
Expand Down Expand Up @@ -989,7 +993,7 @@ Feature: Export content.
white-150-square.jpg";s:
"""

@require-wp-5.2 @require-mysql
@require-wp-5.2
Scenario: Export categories, tags and terms
Given a WP install
And a wp-content/mu-plugins/register-region-taxonomy.php file:
Expand Down Expand Up @@ -1154,7 +1158,7 @@ Feature: Export content.
Europe
"""

@require-wp-5.2 @require-mysql
@require-wp-5.2
Scenario: Export posts should not include oembed_cache posts user information
Given a WP install
And I run `wp plugin install wordpress-importer --activate`
Expand Down Expand Up @@ -1186,7 +1190,7 @@ Feature: Export content.
Test User
"""

@require-wp-5.2 @require-mysql
@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`
Expand Down Expand Up @@ -1241,7 +1245,7 @@ Feature: Export content.
0
"""

@require-mysql

Scenario: Throw exception when orphaned terms are found
Given a WP install
And I run `wp term create category orphan --parent=1`
Expand Down Expand Up @@ -1281,7 +1285,7 @@ Feature: Export content.
<wp:tag>
"""

@require-wp-5.2 @require-mysql
@require-wp-5.2
Scenario: Export posts with future status
Given a WP install
And I run `wp plugin install wordpress-importer --activate`
Expand Down