Date edge TC - sirdir/computer-database GitHub Wiki

1) Create computer with valid date

test data

  • introduced and discontinued have same date
  • minimum day in month ("2018-01-01", "2019-01-01")
  • highest boundary in 28-day month ("2018-02-28", "2019-02-28")
  • highest boundary in 29-day month ("2020-02-29", "2024-02-29")
  • highest boundary in 30-day month ("2018-03-30", "2019-03-30")
  • highest boundary in 31-day month ("2019-01-31", "2019-01-31")
  • highest month boundary ("2018-12-01", "2019-12-01")
  • lowest boundary date in era ("0-01-01", "0-01-01")
  • highest boundary date in era ("99999999-12-31", "99999999-12-31")

steps

  1. open form of creating new computer base page of application (e.g. http://computer-database.herokuapp.com/computers/new)
  2. Fill "Computer name" with any valid name, fill "Introduced date" and "Discontinued date" with provided test date and submit form.
  3. Search computer by name.

expected results

For created computer in columns must appear data that was provided in step-2.


2) Try to create computer with invalid date

test data

  • discontinued is earlier than introduced ("2020-01-01", "2018-01-01")
  • bellow lowest day boundary ("2018-01-00", "2019-01-00")
  • above highest boundary in 28-day month ("2018-02-29", "2019-02-29")
  • above highest boundary in 29-day month ("2016-02-30", "2020-02-30")
  • above highest boundary in 30-day month ("2018-04-31", "2019-04-31")
  • above highest boundary in 31-day month ("2018-01-32", "2019-01-32")
  • bellow lowest month boundary ("2018-00-01", "2019-00-01")
  • above highest month boundary ("2018-13-01", "2019-13-01")
  • bellow lowest boundary date in era (-0001-01-01", "-0001-01-01)
  • above highest boundary date in era ("1000000000-01-01", "1000000000-01-01")
  • invalid date format, e.g. some string value

steps

  1. open form of creating new computer base page of application (e.g. http://computer-database.herokuapp.com/computers/new)
  2. Fill "Computer name" with any valid name, fill "Introduced date" and "Discontinued date" with provided test date and submit form.

expected results

Validation of submitting test date must fail and highlight date fields.


3) Create computer without discontinue date

steps

  1. open form of creating new computer base page of application (e.g. http://computer-database.herokuapp.com/computers/new)
  2. Fill "Computer name", "Introduced date" with any valid values, "Discontinued date" leave empty and submit form.

expected results

Computer must create successfully and in columns must appear data that was provided in step-2.


4) Create computer without introduction date

steps

  1. open form of creating new computer base page of application (e.g. http://computer-database.herokuapp.com/computers/new)
  2. Fill "Computer name", "Discontinued date" with any valid values, "Introduced date" leave empty and submit form.

expected results

Validation of submitting test data must fail and highlight date fields.