I have started writing the following feature within an app designed to manage a cleaning business:
Feature: Creating a new cleaner In order to allow Franchisees to allocate cleaners to jobs they need to be uploaded to the system Background: Given I am currently logged in to my account And I have navigated to the "Cleaners" page And I want to add a new cleaner to the database Scenario: Add a new cleaner to the system Given I have brought up the "Add Cleaner" form Then I will need to complete the fields within the following form: | first_name | | last_name | | email | | date_of_birth | | postcode | | mobile | | other_phone | | address_1 | | address_2 | | work_radius | | **days_available** | | notes | When I have entered valid data Then I can save to the database And I will have added a new cleaner to the system
In addition to welcoming comments on the way I have written the scenarios etc, my main problem is that I can't work out how to simulate selecting from a pre-populated field:
Populating the days_available should allow the franchisee to choose which days of the week, and which hours within those days, that a cleaner will be available for work. This obviously makes it possible to return queries which only show available cleaners for any given day/time of day.
Really hope someone can explain how this is done?