Keeping little hands off › Turn the dial with the lock on, then unlock and boil passed
As a parent, I want the child lock to keep the kettle off, so that a curious toddler turning the dial doesn't start it.
The test behind the tutorial Keeping little hands off: every step it takes, what it checks and what it saw.
Start
From the setup of Kettle.
Everything it starts with
Given the kettle is off And the dial is 0 % And the preset is WARM And the child lock is off
- Every arranged state read back as arranged (4)
1 When the user presses lock
When the user presses lock Then the child lock is on
Expected behaviour: Lock turns the child lock on.
- the child lock is on · Lock turns the child lock on
2 When the dial is 100 %
When the dial is 100 % Then the kettle is off
Expected behaviour: The child lock holds the kettle while the dial turns.
- the kettle is off · The child lock holds the kettle while the dial turns
3 When the dial is 0 % and the user presses lock
When the dial is 0 % And the user presses lock Then the child lock is off
Expected behaviour: Lock again turns it off.
- the child lock is off · Lock again turns it off
4 When the dial is 80 %
When the dial is 80 % Then the kettle is heating
Expected behaviour: Turning the dial up starts the kettle.
- the kettle is heating · Turning the dial up starts the kettle