Practice Test-driven Development (TDD)

Issue #42 requires a new column on the instructor’s dashboard with teams for extra points called ‘Extra’

Number of cycles: draft test + 1

Commits:

  • Draft test commit:
    • Reason: Add file with some test that looks for Extra text
    • Add failing test for extra column
    • Comparison to previous approach: Here we first look at final result ‘Extra’ is written, while previously we will display like ‘Team extra’ and then think on final result.
  • Failing test:
    • Reason: Add precise test that check that ‘Extra’ column is present assuming multiple possible
    • Refactor test as many columns are to be present
    • Workflow run
    • Results: Unable to find an element with the text: Extra
    • Comparison to previous approach: It requires to understand complete view of many columns, while previously we would just add this column in one place without thinking that it might be present in many places
  • Passing test:
    • Reason: Pass the test by incorporating new extra assignment type to be rendered in the table
    • Add team extra column ET + fix linter
    • Workflow run
    • Comparison to previous approach: We know how the column should look like (Called Extra) and refine namings immediately before running the dashboard and checking manually
  • Refactor:
    • Reason: Think on what’s missing in the column testing and adding more precise location - the text should be in the table
    • Refactor test to check Extra column is in the table
    • Workflow run
    • Comparison to previous approach: Here we think on the more precise location and structure of the rendered document, while in previous approach we would just add the column implicitly assuming it is inside required blocks.