This repository has been archived by the owner on Jan 2, 2020. It is now read-only.
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.
Description
This context allows for easy verification of new content by editing the latest post of a specific type and status.
I am using the wp-cli driver, specifically the ability to call arbitrary wp-cli commands. In this case,
wp post list
, which allows forWP_Query
arguments. I am not sure if this can be adapted to use a different method compatible with other drivers.Related issue
Motivation and context
I use this context to check that new posts exist after specific previous steps. For example, checking that a new order has the correct information after an e-commerce purchase or checking that a donation exists after a donation form is submitted on the front-end.
How has this been tested?
I've tested on various post types and statuses.
Screenshots (if appropriate):
Types of changes
Checklist: