Opened 5 weeks ago
Last modified 5 weeks ago
#63109 new defect (bug)
test_get_block_editor_settings_theme_json_settings failing
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | trunk |
Component: | Editor | Keywords: | has-testing-info has-patch needs-testing dev-feedback |
Focuses: | tests | Cc: |
Description
In 6.4.5 it passed this test
test_get_block_editor_settings_theme_json_settings
Thereafter, it has been failing until now.
If I comment line 317 in src/wp-includes/block-editor.php
$wp_scripts->registered = $current_wp_scripts->registered;
Tests go through.
This issue came to me because this test was failing in this PR:
https://github.com/WordPress/wordpress-develop/pull/8509
But I can't see correlation
Then I went into trunk in my dev environment, and I still failing.
But I see other PRs and they are not failing on this specific test.
I need someone else to test this and report back.
Change History (3)
This ticket was mentioned in PR #8516 on WordPress/wordpress-develop by @SirLouen.
5 weeks ago
#2
- Keywords has-patch added; needs-patch removed
The issue comes from a not registered script for this specific unit test test_get_block_editor_settings_theme_json_settings
making to fail because of an early error. With this patch, the test is passing.
Trac ticket: https://core.trac.wordpress.org/ticket/63109
Doing some extra tests:
Checking this PR:
https://github.com/WordPress/wordpress-develop/pull/8514
Its passing ALL the unit tests
Environment
Steps to Reproduce
Setup using the same premises as the ones used in the PR:
Result:
Additional data
I've tried doing a regular
npm run test:php
with same results to this test in my environmentThe equivalent environment in Github is this, for the PR I'm using for the example
https://github.com/WordPress/wordpress-develop/actions/runs/13882352022/job/38842584755?pr=8514
And this are the results in my computer:
Which happen to be the same results as the PR test
For some reason, I can't understand, my PR is doing different tests:
In the OP branch (patch/63086)
In OP trunk: Same errors (less tests, beacuse in
patch/63086
there are some extra tests)But now dropping the
patch/63086
in thehttps://github.com/SainathPoojary/wordpress-develop.git
cloned repo the results are SIGNIFICANTLY different in terms of errors:> gh pr checkout 8509
I also dropped the same tests downloading clean repos from WordPress and even from my own repo and results were identical.
Not even after doing
npm run env:reset
I could drop the Errors: 44. The only way I found to "reestablish" the thing was downloading the repo and setting it again from scratch.I'm not sure if all these tests are correlated somehow. I don't feel confident at this point because I can't find a reliable way to "restore" my environment without having to destroy it completely and restore it from a new clone.
Update 1
Got the difference between the
Errors: 44
and theErrors: 1
part, and its completely unrelated with the original report.Someone suggested me some long time ago to add this to the file
tools/local-env/php-config.ini
because otherwise xdebug did not work withnpm run env:start --debug
It seems it was covered back in the day with a different perspective 49953 but never progressed. Now its obsolete after the upgrade to XDebug 3
The reality is that the file is being tracked in git, so it was kind of weird, but since it worked, I never changed this. After some research according to the latest XDebug 3 docs, it seems that
start_with_request
is fine but thediscover_client_host
could be the culprit in all this story. I'm going to do a follow up on this report 49953 and leave this topic closed here.So now that one of the two mysteries have been solved I can focus on why the
test_get_block_editor_settings_theme_json_settings
is failing on its own.