-
Notifications
You must be signed in to change notification settings - Fork 275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restore the importFile step that was accidentally removed in #780 #835
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
adamziel
added
[Type] Bug
An existing feature does not function as intended
[Package][@wp-playground] Blueprints
labels
Dec 2, 2023
Using the suggested URL the menu looks as desired. Many thanks @adamziel! |
The importFile step, which allows developers to import WordPress content bia WXR and WXZ files, got accidentally removed in Pull Request #780. This commit restores that step. Testing instructions Go to the following localhost URL and confirm the WordPress reflects the non-standard content it imported from WordPress theme unit tests data: http://localhost:5400/website-server/#{%22steps%22:[{%22step%22:%22login%22},{%22step%22:%22importFile%22,%22file%22:{%22resource%22:%22url%22,%22url%22:%22https://raw.githubusercontent.com/WordPress/theme-test-data/master/themeunittestdata.wordpress.xml%22}}]} In particular, the menu should say twitter.com, facebook.com etc As the Playground codebase starts supporting using WordPress in unit tests, let's add a test case for this step. Closes #833
To use real WordPress in unit tests, we need to import it from somewhere. At the moment, there is no easy way to do it without running into a circular dependency problem. This PR adds a new module that has no explicit import dependencies to solve that problem. It still does have an implicit path-based dependency on the remote package, which isn't ideal. Perhaps the build WordPress files could be moved to yet another dependency-free module such as wp-playground/wordpress and the remote package would use those files in its build process.
adamziel
force-pushed
the
restore-import-file-step
branch
from
December 6, 2023 12:00
55a4fed
to
dbd1646
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The importFile step, which allows developers to import WordPress content bia WXR and WXZ files, got accidentally removed in Pull Request #780. This commit restores that step.
Open questions
importFile
sounds ambiguous. What if it was split into two distinct steps calledimportWxr
andimportWxz
? Then, the newimportWpFiles
step could be calledimportWpContentDirectory
instead.Follow-up work
The importFile step uses
DOMParser
which isn't available in Node.js. It could, instead:Testing Instructions
Go to the following localhost URL and confirm the WordPress reflects the non-standard content it imported from WordPress theme unit tests data:
http://localhost:5400/website-server/#{%22steps%22:[{%22step%22:%22login%22},{%22step%22:%22importFile%22,%22file%22:{%22resource%22:%22url%22,%22url%22:%22https://raw.githubusercontent.com/WordPress/theme-test-data/master/themeunittestdata.wordpress.xml%22}}]}
In particular, the menu should say twitter.com, facebook.com etc
As the Playground codebase starts supporting using WordPress in unit tests, let's add a test case for this step.
Closes #833
CC @eliot-akira @aplamada