This is just a technology testing project based on Create React App and TailwindCSS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

124 lines
5.8KB

  1. Feature: Register new user
  2. Background:
  3. Given visit "Home" page
  4. # clear input fields persistence mechanism (just speeds up the test)
  5. Given clear browser storages
  6. When press "Registration" button at "Page content"
  7. Then modal of "New user registration" dialog opened
  8. # Path of success
  9. # Scenario: Fulfill user registration form (simple)
  10. # # For cases where we have no selector collisions in the DOM
  11. # When enter "test@example.com" in "Email" input
  12. # * enter "password1234" in "Password" input
  13. # * enter "password1234" in "Confirm password" input
  14. # * set "Accept Service Policy" checkbox
  15. # Then button "Register" is enabled
  16. # When press "Register" button
  17. # Then modal of "New user registration" dialog closed
  18. # * modal of "Data submitted from the form" dialog opened
  19. # # technical field names are used
  20. # * jsonView field "Email" contains "test@example.com"
  21. # * jsonView field "Password" contains "password1234"
  22. # * jsonView field "Confirm password" contains "password1234"
  23. # * jsonView field "Accept Service Policy" contains "true"
  24. Scenario: Fulfill user registration form
  25. When enter "test@example.com" in "Email" input at "User registration form"
  26. * enter "password1234" in "Password" input at "User registration form"
  27. * enter "password1234" in "Confirm password" input at "User registration form"
  28. * set "Accept Service Policy" checkbox at "User registration form"
  29. Then button "Register" at "User registration form" is enabled
  30. When press "Register" button at "User registration form"
  31. Then modal of "New user registration" dialog closed
  32. * modal of "Data submitted from the form" dialog opened
  33. # technical field names are used
  34. * jsonView field "email" contains "test@example.com"
  35. * jsonView field "password" contains "password1234"
  36. * jsonView field "password_confirm" contains "password1234"
  37. * jsonView field "userconsent" contains "true"
  38. Scenario: Switch to Sign In dialogue
  39. When press "Have account? - Sign In" button at "User registration form"
  40. Then modal of "New user registration" dialog closed
  41. * modal of "Sign in the restricted area" dialog opened
  42. Scenario: Switch to Service Policy dialogue... and back
  43. When click "Service Policy" link at "User registration form"
  44. Then modal of "New user registration" dialog closed
  45. * modal of "Service Policy" dialog opened
  46. Then button "Go to Registration" at "Service Policy form" is enabled
  47. When press "Go to Registration" button at "Service Policy form"
  48. Then modal of "Service Policy" dialog closed
  49. * modal of "New user registration" dialog opened
  50. # Validations testing
  51. Scenario: Registration form validations
  52. # prepare state of success
  53. Given enter "test@example.com" in "Email" input at "User registration form"
  54. * enter "password1234" in "Password" input at "User registration form"
  55. * enter "password1234" in "Confirm password" input at "User registration form"
  56. * set "Accept Service Policy" checkbox at "User registration form"
  57. * button "Register" at "User registration form" is enabled
  58. # do not see any error message
  59. Then not see "Required" at "Error message"
  60. * not see "Must be a valid email address" at "Error message"
  61. * not see "Minimum 8 symbols" at "Error message"
  62. * not see "Not matching with password" at "Error message"
  63. # Email
  64. When enter "" in "Email" input at "User registration form"
  65. Then see "Required" at "Error message"
  66. * button "Register" at "User registration form" is disabled
  67. When enter "test" in "Email" input at "User registration form"
  68. Then see "Must be a valid email address" at "Error message"
  69. * button "Register" at "User registration form" is disabled
  70. When enter "test@example.com" in "Email" input at "User registration form"
  71. Then not see "Must be a valid email address" at "Error message"
  72. * button "Register" at "User registration form" is enabled
  73. # Password
  74. When enter "" in "Password" input at "User registration form"
  75. Then see "Required" at "Error message"
  76. * button "Register" at "User registration form" is disabled
  77. When enter "test" in "Password" input at "User registration form"
  78. Then see "Minimum 8 symbols" at "Error message"
  79. * button "Register" at "User registration form" is disabled
  80. When enter "password1234" in "Password" input at "User registration form"
  81. Then not see "Minimum 8 symbols" at "Error message"
  82. * button "Register" at "User registration form" is enabled
  83. # Confirm password
  84. When enter "" in "Confirm password" input at "User registration form"
  85. Then see "Required" at "Error message"
  86. * button "Register" at "User registration form" is disabled
  87. When enter "test" in "Confirm password" input at "User registration form"
  88. Then see "Not matching with password" at "Error message"
  89. * button "Register" at "User registration form" is disabled
  90. When enter "password1234" in "Confirm password" input at "User registration form"
  91. Then not see "Not matching with password" at "Error message"
  92. * button "Register" at "User registration form" is enabled
  93. # Accept Service Policy
  94. When unset "Accept Service Policy" checkbox at "User registration form"
  95. Then see "Required" at "Error message"
  96. * button "Register" at "User registration form" is disabled
  97. When set "Accept Service Policy" checkbox at "User registration form"
  98. Then not see "Required" at "Error message"
  99. * button "Register" at "User registration form" is enabled