Project

General

Profile

Test plan for report lifecycle

Add a report

Assuming that

  • we are on a "person" page
  • there are more than one report model

Then

  • There is a "add a report" link in menu

When...

  • I click on "adda report" link in menu

Then...

  • I can see a form with a button "add a new report"
  • I can choose between report models

When...

  • I choose one report model randomly
  • I click on "add a report"

Then...

  • I have a report form

When...

  • I fill report with correct data's
  • I click on "submit"

Then...

  • The next page is a redirection to the new report's view page

View report

Assuming...

We are continuing the scenario below.

When...

  • I click on the 'view' link in the table

Then...

  • The next page is successfull (HTTP status code 2XX)

update report

Assuming...

  • We are on the list page
  • I click on the "update" link

Then...

  • the page has status code 2XX (isSuccessful())

When...

  • I set the date field to yesterday
  • I set the user on another one
  • I click on submit

Then...

  • the report should be updated accordingly in DB

Report form

  • the report form contains a button "Add"
  • the report form have a field "date"
  • the report form have field "user"
  • the date field is required
  • The date field must validate date => delegated to symfony framework
  • the date field contains the current date by default
  • the user field is a select input
  • the user field is the current user by default
  • the user field does not contains desactivated users
  • the user field is required
  1. Open a form
  2. fill it with correct data
  3. modify a field to add incorrect data
  4. post it

The next page should have a ".error" element.

Report list

Assuming that

  • we are on a "person" page, which counts at least one report

When...

  • click on "report list" link in a menu

Then...

  • the list page is correctly loaded
  • The list page contains the report name
  • The list page contains the report date
  • The list page contains a "view report" link
  • The list page contains a "update report" link