Skip to content

Conversation

@dinhtungdu
Copy link
Member

@dinhtungdu dinhtungdu commented Dec 11, 2025

Screenshots

n/a

How to test the changes in this Pull Request:

Check GH Actions or run the test locally.

  1. npm install
  2. composer install
  3. npm run wp-env start
  4. npm run test:php

@dinhtungdu dinhtungdu force-pushed the test/verify-infinite-adjacent-loop-fix branch 2 times, most recently from 2fdeb3c to 6aa5cf1 Compare December 11, 2025 09:14
@dinhtungdu dinhtungdu force-pushed the test/verify-infinite-adjacent-loop-fix branch from 6aa5cf1 to 077c597 Compare December 11, 2025 09:19
@dinhtungdu dinhtungdu marked this pull request as ready for review December 11, 2025 09:19
@kmanijak kmanijak self-requested a review December 11, 2025 09:30
Copy link
Contributor

@kmanijak kmanijak left a comment

Choose a reason for hiding this comment

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

Super cool to see this test setup added and actual tests for the Storefront_WooCommerce_Adjacent_Products class!

I was able to run tests locally (and they pass!). I only left some nitpick comment and updated the testing steps with composer install (it wasn't there and couldn't run tests at first). But pre-approving.

Great job Tung! 🚀

"": {
"name": "storefront",
"version": "4.6.0",
"version": "4.6.2",
Copy link
Contributor

Choose a reason for hiding this comment

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

Huh, that's weird, it's 4.6.2 on trunk and this branch seems up to date with trunk... 😅 not sure why GitHub shows it as diff.

public function test_next_product_skips_hidden_with_same_date() {
$date = '2024-01-01 10:00:00';
$current_post = $this->create_product( $date );
$hidden_post = $this->create_product( $date, true );
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: let's call it hidden_next similar to the next test where it's called hidden_prev

Suggested change
$hidden_post = $this->create_product( $date, true );
$hidden_next = $this->create_product( $date, true );

@dinhtungdu dinhtungdu merged commit f0cfe83 into trunk Dec 12, 2025
8 checks passed
@dinhtungdu dinhtungdu deleted the test/verify-infinite-adjacent-loop-fix branch December 12, 2025 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants