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

attempt to fix php unit tests (variations api change) #58090

Merged
merged 3 commits into from
Jan 22, 2024

Conversation

ellatrix
Copy link
Member

@ellatrix ellatrix commented Jan 22, 2024

What?

I don't know anything about this, maybe it works, maybe more adjustments are needed.

It works, PHP unit tests are passing.

Why?

How?

Testing Instructions

Testing Instructions for Keyboard

Screenshots or screencast

@ellatrix ellatrix added the [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. label Jan 22, 2024
Copy link

github-actions bot commented Jan 22, 2024

Flaky tests detected in 2c99c0d.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7616204409
📝 Reported issues:

Copy link
Member

@joemcgill joemcgill left a comment

Choose a reason for hiding this comment

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

This looks like the same approach @kt-12 was suggesting in #58072. If it unblocks tests, I think this approach is fine for now.

Long term, I think we should rethink the way this block is handling modifying variations when post or taxonomy types are modified, since it doesn't really make sense for variations on the server to be modified after the property is accessed, which really only happens once per request in order to provide data to the editor.

@ellatrix
Copy link
Member Author

Oh, somehow I missed that PR

@ellatrix ellatrix enabled auto-merge (squash) January 22, 2024 19:48
@ellatrix ellatrix enabled auto-merge (squash) January 22, 2024 19:48
@ellatrix ellatrix changed the title attempt to fix php unit tests (variatons api change) attempt to fix php unit tests (variations api change) Jan 22, 2024
@kt-12
Copy link
Member

kt-12 commented Jan 22, 2024

@joemcgill @ellatrix I have cross-checked. This does fix the issue, we can merge anyone of the PRs as both are the same.

On a side note - https://github.com/WordPress/gutenberg/pull/56100/files has changed the names of a couple of public functions. Doesn't Gutenberg depreciate the old function while adding a new one?

@joemcgill
Copy link
Member

@kt-12 let's keep the discussion in this PR focused on fixing the unit tests for now. FWIW, I don't see any changed names in the PR you referenced but if there are concerns, we should discuss them in a separate issue, or in the original PR instead.

@ellatrix ellatrix merged commit b2c2a08 into trunk Jan 22, 2024
55 checks passed
@ellatrix ellatrix deleted the try/fixing-php-unit-variations branch January 22, 2024 20:02
@github-actions github-actions bot added this to the Gutenberg 17.6 milestone Jan 22, 2024
@kt-12
Copy link
Member

kt-12 commented Jan 22, 2024

@kt-12 let's keep the discussion in this PR focused on fixing the unit tests for now. FWIW, I don't see any changed names in the PR you referenced but if there are concerns, we should discuss them in a separate issue, or in the original PR instead.

My bad - wanted to reference https://github.com/WordPress/gutenberg/pull/56100/files. Yes, let's discuss this separately.

@ellatrix
Copy link
Member Author

@kt-12 Sorry, I enabled merge for this PR because the other had test failures at the time

@kt-12
Copy link
Member

kt-12 commented Jan 22, 2024

@ellatrix That's fine, in fact, you saved my time. I thought there was still some reference problem with the variable and was behind it.
The real issue was not converting $variations to a single array before merging which you did.

scruffian added a commit that referenced this pull request Jan 30, 2024
…n't clash with the one backported to core (#58429)

* Navigation: Move the renderer class to the main navigation file (#57979)

* Navigation: Move the renderer class to the main navigation file to take advantage of the automatic backporting

* Update the build script to also copy over class files

* prefix with gutenberg

* Add a Gutenberg suffix to class files when they are built

* add gutenberg prefix to functions

* move the built block files to their own dir

* Putting back the render class into the same file as the navigation block

* Update the rendered post rebase

* Fix php unit tests

---------

Co-authored-by: Riad Benguella <benguella@gmail.com>

* Use the right renderer class

* Fix php unit tests (after variations api change) (#58090)

---------

Co-authored-by: Riad Benguella <benguella@gmail.com>
Co-authored-by: Ella <4710635+ellatrix@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants