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

Fix broken CSS classes and update JS unit snapshots #45732

Merged
merged 2 commits into from Mar 20, 2024

Conversation

nielslange
Copy link
Member

@nielslange nielslange commented Mar 20, 2024

Submission Review Guidelines:

Changes proposed in this Pull Request:

Closes #45575.

This PR fixes broken CSS styles due to wrongly fixing JS unit tests.

How to test the changes in this Pull Request:

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

  1. Install and activate the Simple Custom CSS and JS plugin.
  2. Go to /wp-admin/edit.php?post_type=custom-css-js and add the following code snippet:
const { registerCheckoutFilters } = window.wc.blocksCheckout;

const modifyTotalsPrice = ( defaultValue, extensions, args, validation ) => {
	return "Pay <price/> now";
};

registerCheckoutFilters( 'my-extension', {
	totalValue: modifyTotalsPrice,
} );

Important

Make sure to run the script in the footer as it requires other dependencies to load first.

  1. Go to the frontend and add a product to the cart.
  2. Go to the cart page and verify that Pay TOTAL_PRICE now appears as seen on the after screenshot below.
  3. Go to the checkout page and verify that Pay TOTAL_PRICE now appears as seen on the after screenshot below.
Before:

Screenshot 2024-03-20 at 12 51 46
After:

Screenshot 2024-03-20 at 13 35 48

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

Fix broken CSS styles of the totalValue filter.

Comment

@nielslange nielslange self-assigned this Mar 20, 2024
Copy link
Contributor

github-actions bot commented Mar 20, 2024

Test Results Summary

Commit SHA: 3800fba

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests25900202610m 38s
E2E Tests34900703568m 0s

To view the full API test report, click here.
To view the full E2E test report, click here.
To view all test reports, visit the WooCommerce Test Reports Dashboard.

@nielslange nielslange closed this Mar 20, 2024
@nielslange nielslange reopened this Mar 20, 2024
@nielslange nielslange marked this pull request as ready for review March 20, 2024 07:22
@nielslange nielslange added the team: Rubik Store API checkout endpoints, Mini-Cart, Cart and Checkout related issues label Mar 20, 2024
@nielslange nielslange requested review from a team and opr and removed request for a team March 20, 2024 07:29
Copy link
Contributor

Hi @opr,

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

Copy link
Contributor

@opr opr left a comment

Choose a reason for hiding this comment

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

Code looks OK and following testing instructions was OK too.

@nielslange nielslange merged commit fa49848 into trunk Mar 20, 2024
72 of 73 checks passed
@nielslange nielslange deleted the fix/45170-broken-CSS-styles branch March 20, 2024 10:42
@nielslange
Copy link
Member Author

Thank you so much for reviewing this PR on such a short notice, @opr! 🙌

@github-actions github-actions bot added this to the 8.8.0 milestone Mar 20, 2024
@github-actions github-actions bot added the needs: analysis Indicates if the PR requires a PR testing scrub session. label Mar 20, 2024
@alopezari alopezari 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 Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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 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.

[GlobalStep] "Pay ... now" text for total price fails to render properly on "Cart" and "Checkout" page.
3 participants