symfony-cmf/block-bundle

Web Testing

dantleech opened this issue · 5 comments

We need to add web tests to this bundle, precedents can be found in:

  • MenuBundle
  • SimpleCmsBundle
  • RoutingBundle
  • Admin Tests
  • Frontend Tests

Admin tests

  • We should create one WebTest for each admin.
  • These tests should test list, edit and create with submission. (the above bundles all implement the same set of tests, its not complete but its consistent - they can be used as a model).
  • A base test class can be used to reduce the amount of code (e.g. the list test is very similar for each test case)

Frontend tests

  • Create either one page with all blocks or a page for each block.
  • These page(s) should at minimum render the block, but also allow us to add different configurations of the same block.
  • Add a 200 OK test for each page.

I would also like to make these pages "demos" which show the code used to render each block, as the test application can be served as a web application.

dbu commented

frontend tests: one page per block would make it easier to debug failing tests when one block type has a problem.

looks like there is a fair bit of progress here:
https://github.com/symfony-cmf/BlockBundle/tree/master/Tests

Ok I'm on the admin part this morning

there has been some progress here ..

Hi lukas, I will look at it this afternoon or tomorrow.