Testing scripts - GeoscienceAustralia/egeodesy GitHub Wiki

Write test cases that we can work through manually at first and then (eventually) write end-to-end tests for.

From https://gaautobots.atlassian.net/browse/GEOD-499.

Login / User rights

Not logged in

  1. Log out if in already
  2. Open a site
  3. Expected:
    • The form is populated
    • All headers are either blue indicating everything is pristine or red indicating there are invalid items contained. But none is green indicating something is dirty.
    • All fields and buttons are disabled
    • Save and revert are disabled
    • There is a 'login' link

Logged in as user that has edit rights to site 'A'

  1. Log in as user that has edit rights to 'ADE1'
  2. Expected:
    • Every field is enabled and can be edited
    • 'save' and 'revert' are disabled
    • There is a 'logout' link
  3. Modify a field
  4. Expected:
    • 'save' and 'revert' are enabled
  5. Save the form
  6. Reload 'ADE1'
  7. Expected:
    • the field previously changed before has the changed value

Optional Single Item Group

  • "OSIG" - (0 to 1 exists)
  • Site Owner and Site Data Source are the only instances of a single item group

Create OSIG

  1. Log in as user that has edit rights to 'ADE1'
  2. Assumption: A Site Owner DOES NOT EXIST. If one already exists delete it (See Delete existing OSIG)
  3. Initial State -
    • The Group Header Bar with words "Site Owner" is blue to indicate it is pristine
    • The Group Header Bar only contains the words "Site Owner"
    • The Group Header Bar contains a button titled "New Site Owner"
    • The Group box contains the text "No information available for Site Owner"
  4. Click 'New Site Owner'
  5. Expect:
    • The Group Header Bar is red/yellow to indicate it is invalid
    • The parent Site Information Bar is red
    • The 'Individual Name' field has a red ring
    • Below the 'Individual Name' field is the words "Field Required" in red
    • (1) There is a 'Cancel' button (see [Create and Cancel OSIG](#Create and Cancel OSIG))
  6. Type a name into the 'Individual Name' field
  7. Expect:
    • The Group Header Bar is green to indicate it is dirty
    • The parent Site Information Bar is green
    • The 'Individual Name' field is green
    • The words "Field Required" have disappeared
    • The 'Cancel' button still exists
  8. Click the 'Save' link
  9. Click the 'YES' button in the save confirmation modal dialog
  10. Expect:
    • The Group Header Bar is blue to indicate it is pristine and valid
    • The parent Site Information Bar is blue
    • The 'Individual Name' field is white / clear
    • A 'Delete' button exists

Create and Cancel OSIG

  1. Follow [Create OSIG](#Create OSIG)
  2. Click 'Cancel'
  3. Expected:
    • The Group Header Bar with words "Site Owner" returns to blue to indicate it is pristine
    • The Group Header Bar only contains the words "Site Owner" - the text "(marked to delete)" on the bar OR underneath it has disappeared
    • The Group Header Bar contains a button titled "New Site Owner"
    • The Group box contains the text "No information available for Site Owner"

Delete existing OSIG

  1. Log in as user that has edit rights to 'ADE1'
  2. Assumption: A Site Owner EXISTS. If not create a new one (perform test "Single Item group > Create")
  3. Click the delete button for Site Owner
  4. Click the YES to confirm the delete
  5. Expected:
    • The Group Header Bar with words "Site Owner" is Green to indicate it is dirty
    • The Group Header Bar with words "Site Owner" contains the text "(marked to delete)" - OR this text is underneath the bar. This may or may not change.
    • All fields are visible and disabled
    • The delete button is visible and disabled
  6. Click the save link
  7. Click the 'YES' button in the save confirmation modal dialog
  8. Expected:
    • The Group Header Bar with words "Site Owner" returns to blue to indicate it is pristine
    • The Group Header Bar only contains the words "Site Owner" - the text "(marked to delete)" on the bar OR underneath it has disappeared
    • The Group Header Bar contains a button titled "New Site Owner"
    • The Group box contains the text "No information available for Site Owner"

Create and Delete in same session OSIG

  1. Follow [Create OSIG](#Create OSIG) to the end
  2. Follow [Delete existing OSIG](#Delete existing OSIG) to the end

Mandatory Single Item Group

  • MSIG
  • Site Metadata Custodian is the only instance

Default and only state MSIG

  1. Log in as user that has edit rights to 'ADE1'
  2. Expected:
    • The Site Metadata Custodian exists (may be blank)
    • There is no 'delete' button

Multi-Item Group

  • "MIG" - (0, 1 or more exists)
  • Almost everything is a multi-item group:
    • Site Contacts
    • Site Data Centers
    • GNSS Receivers
    • GNSS Antennas
    • ... and everything else

Create first item MIG

  1. Log in as user that has edit rights to 'ADE1'
  2. Assumptions:
    • We will work with GNSS Antennas
    • No GNSS Antennas EXIST. If there are any, delete them (See [Delete first item MIG](#Delete first item MIG))
  3. Initial State:
    • The Group Header Bar contains the words "Group Antennas" (and no others)
    • The Group Header Bar is blue to indicate it is pristine
    • The Group Header Bar contains a button titled "New Antenna"
    • The Group box contains the text "No information available for GNSS Antenna"
  4. Click 'New Site Antenna'
  5. Expect:
    • The Group Header Bar is red to indicate it is invalid
    • The Item Header Bar has appeared (it is new)
    • The Item Header Bar is red/yellow to indicate it is invalid
    • The 'Antenna Reference Point' field (and maybe others) has a red ring
    • Below the 'Antenna Reference Point' field is the words "Field Required" in red
    • The 'Date Installed' field is populated with the current date and time
    • The 'Date Installed' field is green indicating it is dirty
    • (LABEL 1) There is a 'Cancel' button (see Create and Cancel first item)
  6. Type some text into the 'Antenna Reference Point' field, and any others that are required
  7. Expect:
    • The Item Header Bar is green to indicate it is dirty
    • The Group Header Bar is green
    • The 'Antenna Reference Point' field and another other modified are green
    • The words "Field Required" have disappeared
    • The text 'The form is modified' appears at the top of the form
    • The 'Cancel' button still exists
    • (LABEL 2)
  8. Click the 'Save' link
  9. Click the 'YES' button in the save confirmation modal dialog
  10. Expect:
    • The Item Header Bar is blue to indicate it is pristine and valid
    • The Group Header Bar is blue
    • The 'Antenna Reference Point' field (and any others modified previously) are white / clear
    • The 'Antenna Reference Point' field (and any others modified previously) contain the text or numbers they were previously updated with
    • A 'Delete' button exists

Create and Cancel first item MIG

  1. Follow [Create first item MIG](#Create first item MIG) to LABEL 1
  2. Click "Cancel"
  3. Expect:
    • The Group Header Bar contains the words "Group Antennas" (and no others)
    • The Group Header Bar is blue to indicate it is pristine
    • The Group Header Bar contains a button titled "New Antenna"
    • The Group box contains the text "No information available for GNSS Antenna"

Create and Cancel one of multiple items MIG

  1. Follow [Create first item MIG](#Create first item MIG) to LABEL 2 (ie. don't save after creating the first)
  2. Click 'New Site Antenna' to create 2nd item
  3. Expect:
    • There are two Items now - the first is the one just created - all references to an Item are to this
    • The Group Header Bar is red to indicate it is invalid
    • The Item Header Bar has appeared (it is new)
    • The Item Header Bar is red/yellow to indicate it is invalid
    • The 'Antenna Reference Point' field (and maybe others) has a red ring
    • Below the 'Antenna Reference Point' field is the words "Field Required" in red
    • The 'Date Installed' field is populated with the current date and time
    • The 'Date Installed' field is green indicating it is dirty
    • (LABEL 3) There is a 'Cancel' button (see Create and Cancel first item)
  4. Type some text into the 'Antenna Reference Point' field, and any others that are required
  5. Expect:
    • The Item Header Bar is green to indicate it is dirty
    • The Group Header Bar is green
    • The 'Antenna Reference Point' field and another other modified are green
    • The words "Field Required" have disappeared
    • The text 'The form is modified' appears at the top of the form
    • The 'Cancel' button still exists
  6. Click the 'Save' link
  7. Click the 'YES' button in the save confirmation modal dialog
  8. Expect:
    • The Item Header Bar is blue to indicate it is pristine and valid. The same for the other Item header.
    • The Group Header Bar is blue
    • The 'Antenna Reference Point' field (and any others modified previously) are white / clear
    • The 'Antenna Reference Point' field (and any others modified previously) contain the text or numbers they were previously updated with
    • A 'Delete' button exists

Delete first item MIG

  1. Follow [Create first item MIG](#Create first item MIG) to LABEL 2 (ie. don't save after creating the first)
  2. Click 'Delete'
  3. Enter any text into the 'Deletion Reason' box and click 'OK'
  4. Expected:
    • The Group Header Bar with words "GNSS Antennas" is Green to indicate it is dirty
    • The Item Header Bar for the Antenna deleted contains the text "(marked to delete)"
    • All fields are visible and disabled
    • The delete button is visible and disabled
    • The 'New Antenna' button is visible and enabled
  5. Click the save link
  6. Click the 'YES' button in the save confirmation modal dialog
  7. Expected:
    • The Group Header Bar with words "GNSS Antennas" returns to blue to indicate it is pristine
    • The Group Header Bar with words "GNSS Antennas" only contains the words "Site Owner" - the text "(marked to delete)" on the bar has disappeared
    • The Group Header Bar contains a button titled "New Antenna"
    • The Group box contains the text "No information available for Site Owner"

Delete one of multiple items MIG

Edit fields

Number field

Date field

Text field

TextArea field