Then the email with the subject "order has been received" to "guest@example.com" should be about the last placed order

Assert an e-mail whose subject holds a text, to an address, is about the order the scenario placed last: its subject or its body names the order's number ("Order #59", "[Order #59]", "New order #59").

Examples

Then the email with the subject "order has been received" to "guest@example.com" should be about the last placed order
And the email with the subject "New order" to "shop_manager" should be about the last placed order
Then the email with the subject "is on its way" to "customer" should be about the last placed order
And the email with the subject "has been received" to "customer" should be about the last placed order
Then the email with the subject "New order" to "shop_manager@example.com" should be about the last placed order

Pattern

Then(/^the email with the subject "([^"]*)" to "([^"]*)" should be about the last placed order$/, …)

Part of @webship-js/woocommerce-steps (github.com/webship/woocommerce-steps), a step pack for Webship-js 2.0.x.