Skip to content
This repository has been archived by the owner on Jan 2, 2020. It is now read-only.

Add a context for editing the latest post #222

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add a context for editing the latest post #222

wants to merge 1 commit into from

Conversation

ataylorme
Copy link
Contributor

@ataylorme ataylorme commented Oct 25, 2018

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 for WP_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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

This context allows for easy verification of new content by editing the latest post of a specific type and status.

I use it 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.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant