Skip to content

Conversation

@jasonbahl
Copy link
Collaborator

This PR aims to get the automated test suites working again after they began failing with the WPGraphQL v1.14.5 release where nested list:$type

related: wp-graphql/wp-graphql#2861

Notes:

  • phpcs.xml.dist: I added a rule here as I wasn't able to succesfully run composer run phpcs without it, see referenced Github links

  • WPGraphQLSmartCacheTestCaseWithSeedDataAndPopulatedCaches.php:

    • we were creating a lot of seed data without referencing the admin->ID properly
    • I added a getQuery() function and got rid of a lot of functions such as getSinglePostByDatabaseIdQuery(), as the ergonomics were not ideal. The getQueries() has the queries and the assertions, and the readability of having them together vs abstracted into get***Query() functions is much better now than before.
  • wpunit/CacheInvalidationTest.php: I moved these tests into core WPGraphQL

  • PostCacheInvalidationTest.php: I modified some assertions to work against how the code is written today. Some assertions are still not in an "ideal" state, but I wrote Track and Purge Connections #233 to follow up and hopefully get to a middle ground on some of the cache tracking/purging

…events

- update setUp to use $this->author->ID instead of $this->author
- adjust test assertions
…tion" in the test suite

- remove CacheInvalidationTest.php (tests moved to core WPGraphQL)
- fix missing query in TermCacheInvalidationTest.php
@markkelnar markkelnar self-requested a review July 24, 2023 19:03
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