Skip to content
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

E2E: add registered shopper checkout test #28867

Merged
merged 3 commits into from Jan 25, 2021

Conversation

lsinger
Copy link
Contributor

@lsinger lsinger commented Jan 20, 2021

All Submissions:

Changes proposed in this Pull Request:

Closes #27883.

How to test the changes in this Pull Request:

  1. check out branch locally
  2. run end-to-end tests and ensure they pass

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully run tests with your changes locally?

Changelog entry

Enter a summary of all changes on this Pull Request. This will appear in the changelog if accepted.

N/A

@lsinger lsinger added category: E2E package: @woocommerce/e2e-core-tests Issues related to @woocommerce/e2e-core-tests package. labels Jan 20, 2021
@lsinger lsinger requested a review from a team January 20, 2021 16:20
@lsinger lsinger self-assigned this Jan 20, 2021
const runCheckoutRegisteredPageTest = () => {
describe('Checkout page', () => {
beforeAll(async () => {
await merchant.login();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The existing shopper tests depend on these settings already being set. If we were to update all the shopper tests to include enabling these settings using the browser it would add a significant amount of runtime. I think we should defer making the shopper test atomic until we have a function to do it with the api package.

return orderId = orderReceivedText.split(/(\s+)/)[6].toString();
});

it('store owner can confirm the order was received', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to have the merchant check for the order in every test that creates an order? A couple alternatives for discussion:

  • If so, this would be a good opportunity to turn the merchant order check into a function.
  • The api could be used to verify that orders in additional tests were created.

@lsinger lsinger force-pushed the add/e2e-shopper-registered-checkout branch from 32d4db5 to 1bafa98 Compare January 22, 2021 10:55
@lsinger
Copy link
Contributor Author

lsinger commented Jan 22, 2021

@rrennick thanks for your thoughts -- I've adjusted the approach accordingly. Would you mind taking another look?

Copy link
Contributor

@rrennick rrennick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lsinger Nice work. This tested great locally.

@rrennick rrennick merged commit 6134d0f into master Jan 25, 2021
@rrennick rrennick deleted the add/e2e-shopper-registered-checkout branch January 25, 2021 16:52
@woocommercebot woocommercebot added release: add changelog Mark all PRs that have not had their changelog entries added. [auto] release: add testing instructions PRs that have not had testing instructions added to the wiki. [auto] labels Jan 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: @woocommerce/e2e-core-tests Issues related to @woocommerce/e2e-core-tests package. release: add changelog Mark all PRs that have not had their changelog entries added. [auto] release: add testing instructions PRs that have not had testing instructions added to the wiki. [auto]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Write new e2e test: Shopper / Checkout (existing customer can place order)
3 participants