Notice how we make the test more robust by checking that the bookmarks are being displayed in the index page with the proper title.
Also, we don't click Edit or Destroy anywhere in the page, we instead restrict these actions to be inside the bookmark we expect to find in the page.
This subtle difference is very important to prevent flaky tests and false positives.
A more complete example could abstract the common functionality into a TableTestHelper
or FormTestHelper
, reducing the amount of duplication when we test similar CRUDs.