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

Add blocks unit tests #232

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Add blocks unit tests #232

wants to merge 5 commits into from

Conversation

theodesp
Copy link
Member

@theodesp theodesp commented Apr 8, 2024

Description

Adds Smoke Unit tests for the following blocks:

  • CoreCode
  • CoreHeading
  • CoreList
  • CoreButton
  • CoreQuote

@theodesp theodesp requested a review from a team as a code owner April 8, 2024 13:22
Copy link

changeset-bot bot commented Apr 8, 2024

🦋 Changeset detected

Latest commit: fd4c015

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

@justlevine
Copy link
Contributor

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.

@theodesp
Copy link
Member Author

theodesp commented Apr 9, 2024

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.

@justlevine
Copy link
Contributor

justlevine commented Apr 9, 2024

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.

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