Appearance
AireFrame Commands
A library of test commands to use when testing AireFrame.
Login and Authentication
gherkin
When we login to AireFrame as '<username>'Logs into AireFrame with the specified user credentials from your Configuration.json.
gherkin
#Example:
When we login to AireFrame as 'test.user'
Then we are logged into AireFrameVerifies that the login was successful.
Navigation
gherkin
When we view the home screen
When we view the subject list pageNavigates to the configured AireFrame instance's home/subject list screen.
gherkin
#Example:
When we view the home screenDepartment
gherkin
Then the Select a Department panel is shownConfirms that the “Select a Department” panel is visible.
gherkin
When we select department '<department-name>'Chooses the named department from the department panel. <department-name> can be the department's on-screen name or its Key - see Finding Controls by Name or ID for how AireAssert tells them apart.
gherkin
#Example:
When we select department 'Radiology'Dashboard
gherkin
When we select dashboard '<dashboard-name>'Navigates to the given dashboard view. <dashboard-name> can be the dashboard's on-screen title or its Key.
gherkin
#Example:
When we select dashboard 'Organisation'Location
gherkin
When we select location '<location-name>'Selects the specified location (e.g. a site or region). <location-name> can be the location's on-screen Display Name or its Key - check AireFrame's own Configuration > Structure Configuration screen if you're unsure which to use.
gherkin
#Example:
When we select location 'London'Subject Lookup
Details Page
gherkin
Then the subject details page is shown for '<subject-id>'Checks that the details page for the given subject identifier is displayed:
gherkin
#Example:
Then the subject details page is shown for '12345'Subject Matching
gherkin
When we view a subject matchingLoads a subject ready to be used in subsequent steps. Supply a data table:
gherkin
#Example:
Then a subject matches
| FirstName | Jane |
| Surname | Smith |
| DOB | 1980-05-12 |Note: Other steps can then refer to this subject as 'our subject'. This will be specified in the steps which support it.
Field names like FirstName above can be the field's on-screen label or its ID - see Finding Controls by Name or ID for how AireAssert tells them apart.
gherkin
Then a subject matchesVerifies that at least one subject record matches all of the provided field/value pairs. Supply a data table:
gherkin
#Example:
Then a subject matches
| FirstName | Jane |
| Surname | Smith |
| DOB | 1980-05-12 |Launching Forms
gherkin
When we launch form '<form-key>' for a subject matchingOpens the specified form for the first subject matching the given criteria. Supply a data table of field/value pairs:
gherkin
#Example:
When we launch form 'BMIForm' for a subject matching
| NHSNumber | 1234567890 |Alternatively, if you have previously run a 'When we view a subject matching' command you can simply use
gherkin
When we launch form '<form-key>' for our subjectwithout the datatable.
Modifying subjects
gherkin
When we create a subjectCreates a new subject using the data in the supplied datatable.
Every subject must belong to at least one structural entity (the organisational structure you see under AireFrame's Configuration > Structure Configuration screen). Include a reserved StructuralEntityKeys row giving the structural entity's Key - comma-separate the value if the subject should belong to more than one. This row is not a real subject field, so it won't appear on the created subject and isn't matched against by later steps like a subject matches.
gherkin
#Example:
When we create a subject
| StructuralEntityKeys | structure_1 |
| FirstName | Jane |
| Surname | Smith |
| DOB | 1980-05-12 |Omitting StructuralEntityKeys fails the step with a clear error rather than silently creating an orphaned subject.
gherkin
When we update our subjectModifies the subject previously loaded by a 'When we view a subject matching command'
gherkin
#Full example:
When view a subject matching
| FirstName | Jane |
| Surname | Smith |
| DOB | 1980-05-12 |
Then we update our subject
| FirstName | Jennifer |Not every subject field can be created or updated - some (e.g. values populated from an external lookup) are read-only and can only be checked with steps like a subject matches, never set. Trying to create or update one of these fails with '<field>' is not an input field, so cannot be written to - if you hit this, pick a different field or move that check to an assertion step instead.
Tables and Widgets
These commands work with the tables/widgets shown on dashboards and subject screens (e.g. task lists, worklists). table and widget are interchangeable in all of the commands below. If a subject has previously been loaded with 'we view a subject matching', the table is assumed to be on that subject's screen; otherwise it is looked for on the current dashboard.
gherkin
Then the '<table-name>' table is visible
Then the '<table-name>' widget is visibleConfirms that the named table/widget is shown on screen.
gherkin
#Example:
Then the 'Open Tasks' widget is visiblegherkin
Then the '<table-name>' table contains <row-count> rowsChecks that the table/widget contains exactly the given number of rows.
gherkin
#Example:
Then the 'Open Tasks' widget contains 3 rowsgherkin
Then the '<table-name>' table contains greater than <row-count> rows
Then the '<table-name>' table contains more than <row-count> rowsChecks that the table/widget contains more than the given number of rows.
gherkin
Then the '<table-name>' table contains fewer than <row-count> rows
Then the '<table-name>' table contains less than <row-count> rowsChecks that the table/widget contains fewer than the given number of rows.
gherkin
Then the '<table-name>' table contains '<expected-text>'Checks that the given free text appears somewhere in the table/widget, searching across all pages.
gherkin
#Example:
Then the 'Open Tasks' widget contains 'Awaiting Review'gherkin
Then the '<table-name>' table contains rowChecks that at least one row in the table/widget matches all of the given field/value pairs. Searches across all pages of the table.
gherkin
#Example:
Then the 'Open Tasks' widget contains row
| Task Type | Review |
| Status | Open |gherkin
Then the '<table-name>' table has options for rowChecks that a row matching the given field/value pairs has an actions menu available.
gherkin
#Example:
Then the 'Open Tasks' widget has options for row
| Task Type | Review |
| Status | Open |gherkin
Given we view a row in the '<table-name>' table
Given we are viewing a row in the '<table-name>' tableSelects a row within the named table/widget matching the given field/value pairs, ready to be used by a subsequent 'we select the option' command.
gherkin
#Example:
Given we view a row in the 'Open Tasks' widget
| Task Type | Review |
| Status | Open |gherkin
When we select the '<option-name>' optionOpens the actions menu for the row previously selected with 'we view a row in' and chooses the named option. A data table of field/value pairs can optionally be supplied if the option requires additional input. If choosing the option opens a form, that form is loaded ready for subsequent form steps.
gherkin
#Full example:
Given we view a row in the 'Open Tasks' widget
| Task Type | Review |
| Status | Open |
When we select the 'Complete Task' option
| Outcome | Approved |