Guest User

Untitled

a guest
Mar 3rd, 2018
329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.96 KB | None | 0 0
  1. Feature: Create Public Holidays
  2. In order for the system to function as a reasonable HRM
  3. It should support public holidays w.r.t countries
  4. As human resource personnel, I should be able to create public holidays in the system
  5.  
  6. Scenario Outline: Access "New Public Holiday" Page
  7. Given the following countries exist in the system (...)
  8. | name |
  9. | Singapore |
  10. | Malaysia |
  11. And the following users exist in the system (...) *
  12. | name | email | country | role_assignments |
  13. | Jane | jane@fmail.com | Singapore | Human Resource |
  14. | Max | max@fmail.com | Malaysia | Human Resource |
  15. And I use firefox to visit "Manage Public Holidays" page as "<user>" [2009/01]
  16. When I follow "New Public Holiday"
  17. Then I should see "New Public Holiday" page
  18. And I should see "Events / Public holidays" side navigator as "selected"
  19. And I should see "Manage / New" breadcrumb navigator
  20. And I should see "Basic Info" section showing (...)
  21. * "Country*" selected as "<country>"
  22. * "Date*" as "" & ""
  23. * "Remark(s)" as ""
  24. And I should see buttons "Save", "Reset" & "Cancel"
  25.  
  26. Examples:
  27. | user | country |
  28. | Jane | Singapore |
  29. | Max | Malaysia |
  30.  
  31. Scenario: Interactive Dynamic Effects (w.r.t Conflicting Dates)
  32. Given the following countries exist in the system (...)
  33. | name |
  34. | Malaysia |
  35. | Singapore |
  36. And the following users exist in the system (...) *
  37. | name | email | country | role_assignments |
  38. | Jane | jane@fmail.com | Singapore | Human Resource |
  39. | Dennis | dennis@fmail.com | Malaysia | |
  40. And the following public holidays exist in the system (...) *
  41. | date_start | date_end | country |
  42. | 2009-02-20 | 2009-02-21 | Singapore |
  43. | 2009-01-28 | 2009-02-01 | Malaysia |
  44. | 2009-02-23 | 2009-02-23 | Singapore |
  45. | 2009-02-24 | 2009-02-25 | Malaysia |
  46. And I use firefox to visit "New Public Holiday" page as "Jane" [2009/02]
  47. And I focus on "Basic Info" section
  48. And I should not see any datepicker
  49. When I click on "Date*" (start)
  50. Then I should see a datepicker w days "20", "21" & "23" disabled
  51. When I click on "Date*" (end)
  52. Then I should see a datepicker w days "20", "21" & "23" disabled
  53. When I fill in "Date*" with "" & ""
  54. And I press "Save"
  55. Then I should see "New Public Holiday" page
  56. When I select "Country*" as "Malaysia"
  57. When I click on "Date*" (start)
  58. Then I should see a datepicker w days "1", "24" & "25" disabled
  59. When I click on "Date*" (end)
  60. Then I should see a datepicker w days "1", "24" & "25" disabled
  61.  
  62. Scenario Outline: Failure to Create Public Holiday
  63. Given the following countries exist in the system (...)
  64. | name |
  65. | Singapore |
  66. | Malaysia |
  67. And the following users exist in the system (...) *
  68. | name | email | role_assignments |
  69. | Jane | jane@fmail.com | Human Resource |
  70. | Max | max@fmail.com | |
  71. And the following public holidays exist in the system (...) *
  72. | date_start | date_end | country |
  73. | 2009-02-20 | 2009-02-21 | Malaysia |
  74. | 2009-02-22 | 2009-02-22 | Malaysia |
  75. | 2009-02-23 | 2009-02-23 | Malaysia |
  76. | 2009-02-24 | 2009-02-24 | Malaysia |
  77. And I use firefox to visit "New Public Holiday" page as "Jane" [2009/02]
  78. And I focus on "Basic Info" section
  79. And I select "Country*" as "<country>"
  80. And I fill in "Date*" with "<date_start>" & "<date_end>"
  81. And I fill in "Remark(s)" with ""
  82. When I press "Save"
  83. Then I should see "New Public Holiday" page
  84. And I should see "Public holiday failed to be created" error
  85. And I should see "<detail>" error detail
  86. When I focus on "Basic Info" section (error)
  87. Then I should see "Country*" selected as "<country>" (ok)
  88. And I should see "Date*" as "<date_start>" & "<date_end>" (<date.dc>)
  89. And I should see "Remark(s)" as "" (ok)
  90. When I press "Cancel"
  91. Then I should see "Manage Public Holidays" page
  92. And I should see "Creating of public holiday cancelled" warning
  93. And I should only see the following 4 public holidays (...)
  94. * "2009-02-20 ~ 2009-02-21 (x2)"
  95. * "2009-02-22"
  96. * "2009-02-23"
  97. * "2009-02-24"
  98.  
  99. Examples:
  100. | date_start | date_end | country | detail | date.dc |
  101. | 2009-02-20 | 2009-02-20 | Malaysia | Date is already taken | error |
  102. | 2009-01-25 | 2009-01-24 | Singapore | Date start must not be after date end | error |
  103. | 2009-01-32 | 2009-02-01 | Singapore | Date start/end is invalid | error |
  104. | 2009-01-25 | 2009-01-32 | Singapore | Date start/end is invalid | error |
  105. | 2009-02-25 | | Singapore | Date start/end must not be blank | error |
  106. | | 2009-02-25 | Singapore | Date start/end must not be blank | error |
Add Comment
Please, Sign In to add comment