Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Feature: Forms Management Feature: Delete Form (FORM-481 & FORM-159)
- IN ORDER TO work with forms for a specific client and role
- AS A System Administrator
- I WANT to delete an existing form
- @javascript @deleteFormsFE
- Scenario: Delete Form - Delete Button in Forms Management Page
- Given I am an 'Admin'
- And a form with a random string exists
- When I go to the Form Index page
- And I click on Span Text "Forms"
- And I wait "2000" milliseconds
- And I fill in "searchForms" with random string in Forms Management
- 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"
- Then I should see random string
- And I should see "delete" button
- @javascript @deleteFormsFE
- Scenario: Delete Form - Bring up Delete Form Popup Warning
- Given I am an 'Admin'
- And a form with a random string exists
- When I go to the Form Index page
- And I click on Span Text "Forms"
- And I wait "2000" milliseconds
- And I fill in "searchForms" with random string in Forms Management
- 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"
- And I click on "delete" button
- Then I should see in dialogue "This action can not be undone!"
- And I should see "Cancel" button
- And I should see "Delete" button
- @javascript @deleteFormsFE
- Scenario: Delete Form - Cancel in Forms Delete Popup
- Given I am an 'Admin'
- And a form with a random string exists
- When I go to the Form Index page
- And I click on Span Text "Forms"
- And I wait "2000" milliseconds
- And I fill in "searchForms" with random string in Forms Management
- 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"
- And I click on "delete" button
- And I should see in dialogue "This action can not be undone!"
- And I click on "Cancel" button
- Then I should be on the Forms Management page
- @javascript @deleteFormsFE
- Scenario: Delete Form - Delete in Forms Delete Popup - HAPPY PATH
- Given I am an 'Admin'
- And a form with a random string exists
- When I go to the Form Index page
- And I click on Span Text "Forms"
- And I wait "2000" milliseconds
- And I fill in "searchForms" with random string in Forms Management
- 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"
- And I click on "delete" button
- And I should see in dialogue "This action can not be undone!"
- And I click on the element with xpath "//*[@id='mdDialog']/md-dialog-actions/button[2]"
- And I wait "2000" milliseconds
- Then I should see the "was deleted successfully" toast
- # Form associated with ClientId = 1 and Person associated with ClientId = 16 tries to delete
- @javascript @deleteFormsFE
- Scenario: Delete Form - CAN NOT Delete WITHOUT Permissions (Logged in under Child Client)
- Given I am an 'Admin'
- And a form with a random string exists
- And I switch my ClientId to ClientId=16
- When I go to the Form Index page
- And I click on Span Text "Forms"
- And I wait "2000" milliseconds
- And I fill in "searchForms" with random string in Forms Management
- 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"
- Then I should not see "delete" button
- And I switch my ClientId to ClientId=1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement