Streamed live

Adding e2e tests to blocks.


Topics: 
  • Discussed how the @wordpress/scripts package contains the e2e testing tools
  • Discussed how we also need @wordpress/env to run them.
  • Created a basic e2e test suite to test if the block was inserted and that the content was correct
  • Discussed using snapshots and the difference between toMatchSnapshot and toMatchInlineSnapshot
  • Discussed how to pre-populate the test database with content using npm pre commands and the wp-env run command
  • Created a test to ensure that the block saved test input by the user as the message attribute.