Skip to content
Draft
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"wp-cli/extension-command": "^1.2 || ^2 || ^3",
"wp-cli/import-command": "^1 || ^2 || ^3",
"wp-cli/media-command": "^1 || ^2 || ^3",
"wp-cli/wp-cli-tests": "^5"
"wp-cli/wp-cli-tests": "dev-cached-extension-installs as 5.3.99"
},
"config": {
"process-timeout": 7200,
Expand Down
55 changes: 44 additions & 11 deletions features/export.feature
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,10 @@ Feature: Export content.
Scenario: Export posts from a given category
Given a WP install
And I run `wp site empty --yes`
And I run `wp plugin install wordpress-importer --activate`
And these installed and active plugins:
"""
wordpress-importer
"""

When I run `wp term create category Apple --porcelain`
Then STDOUT should be a number
Expand Down Expand Up @@ -396,7 +399,10 @@ Feature: Export content.
Scenario: Export posts from a given author
Given a WP install
And I run `wp site empty --yes`
And I run `wp plugin install wordpress-importer --activate`
And these installed and active plugins:
"""
wordpress-importer
"""

When I run `wp user create john john.doe@example.com --porcelain`
Then STDOUT should be a number
Expand Down Expand Up @@ -478,7 +484,10 @@ Feature: Export content.
@require-wp-5.2
Scenario: Export posts should include user information
Given a WP install
And I run `wp plugin install wordpress-importer --activate`
And these installed and active plugins:
"""
wordpress-importer
"""
And I run `wp user create user user@user.com --role=editor --display_name="Test User"`
And I run `wp post generate --post_type=post --count=10 --post_author=user`

Expand Down Expand Up @@ -551,7 +560,10 @@ Feature: Export content.
And I run `wp site empty --yes`
And I run `wp post create --post_title="Some page" --post_type=page`
And I run `wp post generate --post_type=post --count=10`
And I run `wp plugin install wordpress-importer --activate`
And these installed and active plugins:
"""
wordpress-importer
"""

When I run `wp post list --post_type=any --format=count`
Then STDOUT should be:
Expand Down Expand Up @@ -670,7 +682,10 @@ Feature: Export content.
Scenario: Export a site and skip the comments
Given a WP install
And I run `wp comment generate --post_id=1 --count=2`
And I run `wp plugin install wordpress-importer --activate`
And these installed and active plugins:
"""
wordpress-importer
"""

When I run `wp comment list --format=count`
Then STDOUT should contain:
Expand Down Expand Up @@ -851,7 +866,10 @@ Feature: Export content.
Scenario: Export a site to stdout
Given a WP install
And I run `wp comment generate --post_id=1 --count=1`
And I run `wp plugin install wordpress-importer --activate`
And these installed and active plugins:
"""
wordpress-importer
"""

When I run `wp export --stdout > export.xml`
Then STDOUT should be empty
Expand Down Expand Up @@ -904,7 +922,10 @@ Feature: Export content.
@require-wp-5.2
Scenario: Export individual post with attachments
Given a WP install
And I run `wp plugin install wordpress-importer --activate`
And these installed and active plugins:
"""
wordpress-importer
"""
And I run `wp site empty --yes`

When I run `wp post generate --count=10`
Expand Down Expand Up @@ -1012,7 +1033,10 @@ Feature: Export content.
}
add_action( 'init', 'wp_cli_region_taxonomy' );
"""
And I run `wp plugin install wordpress-importer --activate`
And these installed and active plugins:
"""
wordpress-importer
"""
And I run `wp site empty --yes`

When I run `wp term create category News --description="A news article" --porcelain`
Expand Down Expand Up @@ -1165,7 +1189,10 @@ Feature: Export content.
@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`
And these installed and active plugins:
"""
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 I run `wp post generate --post_type=post --count=10 --post_author=user`
Expand Down Expand Up @@ -1217,7 +1244,10 @@ Feature: Export content.
"""

When I run `wp site empty --yes`
And I run `wp plugin install wordpress-importer --activate`
And these installed and active plugins:
"""
wordpress-importer
"""
And I run `wp import {EXPORT_FILE} --authors=skip`
Then STDOUT should contain:
"""
Expand Down Expand Up @@ -1292,7 +1322,10 @@ Feature: Export content.
@require-wp-5.2
Scenario: Export posts with future status
Given a WP install
And I run `wp plugin install wordpress-importer --activate`
And these installed and active plugins:
"""
wordpress-importer
"""
And I run `wp site empty --yes`

When I run `wp post create --post_title='Future Post 1' --post_status=future --post_date='2050-01-01 12:00:00' --porcelain`
Expand Down
Loading