wp-graphql-content-blocks icon indicating copy to clipboard operation
wp-graphql-content-blocks copied to clipboard

Add blocks unit tests

Open theodesp opened this issue 10 months ago • 4 comments

Description

Adds Smoke Unit tests for the following blocks:

  • CoreCode
  • CoreHeading
  • CoreList
  • CoreButton
  • CoreQuote

theodesp avatar Apr 08 '24 13:04 theodesp

🦋 Changeset detected

Latest commit: fd4c015703e0707716b358e4e5432e49b645b2cd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@wpengine/wp-graphql-content-blocks Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Apr 08 '24 13:04 changeset-bot[bot]

Not sure where to share this, and it's probably beyond the scope of this particular, but I recommend using the official block theme test data as a reference.

justlevine avatar Apr 08 '24 13:04 justlevine

Not sure where to share this, and it's probably beyond the scope of this particular, but I recommend using the official block theme test data as a reference.

Interesting. Wouldn't that require parsing the xml data and inserting certain author and post ids though? I think we could add an improvement ticket by adding a unit test step to load the block theme test data in the database once and then run queries based on those.

theodesp avatar Apr 09 '24 09:04 theodesp

Not sure where to share this, and it's probably beyond the scope of this particular, but I recommend using the official block theme test data as a reference.

Interesting. Wouldn't that require parsing the xml data and inserting certain author and post ids though? I think we could add an improvement ticket by adding a unit test step to load the block theme test data in the database once and then run queries based on those.

That would be a fun goal 🚀 (wpcli can import xml, so the import step is just a couple lines)

In the short term, the block html in that file is a good reference point of the different common markup combinations per block type, versus manually coming up with our own.

justlevine avatar Apr 09 '24 10:04 justlevine