-
Notifications
You must be signed in to change notification settings - Fork 220
Add E2E to the the Order Confirmation Block #10863
Add E2E to the the Order Confirmation Block #10863
Conversation
The release ZIP for this PR is accessible via:
Script Dependencies ReportThe
This comment was automatically generated by the TypeScript Errors Report
assets/js/base/context/hooks/cart/test/use-store-cart.js
assets/js/base/context/hooks/collections/test/use-collection.js assets/js/base/context/hooks/test/use-query-state.js assets/js/base/hocs/test/with-reviews.js assets/js/base/hooks/test/use-previous.js assets/js/base/hooks/test/use-shallow-equal.js assets/js/blocks/classic-template/index.tsx assets/js/blocks/order-confirmation/additional-information/index.tsx assets/js/blocks/order-confirmation/billing-wrapper/index.tsx assets/js/blocks/order-confirmation/downloads-wrapper/index.tsx assets/js/blocks/order-confirmation/shipping-wrapper/index.tsx assets/js/blocks/order-confirmation/status/index.tsx assets/js/blocks/order-confirmation/summary/index.tsx assets/js/blocks/order-confirmation/totals-wrapper/index.tsx assets/js/blocks/order-confirmation/totals/index.tsx assets/js/blocks/price-filter/test/use-price-constraints.js assets/js/data/checkout/thunks.ts assets/js/data/payment/thunks.ts assets/js/hocs/test/with-categories.js assets/js/hocs/test/with-category.js assets/js/hocs/test/with-product-variations.js assets/js/hocs/test/with-product.js assets/js/hocs/test/with-searched-products.js assets/js/templates/revert-button/index.tsx node_modules/@wordpress/core-data/src/entities.ts |
Size Change: 0 B Total Size: 1.47 MB ℹ️ View Unchanged
|
This PR has been marked as If deemed still relevant, the pr can be kept active by ensuring it's up to date with the main branch and removing the stale label. |
941a2c7
to
4c29e8d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage looks good but there are a few fails in one of the tests 👍🏻 The page gone away error. Sometimes this is caused by accessing the wrong page object but that doesn't seem to be the case here.
'[data-block-name="woocommerce/order-confirmation-billing-address"]' | ||
); | ||
|
||
if ( toBeVisible ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this take care of the partial view for guests? If it doesn't and its not needed, just add a note to the method that it only handles the full logged in view.
await frontendUtils.addToCart( SIMPLE_PHYSICAL_PRODUCT_NAME ); | ||
await frontendUtils.addToCart( SIMPLE_VIRTUAL_PRODUCT_NAME ); | ||
await frontendUtils.goToCheckout(); | ||
await pageObject.page |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could try selectAndVerifyShippingOption
here instead. I don't know why it fails though.
Ok @tarhi-saad here is the plan. We've made some improvements to some of these tests in trunk to make the template ones more reliable. In order to apply those changes I need to rebase https://github.com/woocommerce/woocommerce-blocks/pull/10056/files, and I think some of those will affect these new tests. I am going to merge this PR into https://github.com/woocommerce/woocommerce-blocks/pull/10056/files and rebase. We can test resolve any test fails coming from flakey tests in the main feature branch. Once those fails are passing we'll be good to merge the feature branch into trunk. |
* Add editor util functions * Update editor template E2E test * Add the "exact" property for consistency * Skip test Can't get the element in the page. More investigation needed! Skipping for now. * Fix "transformIntoBlocks" logic * Add tests for logged in user * Fix "beforeAll" config * Confirm downloads section is visible when logged in * Create "verifyOrderConfirmationDetails" util function * Add logged in test case * Add Guest user test case * Fix editor e2e testing * Apply a proper teardown * Fix failing tests after logout * Ensure we are logged in before visiting the editor * Ensure to have shipping selected * Wait for changes to be saved on the editor * Ensure shipping options is selected * Remove comment * Ensure we are logged in before going to the admin page * Mark the Order Confirmation as a side effect test
* Main block types for confirmation * Initial blocks * Styling and placeholders * Make blocks experimental * Update summary icon * Add name/description for status block and missing text descriptions in the block. Closes #10057 * Order confirmation: Convert Order Details Templates to Blocks (#10095) * Move code from templates into the details block * Details -> Totals * Downloads block * Sample content for downloads block * Add block icon * Add conversion template (#10077) * Update inner block name * Add default title constant * Revert "Add default title constant" This reverts commit 1dd3bbf. * Add global styles for order confirmation status block (#10164) * Implement style controls * Prevent link color spilling over onto wrapper * Add styles and remove class names * Remove __experimentalWritingMode * Add global styles for order confirmation summary block (#10179) * Styles for summary * Remove __experimentalWritingMode * Add table styles for order details (#10185) * Add table styles for order details * __experimentalFontWeight * Add link styles * Handle preview link styles * Unauthenticated views for Order Confirmation template (#10414) * Different views by permission * check user id matches when logged out * Add order confirmation wrapper block (#10286) * Add a heading wrapper block * Register the BillingWrapper Block server side * Fix exception 'render_content' error * Add the Billing Wrapper Block to the template * Fix wrong block name error * Fix php error * Conditionally render Billing Address within the Wrapper * Fix parent rendering * Clean up code (remove billing address from the template) * Update titles, descriptions, and icons of the billing Block and inner block * Fix broken block by removing the "parent" keyword * Use a user-friendly title and description for the Billing Wrapper * Update Billing Wrapper Block's title case Co-authored-by: Mike Jolley <mike.jolley@me.com> * Fix PHP failing unit test --------- Co-authored-by: Mike Jolley <mike.jolley@me.com> * Remove "thanks" for authenticated page * Introduce shipping wrapper based on billing wrapper Closes #10053 * Order confirmation block: Verify email address for guest customers (#10567) * Add verify step for guest orders * Render content to pass through block content * Revert package changes * Customer orders cannot use email to verify * Add style controls for order shipping and billing address blocks (#10633) * Order confirmation block styling (#10780) * Add missing heading to order details * Summary block spacing * Update css variables * table styles * Inherit border styles for cells * Alignment and address styles * Add downloads wrapper * Style controls * Fix typo * Update Download Wrapper's Icon * Fix TS error * Disable Download Block's server side rendering in the editor This fixes the loading after each style change from the style controls * Clean up Downloads render functions * Fix client side Downloads Block's table border * Download + Total wrappers and tables styling * small screen * Remove server side render for previews --------- Co-authored-by: Saad Tarhi <saad.trh@gmail.com> * Shorten template description * Update test address data * Avoid leaking order key in permission form * Remove todo * Make email form required. * Remove edit page link * Remove empty columns from address wrapper * Remove IIFE * typo * Update description to mention billing * Adjust link scss * Fix wrapper markup and spacing controls * Add link preview in editor * Add initial E2E setup for the Order Confirmation Block (#10840) * Fix WC_DateTime check * Move form outside of block markup * Add additional information block (#10842) * Add block which contains hooks * Use skeleton for placeholder instead of illustration * Remove duplicate methods * Remove duplicate align tag * Update meta styles * Tests for order confirmation conditional blocks (#10972) * Add tests for conditional blocks * Move setup into test * Add E2E to the the Order Confirmation Block (#10863) * Add editor util functions * Update editor template E2E test * Add the "exact" property for consistency * Skip test Can't get the element in the page. More investigation needed! Skipping for now. * Fix "transformIntoBlocks" logic * Add tests for logged in user * Fix "beforeAll" config * Confirm downloads section is visible when logged in * Create "verifyOrderConfirmationDetails" util function * Add logged in test case * Add Guest user test case * Fix editor e2e testing * Apply a proper teardown * Fix failing tests after logout * Ensure we are logged in before visiting the editor * Ensure to have shipping selected * Wait for changes to be saved on the editor * Ensure shipping options is selected * Remove comment * Ensure we are logged in before going to the admin page * Mark the Order Confirmation as a side effect test * OrderConfirmation blocks are not experimental * resolve merge conflict * Revert package lock changes * Fix enqueue_assets * Fix CSS 404s * Make template tests more robust * Fix page URL for default confirmation page * Try afterEach to log back in * Skip guest/logout use cases Login out causes other tests to fail. We will implement these case when the multiple sign in roles are introduced in the codebase. * Remove tests requiring login out & add comments * Remove unused util functions * Hide confirmation blocks from post editor --------- Co-authored-by: Saad Tarhi <saad.trh@gmail.com> Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
What
This PR adds E2E tests to the Order Confirmation!
Fixes #10762
Why
Add E2E tests
Testing Instructions
You don't need to do any testing. Just ensure Playwright and Puppeteer E2Es pass so that we can be sure the removed tests don't impact anything.
Screenshots or screencast
N/A
WooCommerce Visibility
Required:
Checklist
Required:
[type]
label or a[skip-changelog]
label.Conditional:
[skip-changelog]
label is not present).Changelog
N/A