Verifying interface code.
WHAT TO TEST
Logic, independently of the interface Components, in isolation Key user journeys, end to end
WHAT TO TEST FOR IN COMPONENTS
That it renders what it should for given inputs That interaction produces the expected result That every state renders
WHAT TO AVOID TESTING
Implementation detail.
WHY
Tests coupled to implementation break on every refactor and prevent improvement.
WHAT TO TEST INSTEAD
Behaviour as a user experiences it.
WHAT END-TO-END TESTS PROVIDE
Confidence that the whole path works.
WHAT THEY COST
Slowness, and fragility.
WHAT THAT MEANS
Few of them, covering the most important paths.
WHAT MAKES THEM FRAGILE
Depending on structure or timing.
WHAT TO DO ABOUT IT
Select elements as a user would identify them, and wait for conditions rather than durations.
WHAT TO RUN AUTOMATICALLY
All of it, on every change.
WHAT A FAILING TEST MEANS
Either the code or the test is wrong. Establish which.