RepeaterFieldTest::testFieldOnAcfBlock test fails when run with other test suites #101
Open
2 of 3 tasks
Labels
help wanted
Issue with a clear description that the community can help with
scope: tests
Developing unit tests, integration tests, and ensuring coverage
type: bug
Issue that causes incorrect or unexpected behavior
Description
The
RepeaterFieldTest::testFieldOnAcfBlock
test passes when theRepeaterFieldTest
suite is run alone, but fails when it is ran as part of all suites.Because of this, the test has been marked incomplete until more time can be put into diagnosing the issue.
Steps to reproduce
testFieldOnAcfBlock
in RepeaterFieldTest.phpcomposer run-test
withSUITES="wpunit:RepeaterFieldTest"
definedcomposer run-test
withSUITES="wpunit"
definedRepeaterFieldTest::testFieldOnAcfBlock
failPHP or JSON export of the ACF Field Group(s)
No response
Additional context
Because this is passing alone but failing when other tests are run, it leads me to believe there's a setup or teardown issue, but so far I've not detected anything weird with the setup or tear down.
My hunch is that some global state isn't being reset or something to that tune.
ACF Tests have a
reset_acf_stores
(see: https://github.com/deliciousbrains/acf/blob/develop/tests/class-test-case.php#L217-L237) so we might want to try something similar.There is no proper
unregister_acf_field
/unregister_acf_field_group
so our current tests register new fields/field groups with unique IDs and that could possibly be an issue somehow 🤷🏻♂️WPGraphQL Version
1.17.0
WPGraphQL For ACF Version
2.0.0-beta.5.0.0
ACF (Advanced Custom Fields) Version. Free or Pro?
PRO
WordPress Version
6.2
PHP Version
8.*
Additional enviornment details
No response
Please confirm that you have searched existing issues in the repo.
Please confirm that you have disabled ALL plugins except for WPGraphQL, WPGraphQL For ACF, ACF, etc.
The text was updated successfully, but these errors were encountered: