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

Remove title from checkout page #47529

Merged
merged 12 commits into from
May 20, 2024
Merged

Conversation

nielslange
Copy link
Member

@nielslange nielslange commented May 16, 2024

Changes proposed in this Pull Request:

Remove the title from the Checkout template so that it does no longer appear on the checkout page in the frontend.

Closes #47509.

How to test the changes in this Pull Request:

Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:

  1. Go to WP Admin » Apperances » Editor » Pages » Checkout.
  2. Verify that the checkout page does not display the Checkout title.
  3. Go to WP Admin » Apperances » Editor » Templates » WooCommerce » Page: Checkout.
  4. Reset customisations, if there are any.
  5. Verify that the checkout template does not display the Checkout title.
  6. Go to the frontend.
  7. Add a product to the cart.
  8. Go to the checkout page.
  9. Verify that the checkout page does not display the Checkout title.
  10. Verify that the site title on the checkout page has the same bottom and top padding as the site title on the cart page.
Before:

Screenshot 2024-05-16 at 13 56 50
After:

Screenshot 2024-05-16 at 13 57 18
  1. Go to /wp-admin/edit.php?post_type=page.
  2. Create a test page and add the checkout shortcode to it:
[woocommerce_checkout]
  1. Go to /wp-admin/admin.php?page=wc-settings&tab=advanced.
  2. Define the test page with the checkout shortcode as the default checkout page.
  3. Go back to the frontend.
  4. Go to the checkout page with the checkout shortcode.
  5. Verify that the checkout page does not display the Checkout title.
Before:

Screenshot 2024-05-17 at 15 22 43
After:

Screenshot 2024-05-17 at 15 23 11

Changelog entry

  • Automatically create a changelog entry from the details below.

Significance

  • Patch
  • Minor
  • Major

Type

  • Fix - Fixes an existing bug
  • Add - Adds functionality
  • Update - Update existing functionality
  • Dev - Development related task
  • Tweak - A minor adjustment to the codebase
  • Performance - Address performance issues
  • Enhancement - Improvement to existing functionality

Message

Remove title from checkout page

Comment

@nielslange nielslange added the team: Rubik Store API checkout endpoints, Mini-Cart, Cart and Checkout related issues label May 16, 2024
@nielslange nielslange self-assigned this May 16, 2024
@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label May 16, 2024
@nielslange nielslange closed this May 16, 2024
@nielslange nielslange reopened this May 16, 2024
Copy link
Contributor

github-actions bot commented May 16, 2024

Test using WordPress Playground

The changes in this pull request can be previewed and tested using a WordPress Playground instance.
WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Test this pull request with WordPress Playground.

Note that this URL is valid for 30 days from when this comment was last updated. You can update it by closing/reopening the PR or pushing a new commit.

@github-actions github-actions bot added the focus: e2e tests Issues related to e2e tests label May 16, 2024
@@ -21,7 +21,7 @@ test.describe( 'Test the checkout template', () => {
await expect(
page
.frameLocator( 'iframe[title="Editor canvas"i]' )
.locator( 'h1:has-text("Checkout")' )
.locator( 'div:has-text("Place Order · <price/>")' )
Copy link
Contributor

Choose a reason for hiding this comment

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

I've found it a good practice to let Playwright determine the selectors for me as it takes care of the recommended practices and the selector uniqueness on the page. It sometimes needs to be tweaked a little bit (e.g., we use editor.canvas.* instead of explicit page.frameLocator( 'iframe[title="Editor canvas"i]' ).*), but it does the job right most of the time.

I've recorded a little vid to demo how I use the Plawright codegen for that in the WC context, as it's easier than writing the steps! :D

Screen.Recording.2024-05-16.at.16.53.09.mov

To run the npx playwright open localhost:8889 command, you must be in the /woocommerce/plugins/woocommerce-blocks/ folder. Also, the local e2e test env must be running (pnpm env:start).

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks a lot for pointing this out, @WunderBart. I went ahead and replaced all page.frameLocator( 'iframe[title="Editor canvas"i]' ).*) sections.

@nielslange nielslange marked this pull request as ready for review May 17, 2024 08:34
@woocommercebot woocommercebot requested review from a team and wavvves and removed request for a team May 17, 2024 08:34
Copy link
Contributor

github-actions bot commented May 17, 2024

Hi @WunderBart, @wavvves,

Apart from reviewing the code changes, please make sure to review the testing instructions as well.

You can follow this guide to find out what good testing instructions should look like:
https://github.com/woocommerce/woocommerce/wiki/Writing-high-quality-testing-instructions

@nielslange
Copy link
Member Author

@WunderBart As I've improved a few e2e tests, based on your feedback, I would appreciate it if you could review the test-related changes. As the tests are passing, they should be fine. It's just to be on the save side. 😀

Copy link
Contributor

@WunderBart WunderBart left a comment

Choose a reason for hiding this comment

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

It looks great from the test perspective! 🎉 Thank you for applying the editor.canvas.* convention everywhere! 🙇

@nielslange
Copy link
Member Author

It looks great from the test perspective! 🎉 Thank you for applying the editor.canvas.* convention everywhere! 🙇

Thank you for reviewing the test-related changed, @WunderBart.

@nielslange
Copy link
Member Author

@wavvves As Bart reviewed the test-related changes, you can focus on the functional changes.

Copy link
Member

@senadir senadir left a comment

Choose a reason for hiding this comment

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

Thank you for working on this Niels, it's testing fine for me, just note that you need to reset customization for this to work.

@nielslange
Copy link
Member Author

Thank you for working on this Niels, it's testing fine for me, just note that you need to reset customization for this to work.

Thanks for reviewing and approving this PR, @senadir. I'll merge it for now, to get it in before the code freeze, and will update the testing instructions the next days.

@nielslange nielslange merged commit 622f2d3 into trunk May 20, 2024
42 of 43 checks passed
@nielslange nielslange deleted the update/47509-remove-checkout-page-title branch May 20, 2024 18:56
@github-actions github-actions bot added this to the 9.0.0 milestone May 20, 2024
@github-actions github-actions bot added the needs: analysis Indicates if the PR requires a PR testing scrub session. label May 20, 2024
@rodelgc rodelgc added needs: external testing Indicates if the PR requires further testing conducted by testers external to the development team. status: analysis complete Indicates if a PR has been analysed by Solaris and removed needs: analysis Indicates if the PR requires a PR testing scrub session. labels May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus: e2e tests Issues related to e2e tests needs: external testing Indicates if the PR requires further testing conducted by testers external to the development team. plugin: woocommerce Issues related to the WooCommerce Core plugin. status: analysis complete Indicates if a PR has been analysed by Solaris team: Rubik Store API checkout endpoints, Mini-Cart, Cart and Checkout related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement] Remove Checkout heading in default Checkout template
4 participants