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

tests: Add tests for CoreHeading block #296

Merged
merged 14 commits into from
Oct 3, 2024

Conversation

ashutoshgautams
Copy link
Contributor

What

This PR backfills tests for the CoreHeading block and its attributes.

Tested attributes:

  • align
  • anchor
  • backgroundColor
  • className
  • content
  • cssClassName
  • fontSize
  • gradient
  • level
  • style
  • textAlign
  • textColor
  • lock

Untested fields:

  • CoreHeadingAttributes.metadata - @todo
  • CoreHeadingAttributes.placeholder - Not explicitly tested, always returns null in current tests

Exposed issues:

  • CoreHeading.cssClassNames: returns null even when the block has CSS classes. This is commented out in the test file.
  • CoreHeadingAttributes.level returns a Float instead of an Integer. This is noted in a comment in the test file.

These issues are noted in comments within the test file and should be addressed in future updates.

@ashutoshgautams ashutoshgautams requested a review from a team as a code owner September 24, 2024 04:04
Copy link

changeset-bot bot commented Sep 24, 2024

🦋 Changeset detected

Latest commit: 9bc6fe9

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 Patch

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

@ashutoshgautams
Copy link
Contributor Author

cc: @justlevine

@jasonbahl jasonbahl merged commit efb2534 into wpengine:main Oct 3, 2024
10 of 11 checks passed
@justlevine justlevine deleted the core-heading-test branch October 18, 2024 10:30
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.

3 participants