bnjy-opengov / chi-solicitations-feed

Wrapping the City of Chicago's publishing of solicitations in a machine-readable way.
1 stars 1 forks source link

Write Tests for Contracts and Awards Search Page #5

Open nrrb opened 10 years ago

nrrb commented 10 years ago

As with the Write Test for Solicitations Search Page issue, we should write tests for the other search pages we intend to scrape in the future. By testing first, we pave the way for using the search form and page structure that the tests describe. In fact, the tests might dictate in a large way how we write this functionality. If there isn't a test for it, we can't do it!

A natural companion to the Solicitations Search page is the Contracts and Awards Search page, where I expect we'd see the businesses whose bids were chosen in the Bid listings on the Solicitations page. As with the other page, write tests for:

  1. ensuring that the search form structure is as we expect
  2. ensuring that invalid form values produce expected errors
  3. ensuring that the search results are structured in a table we know the format of
  4. ensuring that results are produced at all, or that no results are found for garbage input