This is just a technology testing project based on Create React App and TailwindCSS
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

120 lines
5.6KB

  1. Feature: Leave a feedback
  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 "Feedback" button at "Page content"
  7. Then modal of "Some feedback form example" dialog opened
  8. # Path of success
  9. Scenario: Fulfill feedback form for user support
  10. When enter "John Doe" in "Your name" input at "Feedback form"
  11. * enter "test@example.com" in "Email" input at "Feedback form"
  12. * choose "User support" in "Section" radio group at "Feedback form"
  13. * set "Consulting on product" in "Required types of support" checkbox group at "Feedback form"
  14. * enter "test" in "Message" textarea at "Feedback form"
  15. Then button "Send" at "Feedback form" is enabled
  16. When press "Send" button at "Feedback form"
  17. Then wait for "0.5" seconds
  18. * modal of "Some feedback form example" dialog closed
  19. * modal of "Data submitted from the form" dialog opened
  20. # technical field names are used
  21. * jsonView field "user_name" contains "John Doe"
  22. * jsonView field "email" contains "test@example.com"
  23. * jsonView field "section" contains "users"
  24. * jsonView field "support_type" contains row "0" => "product"
  25. * jsonView field "message" contains "test"
  26. * see "recaptcha" at "jsonView"
  27. # Validations testing
  28. Scenario: Feedback form validations
  29. # prepare state of success
  30. Given enter "John Doe" in "Your name" input at "Feedback form"
  31. * enter "test@example.com" in "Email" input at "Feedback form"
  32. * choose "Partnership" in "Section" radio group at "Feedback form"
  33. * enter "test" in "Message" textarea at "Feedback form"
  34. Then button "Send" at "Feedback form" is enabled
  35. # do not see any error message
  36. Then not see "Required" at "Error message"
  37. * not see "Must be a valid email address" at "Error message"
  38. * not see "Please fill all necessary form fields" at "Error message"
  39. # Your name
  40. When enter "" in "Your name" input at "Feedback form"
  41. Then see "Required" at "Error message"
  42. * button "Send" at "Feedback form" is disabled
  43. When enter "Jane Doe" in "Your name" input at "Feedback form"
  44. Then not see "Required" at "Error message"
  45. * button "Send" at "Feedback form" is enabled
  46. # Email
  47. When enter "" in "Email" input at "Feedback form"
  48. Then see "Required" at "Error message"
  49. * button "Send" at "Feedback form" is disabled
  50. When enter "test" in "Email" input at "Feedback form"
  51. Then see "Must be a valid email address" at "Error message"
  52. * button "Send" at "Feedback form" is disabled
  53. When enter "test@example.com" in "Email" input at "Feedback form"
  54. Then not see "Must be a valid email address" at "Error message"
  55. * button "Send" at "Feedback form" is enabled
  56. # Section (can not be unselected)
  57. * not see "Required types of support" at "Feedback form"
  58. When choose "User support" in "Section" radio group at "Feedback form"
  59. Then see "Required types of support" at "Feedback form"
  60. * not see "Required" at "Error message"
  61. * button "Send" at "Feedback form" is disabled
  62. # Required types of support (visible and required only if Section is User support)
  63. When set "Consulting on product" in "Required types of support" checkbox group at "Feedback form"
  64. Then not see "Required" at "Error message"
  65. * button "Send" at "Feedback form" is enabled
  66. When unset "Consulting on product" in "Required types of support" checkbox group at "Feedback form"
  67. Then see "Required" at "Error message"
  68. * button "Send" at "Feedback form" is disabled
  69. When set "Technical support" in "Required types of support" checkbox group at "Feedback form"
  70. Then not see "Required" at "Error message"
  71. Then button "Send" at "Feedback form" is enabled
  72. When unset "Technical support" in "Required types of support" checkbox group at "Feedback form"
  73. Then see "Required" at "Error message"
  74. * button "Send" at "Feedback form" is disabled
  75. When set "Legal support" in "Required types of support" checkbox group at "Feedback form"
  76. Then not see "Required" at "Error message"
  77. * button "Send" at "Feedback form" is enabled
  78. When set "Technical support" in "Required types of support" checkbox group at "Feedback form"
  79. Then not see "Required" at "Error message"
  80. Then button "Send" at "Feedback form" is enabled
  81. * set "Consulting on product" in "Required types of support" checkbox group at "Feedback form"
  82. Then not see "Required" at "Error message"
  83. Then button "Send" at "Feedback form" is enabled
  84. When unset "Technical support" in "Required types of support" checkbox group at "Feedback form"
  85. Then not see "Required" at "Error message"
  86. * button "Send" at "Feedback form" is enabled
  87. # Message
  88. When enter "" in "Message" input at "Feedback form"
  89. Then see "Required" at "Error message"
  90. * button "Send" at "Feedback form" is disabled
  91. When enter "The test message" in "Message" input at "Feedback form"
  92. Then not see "Required" at "Error message"
  93. * button "Send" at "Feedback form" is enabled
  94. # reCaptcha badge replacement warning
  95. * see "This site is protected by invisible reCAPTCHA and the Google Privacy Policy and Terms of Service apply." at "Feedback form"