Advertisement
Guest User

Untitled

a guest
Jul 25th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.50 KB | None | 0 0
  1. Feature: Forms Management Feature: Delete Form (FORM-481 & FORM-159)
  2. IN ORDER TO work with forms for a specific client and role
  3. AS A System Administrator
  4. I WANT to delete an existing form
  5.  
  6. @javascript @deleteFormsFE
  7. Scenario: Delete Form - Delete Button in Forms Management Page
  8. Given I am an 'Admin'
  9. And a form with a random string exists
  10. When I go to the Form Index page
  11. And I click on Span Text "Forms"
  12. And I wait "2000" milliseconds
  13. And I fill in "searchForms" with random string in Forms Management
  14. And I hover over the element with xpath "//*[@id='tab-content-5']/div/div/section/md-sidenav/md-content/md-list/md-list-item/div/button"
  15. Then I should see random string
  16. And I should see "delete" button
  17.  
  18. @javascript @deleteFormsFE
  19. Scenario: Delete Form - Bring up Delete Form Popup Warning
  20. Given I am an 'Admin'
  21. And a form with a random string exists
  22. When I go to the Form Index page
  23. And I click on Span Text "Forms"
  24. And I wait "2000" milliseconds
  25. And I fill in "searchForms" with random string in Forms Management
  26. And I hover over the element with xpath "//*[@id='tab-content-5']/div/div/section/md-sidenav/md-content/md-list/md-list-item/div/button"
  27. And I click on "delete" button
  28. Then I should see in dialogue "This action can not be undone!"
  29. And I should see "Cancel" button
  30. And I should see "Delete" button
  31.  
  32. @javascript @deleteFormsFE
  33. Scenario: Delete Form - Cancel in Forms Delete Popup
  34. Given I am an 'Admin'
  35. And a form with a random string exists
  36. When I go to the Form Index page
  37. And I click on Span Text "Forms"
  38. And I wait "2000" milliseconds
  39. And I fill in "searchForms" with random string in Forms Management
  40. And I hover over the element with xpath "//*[@id='tab-content-5']/div/div/section/md-sidenav/md-content/md-list/md-list-item/div/button"
  41. And I click on "delete" button
  42. And I should see in dialogue "This action can not be undone!"
  43. And I click on "Cancel" button
  44. Then I should be on the Forms Management page
  45.  
  46. @javascript @deleteFormsFE
  47. Scenario: Delete Form - Delete in Forms Delete Popup - HAPPY PATH
  48. Given I am an 'Admin'
  49. And a form with a random string exists
  50. When I go to the Form Index page
  51. And I click on Span Text "Forms"
  52. And I wait "2000" milliseconds
  53. And I fill in "searchForms" with random string in Forms Management
  54. And I hover over the element with xpath "//*[@id='tab-content-5']/div/div/section/md-sidenav/md-content/md-list/md-list-item/div/button"
  55. And I click on "delete" button
  56. And I should see in dialogue "This action can not be undone!"
  57. And I click on the element with xpath "//*[@id='mdDialog']/md-dialog-actions/button[2]"
  58. And I wait "2000" milliseconds
  59. Then I should see the "was deleted successfully" toast
  60.  
  61. # Form associated with ClientId = 1 and Person associated with ClientId = 16 tries to delete
  62. @javascript @deleteFormsFE
  63. Scenario: Delete Form - CAN NOT Delete WITHOUT Permissions (Logged in under Child Client)
  64. Given I am an 'Admin'
  65. And a form with a random string exists
  66. And I switch my ClientId to ClientId=16
  67. When I go to the Form Index page
  68. And I click on Span Text "Forms"
  69. And I wait "2000" milliseconds
  70. And I fill in "searchForms" with random string in Forms Management
  71. And I hover over the element with xpath "//*[@id='tab-content-5']/div/div/section/md-sidenav/md-content/md-list/md-list-item/div/button"
  72. Then I should not see "delete" button
  73. And I switch my ClientId to ClientId=1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement