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
21 changes: 16 additions & 5 deletions features/import.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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:
"""
Expand Down Expand Up @@ -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:
"""
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -136,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.
Expand Down Expand Up @@ -207,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.
Expand Down Expand Up @@ -289,5 +300,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)
"""