Skip to content
pieterbos edited this page Sep 13, 2010 · 12 revisions

(1) The following steps refer to an earlier defined object, they fail if they can’t find it

Note: a space was left inside the quotes for readability. This needs to be removed.

Debugging & story building

  • Then show the page
  • Then show the users
  • Then show the user with usernameFoeken

Authorization

  • Given the user ’ Andre ’ logs in with password ’ 123
  • Then the user ’ Andre ’ should not be able to log in with password ’ 123
  • Given he/she logs in with password ’ 123 ’ (1)
  • Given he/she is logged in (1)
  • Given he/she logs out (1)
  • When he/she logs out (1)

Navigation

  • When he/she clicks the ’ Employees ’ link
  • When he/she clicks the second ’ Employees ’ link
  • When he/she clicks the show link for the user with nameFoeken
  • When he/she clicks the edit link for the user with nameFoeken
  • When he/she clicks the destroy link for the user with nameFoeken
  • When he/she clicks ‘Part of my unit’ for the employee with nameFoeken
  • When he/she clicks the destroy link
  • When he/she confirms the popup
  • When he/she cancels the popup

Inspection

  • Then he/she should see errors
  • Then he/she should see a popup with the message ’ Are you sure?
  • Then he/she should (not) see the words ’ Monkey ’, ’ Cart ’ or/and ’ Ant
  • Then he/she should (not) see the word ’ Monkey
  • Then he/she should (not) see the words " This person doesn’t have any notes "
  • Then he/she should (not) see the long date ’ tomorrow
  • Then he/she should (not) see the short dates ’ tomorrow ’ and ’ next week
  • Then he/she should (not) see the regex ’ [0-9]+
  • Then he/she should be redirected by javascript
  • Then he/she should (not) see a table
  • And the first row should contain the word ‘first row
  • And the next row should contain the word ‘second row

If your table looks like a table, but is actually a div with multiple divs inside:

  • Then he/she should see the box with id ‘box
  • And the third row should contain the word ‘third row
  • And the next row should not contain the word ‘fifth row

Forms & Fields

  • When he/she selects ’ Partner name
  • When he/she chooses ’ Partner name
  • When he/she picks ’ Yes(works on both radio and select fields)
  • When he/she (un)checks ’ Active
  • When he/she clicks the button
  • When he/she fills the ’ End of care ’ date field with ’ tomorrow
  • When he/she fills the ’ End of care ’ date field with ’ next week
  • When he/she fills the ’ End of care ’ date field with ’ 2008-01-01
  • When he/she fills the third ’ Date ’ date field with ’ 2008-01-01
  • When he/she fills the ’ Name ’ field with ’ Nedap
  • When he/she fills the second ’ Name ’ field with ’ Nedap

Models & Relationships (setup)

Teardown

  • Given there are no units in the system
  • Given there are no units, periods and employees in the system

Creating objects

  • Given a user with usernameDummy ’ exists
  • Given a client with birth nameHiah ’ exists

Checking objects

  • Then a user with usernameDummy ’ should exist
  • Then the user with usernameDummy ’ should (not) be planner
  • Then it should (not) be planner
  • Then the role with nameTester ’ should (not) belong to a right with controllerEmployees
  • Then it should (not) belong to a right with controllerEmployees
  • Then the role with nameTester ’ should (not) have a right with controllerEmployees
  • Then it should (not) have a right with controllerEmployees

Updating objects

  • Given the user with usernameDummy ’ has password123
  • Given the user with usernameDummy ’ is valid fromlast monday
  • Given it has password123 ’ (1)
  • Given it is valid tonext week ’ (1)

Creating relationships between objects

  • Given the user with usernameDummy ’ has a responsibility for the role with namePlanner
  • Given it has a responsibility for the role with namePlanner ’ (1)
  • Given the user with nameAndre ’ belongs to a person with last nameFoeken
  • Given it belongs to a person with last nameFoeken ’ (1)