Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Feature: Form Manager Feature: Create Form (FORM-8)
- IN ORDER TO collect information for any specific purpose
- AS A System Administrator
- I WANT to create a form to collect data for that purpose
- # @javascript @FE_CreateForm
- # Scenario: Create form - Happy Path
- # Given I am an 'Admin'
- # # go to "Forms Management" page
- # When I go to the Form Index page
- # Then I should see "Forms Management"
- # And I should see "FORM SETS"
- # # go to "Form" page
- # And I click on Span Text "Forms"
- # And I should see "ADD FORM"
- # # go to "Add Form" page
- # And I click on the element with xpath "//a[@value='Add Form']"
- # And I wait "4000" milliseconds
- # And I should see "Properties"
- # # pop up "Form Properties" page
- # And I click on Span Text "Properties"
- # And I should see in dialogue "Form Properties"
- # And I should see "Title"
- # And I should see "Description"
- # And I should see "Role"
- # And I should see "Visible"
- # And I should see "Required"
- # And I should see "Read-Only"
- # And I should see "Form Rule Type"
- # And I should see "Target"
- # And I should see "Application Form Type"
- #
- # And I fill in element xpath '//md-input-container/input[@ng-model="formData.Title"]' with "Behat FE create form Title_" appended 6 random characters
- # And I fill in element xpath '//md-input-container/input[@ng-model="formData.Description"]' with "Behat FE create form Description"
- #
- # # test drop down "Form Type" - FORM-173
- # When I click on the element with xpath "//md-input-container/md-select[@ng-model='formData.FormTypeId']"
- # And I wait "4000" milliseconds
- # Then I should see "Single Page"
- # And I should see "Tabular"
- # And I should see "Wizard"
- # And I click on the element with xpath './/md-option[@value="1"][@ng-value="type.FormTypeId"]'
- #
- # # test drop down "Roll" - FORM-164
- # When I click on the element with xpath ".//md-input-container/md-select[@ng-model='formData.RoleId']"
- # Then I should see "Administrator"
- # And I click on the element with xpath './/md-option[@value="1"][@ng-value="role.RoleId"]'
- # And I wait "4000" milliseconds
- #
- # # test switch by turning on and off
- # And I click on the element with xpath '//md-switch[@ng-model="formData.IsVisible"]'
- # And I click on the element with xpath '//md-switch[@ng-model="formData.IsRequired"]'
- # And I click on the element with xpath '//md-switch[@ng-model="formData.IsRequired"]'
- # And I click on the element with xpath '//md-switch[@ng-model="formData.IsReadOnly"]'
- # And I click on the element with xpath '//md-switch[@ng-model="formData.IsReadOnly"]'
- #
- # # test drop down "Form Rule Type" - FORM-167, FORM-456, FORM-458, FORM-460
- # When I click on the element with xpath "//md-input-container/md-select[@aria-label='Form Rule Type']"
- # And I wait "4000" milliseconds
- # Then I should see "Disable Element"
- # And I should see "Enable Element"
- # And I should see "Hide Element"
- # And I should see "Make Element Required"
- # And I should see "Read-Only Element"
- # And I click on the element with xpath './/md-option[@value="1"][@ng-value="ruleType.FormRuleTypeId"]'
- #
- # And I fill in element xpath "//md-input-container/input[@ng-model='formData.FormRules[$index].Title']" with "Behat FE create form Rule Title_" appended 6 random characters
- # And I fill in element xpath "//md-input-container/input[@ng-model='formData.FormRules[$index].Description']" with "Behat FE create form Rule Description"
- #
- # # test drop down "Target"
- # When I click on the element with xpath "//md-input-container/md-select[@aria-label='Target']"
- # And I click on the element with xpath './/md-option[@value="1"][@ng-value="target.FormTargetId"]'
- # And I wait "4000" milliseconds
- #
- #
- # # test drop down "Application Form Type" - FORM-167, FORM-169, FORM-170, FORM-172, FORM-173
- # When I click on the element with xpath "//md-input-container/md-select[@ng-model='formData.Applications[$index].AppFormTypeId']"
- # And I wait "4000" milliseconds
- # # test FORM-167 fill out Application Form Type value = Request Change
- # And I should see "Request Change"
- #
- # # test FORM-169 fill out Application Form Type value = Live
- # And I should see "Live"
- #
- # # test FORM-170 fill out Application Form Type value = Instance (Live Until Complete)
- # And I should see "Instance (Live Until Complete)"
- # # test FORM-172 fill out Application Form Type value = Instance Only
- # And I should see "Instance Only"
- # And I click on the element with xpath './/md-option[@value="2"][@ng-value="appFormType.AppFormTypeId"]'
- # And I wait "4000" milliseconds
- #
- # # test drop down "Application"
- # When I click on the element with xpath "//md-input-container/md-select[@aria-label='Application']"
- # And I click on the element with xpath './/md-option[@value="1"][@ng-value="app.ApplicationId"]'
- #
- # # test Add button at Form Rule
- # When I click on the element with xpath "//button[@ng-click='addFormRule()']/md-icon"
- # And I wait "4000" milliseconds
- # And I fill in element xpath "//div[@class='tableArea formGroup propertyField']//tbody/tr[2]/td[1]/div[1]//input[@ng-model='formData.FormRules[$index].Title']" with "Behat FE create form Rule Title_" appended 6 random characters
- # And I fill in element xpath "//div[@class='tableArea formGroup propertyField']//tbody/tr[2]/td[1]/div[1]//input[@ng-model='formData.FormRules[$index].Description']" with "Behat FE create form Rule Description"
- # And I fill in element xpath "//div[@class='tableArea formGroup propertyField']//tbody/tr[2]/td[1]/div[2]/div[1]//md-select[@aria-label='Form Rule Type']" with "Show Element"
- #
- # # click md-backdrop to resolve the problem of element being not clickable when clicking next drop down menu afterward
- # And I click on the element with xpath "//md-backdrop"
- # And I click on the element with xpath ".//tbody/tr[2]/td[1]/div[2]/div[2]//md-input-container/md-select[@aria-label='Target']"
- # And I wait "4000" milliseconds
- # And I click on the element with xpath "//md-backdrop"
- #
- # # test delete button at Form Rule
- # And I click on the element with xpath "//table//tbody/tr[2]//td[@class='delArea']/button[@ng-click='delFormRule($index)']"
- #
- # # test Add button at Application
- # When I click on the element with xpath "//button[@ng-click='addApp()']/md-icon"
- # And I wait "4000" milliseconds
- # And I fill in element xpath "//*[@id='dialogContent_18']/div[3]/table/tbody/tr[2]//md-input-container//md-select[@ng-model='formData.Applications[$index].AppFormTypeId']" with "Live"
- # And I fill in element xpath "//*[@id='dialogContent_18']/div[3]/table/tbody/tr[2]//md-input-container//md-select[@ng-model='formData.Applications[$index].ApplicationId']" with "StudentTrac"
- #
- # # test delete button at Application
- # And I click on the element with xpath "//table//tbody/tr[2]//td[@class='delArea']/button[@ng-click='delApp($index)']"
- #
- # # Click on Save Button
- ## When I click on the element with xpath "//md-dialog-actions//button[@aria-label='Save']"
- # When I click on the element with xpath "//div[@class='md-dialog-container ng-scope']//button[@aria-label='Save']"
- # And I wait "4000" milliseconds
- # And I should see "Behat FE create form Title"
- #
- @javascript @createForm
- Scenario: Display Create Forms Page
- Given I am an 'Admin'
- When I go to the Form Index page
- And I click on Span Text "Forms"
- And I click on class "createForm"
- And I should see in dialogue "Form Properties"
- And I click on class "formPropertyCancelBtn"
- Then I should be on the Create Forms page
- And I should see "New" button
- And I should see "Open" button
- And I should see "Duplicate" button
- And I should see "Save" button
- And I should see "Preview" button
- And I should see "Publish" button
- And I should see "Properties" button
- And I should see "Close"
- @javascript @createForm1
- Scenario: Display Form Properties Page
- Given I am an 'Admin'
- When I go to the Form Index page
- And I click on Span Text "Forms"
- And I click on class "createForm"
- And I wait "4000" milliseconds
- Then I should see in dialogue "Form Properties"
- And I should see "Title"
- And I should see "Description"
- And I should see "Role"
- And I should see "Type"
- And I should see "Visible"
- And I should see "Required"
- And I should see "Read-Only"
- And I should see "Form Rule"
- And I should see "Form Rule Type"
- And I should see "Target"
- And I should see an "#deleteRules" element
- And I should see an "#addRuleBtn" element
- And I scroll "applications[0][type]" into view
- And I should see "Application"
- And I should see "Application Form Type"
- And I should see an "#deleteApplication" element
- And I should see an "#addApplicationBtn" element
- And I should see "Cancel" button
- And I should see "Save" button
- @javascript @createForm
- Scenario: Cancel Form Properties Page
- Given I am an 'Admin'
- When I go to the Form Index page
- And I click on Span Text "Forms"
- And I click on class "createForm"
- And I wait "4000" milliseconds
- And I should see in dialogue "Form Properties"
- And I click on class "formPropertyCancelBtn"
- Then I should be on the Create Forms page
- And I should see "New" button
- And I should see "Open" button
- And I should see "Duplicate" button
- And I should see "Save" button
- And I should see "Preview" button
- And I should see "Publish" button
- And I should see "Properties" button
- And I should see "close"
- ### HAPPY PATHS ###
- @javascript @createForm
- Scenario: Create Form - LONG HAPPY PATH (all fields)
- Given I am an 'Admin'
- When I go to the Form Index page
- And I click on Span Text "Forms"
- And I click on class "createForm"
- And I wait "4000" milliseconds
- And I fill in "Title" with random string
- And I fill in "Description" with "Form Description"
- And I wait "2000" milliseconds
- And I click on id "formType"
- And I click on id "form_type_1"
- And I wait "2000" milliseconds
- And I click on id "role"
- And I click on id "role_1"
- And I click on id "isVisible"
- And I click on id "isRequired"
- And I click on id "isReadOnly"
- And I scroll "applications[0][type]" into view
- And I wait "2000" milliseconds
- And I click on id "applications[0][type]"
- And I click on id "application_form_type_3"
- And I wait "2000" milliseconds
- And I click on id "applications[0][application]"
- And I click on id "application_2"
- And I click on class "formPropertySaveBtn"
- And I wait "2000" milliseconds
- Then I should see random string
- And I should see "Get Started by clicking or dragging elements here"
- #FORM 173-175 (Form Types: Single Page, Tabular, Wizard)
- @javascript @createFormHappyTable
- Scenario Outline: Create Form - SHORT HAPPY PATH (Form Types: Single Page, Tabular, Wizard)
- Given I am an 'Admin'
- When I go to the Form Index page
- And I click on Span Text "Forms"
- And I click on class "createForm"
- And I wait "4000" milliseconds
- #Form Title & Description
- And I fill in "Title" with random string
- And I fill in "Description" with "Form Description"
- #Form Type
- And I wait "2000" milliseconds
- And I click on id "formType"
- And I click on id "<FormTypeOptions>"
- Examples:
- | FormTypeOptions |
- | form_type_1 |
- | form_type_2 |
- | form_type_3 |
- #Role Type
- And I wait "2000" milliseconds
- And I click on id "role"
- And I click on id "role_1"
- #Toggle Switches
- # And I click on id "isVisible"
- # And I click on id "isRequired"
- # And I click on id "isReadOnly"
- #Scroll Window Down
- And I scroll "applications[0][type]" into view
- #Application Type
- And I wait "2000" milliseconds
- And I click on id "applications[0][type]"
- And I click on id "application_form_type_3"
- And I wait "2000" milliseconds
- And I click on id "applications[0][application]"
- And I click on id "application_2"
- #Save
- And I click on class "formPropertySaveBtn"
- And I wait "2000" milliseconds
- Then I should see random string
- And I should see "Get Started by clicking or dragging elements here"
- #FORM-163 (CLOSED)
- #FORM-164 (Associate Form with a Client and Role)
- @javascript @createFormHappyTable
- Scenario Outline: Create Form - SHORT HAPPY PATH (Associate Form with a Client and Role)
- Given I am an 'Admin'
- When I go to the Form Index page
- And I click on Span Text "Forms"
- And I click on class "createForm"
- And I wait "4000" milliseconds
- #Form Title & Description
- And I fill in "Title" with random string
- And I fill in "Description" with "Form Description"
- #Form Type
- And I wait "2000" milliseconds
- And I click on id "formType"
- And I click on id "form_type_1"
- #Role Type
- And I wait "2000" milliseconds
- And I click on id "role"
- And I click on id "<RoleOptions>"
- Examples:
- | RoleOptions |
- | role_1 |
- | role_2 |
- | role_4 |
- #Toggle Switches
- # And I click on id "isVisible"
- # And I click on id "isRequired"
- # And I click on id "isReadOnly"
- #Scroll Window Down
- And I scroll "applications[0][type]" into view
- #Application Type
- And I wait "2000" milliseconds
- And I click on id "applications[0][type]"
- And I click on id "application_form_type_3"
- And I wait "2000" milliseconds
- And I click on id "applications[0][application]"
- And I click on id "application_2"
- #Save
- And I click on class "formPropertySaveBtn"
- And I wait "2000" milliseconds
- Then I should see random string
- And I should see "Get Started by clicking or dragging elements here"
- #FORM-165 (MISSING/CLOSED)
- #FORM-166 (CLOSED)
- #FORM-167 (Application Type: Request Change)
- @javascript @createForm
- Scenario: Create Form - SHORT HAPPY PATH (Application Type: Request Change)
- Given I am an 'Admin'
- When I go to the Form Index page
- And I click on Span Text "Forms"
- And I click on class "createForm"
- And I wait "4000" milliseconds
- #Form Title & Description
- And I fill in "Title" with random string
- And I fill in "Description" with "Form Description"
- #Form Type
- And I wait "2000" milliseconds
- And I click on id "formType"
- And I click on id "form_type_1"
- #Role Type
- And I wait "2000" milliseconds
- And I click on id "role"
- And I click on id "role_1"
- #Scroll Window Down
- And I scroll "applications[0][type]" into view
- #Application Type (Request Change)
- And I wait "2000" milliseconds
- And I click on id "applications[0][type]"
- And I click on id "application_form_type_1"
- And I wait "2000" milliseconds
- And I click on id "applications[0][application]"
- And I click on id "application_2"
- #Save
- And I click on class "formPropertySaveBtn"
- And I wait "2000" milliseconds
- Then I should see random string
- And I should see "Get Started by clicking or dragging elements here"
- #FORM-168 (Application Type: Live and Read-Only)
- @javascript @createForm
- Scenario: Create Form - SHORT HAPPY PATH (Application Type: Live and Read-Only)
- Given I am an 'Admin'
- When I go to the Form Index page
- And I click on Span Text "Forms"
- And I click on class "createForm"
- And I wait "4000" milliseconds
- #Form Title & Description
- And I fill in "Title" with random string
- And I fill in "Description" with "Form Description"
- #Form Type
- And I wait "2000" milliseconds
- And I click on id "formType"
- And I click on id "form_type_1"
- #Role Type
- And I wait "2000" milliseconds
- And I click on id "role"
- And I click on id "role_1"
- #Toggle Switches (Read-Only)
- And I click on id "isReadOnly"
- #Scroll Window Down
- And I scroll "applications[0][type]" into view
- #Application Type (Request Change)
- And I wait "2000" milliseconds
- And I click on id "applications[0][type]"
- And I click on id "application_form_type_2"
- And I wait "2000" milliseconds
- And I click on id "applications[0][application]"
- And I click on id "application_2"
- #Save
- And I click on class "formPropertySaveBtn"
- And I wait "2000" milliseconds
- Then I should see random string
- And I should see "Get Started by clicking or dragging elements here"
- #FORM-169 (Application Type: Live)
- @javascript @createForm
- Scenario: Create Form - SHORT HAPPY PATH (Application Type: Live)
- Given I am an 'Admin'
- When I go to the Form Index page
- And I click on Span Text "Forms"
- And I click on class "createForm"
- And I wait "4000" milliseconds
- #Form Title & Description
- And I fill in "Title" with random string
- And I fill in "Description" with "Form Description"
- #Form Type
- And I wait "2000" milliseconds
- And I click on id "formType"
- And I click on id "form_type_1"
- #Role Type
- And I wait "2000" milliseconds
- And I click on id "role"
- And I click on id "role_1"
- #Scroll Window Down
- And I scroll "applications[0][type]" into view
- #Application Type (Live)
- And I wait "2000" milliseconds
- And I click on id "applications[0][type]"
- And I click on id "application_form_type_2"
- And I wait "2000" milliseconds
- And I click on id "applications[0][application]"
- And I click on id "application_2"
- #Save
- And I click on class "formPropertySaveBtn"
- And I wait "2000" milliseconds
- Then I should see random string
- And I should see "Get Started by clicking or dragging elements here"
- #FORM-170 (Application Type: Instance(Live Until Complete))
- @javascript @createForm
- Scenario: Create Form - SHORT HAPPY PATH (Application Type: Instance(Live Until Complete))
- Given I am an 'Admin'
- When I go to the Form Index page
- And I click on Span Text "Forms"
- And I click on class "createForm"
- And I wait "4000" milliseconds
- #Form Title & Description
- And I fill in "Title" with random string
- And I fill in "Description" with "Form Description"
- #Form Type
- And I wait "2000" milliseconds
- And I click on id "formType"
- And I click on id "form_type_1"
- #Role Type
- And I wait "2000" milliseconds
- And I click on id "role"
- And I click on id "role_1"
- #Scroll Window Down
- And I scroll "applications[0][type]" into view
- #Application Type (Instance(Live Until Complete))
- And I wait "2000" milliseconds
- And I click on id "applications[0][type]"
- And I click on id "application_form_type_3"
- And I wait "2000" milliseconds
- And I click on id "applications[0][application]"
- And I click on id "application_2"
- #Save
- And I click on class "formPropertySaveBtn"
- And I wait "2000" milliseconds
- Then I should see random string
- And I should see "Get Started by clicking or dragging elements here"
- #FORM-171 (Application Type: Instance Only & Read-Only)
- @javascript @createForm
- Scenario: Create Form - SHORT HAPPY PATH (Application Type: Instance Only & Read-Only)
- Given I am an 'Admin'
- When I go to the Form Index page
- And I click on Span Text "Forms"
- And I click on class "createForm"
- And I wait "4000" milliseconds
- #Form Title & Description
- And I fill in "Title" with random string
- And I fill in "Description" with "Form Description"
- #Form Type
- And I wait "2000" milliseconds
- And I click on id "formType"
- And I click on id "form_type_1"
- #Role Type
- And I wait "2000" milliseconds
- And I click on id "role"
- And I click on id "role_1"
- #Toggle Switches (Read-Only)
- And I click on id "isReadOnly"
- #Scroll Window Down
- And I scroll "applications[0][type]" into view
- #Application Type (Instance Only)
- And I wait "2000" milliseconds
- And I click on id "applications[0][type]"
- And I click on id "application_form_type_4"
- And I wait "2000" milliseconds
- And I click on id "applications[0][application]"
- And I click on id "application_2"
- #Save
- And I click on class "formPropertySaveBtn"
- And I wait "2000" milliseconds
- Then I should see random string
- And I should see "Get Started by clicking or dragging elements here"
- #FORM-172 (Application Type: Instance Only)
- @javascript @createForm
- Scenario: Create Form - SHORT HAPPY PATH (Application Type: Instance Only)
- Given I am an 'Admin'
- When I go to the Form Index page
- And I click on Span Text "Forms"
- And I click on class "createForm"
- And I wait "4000" milliseconds
- #Form Title & Description
- And I fill in "Title" with random string
- And I fill in "Description" with "Form Description"
- #Form Type
- And I wait "2000" milliseconds
- And I click on id "formType"
- And I click on id "form_type_1"
- #Role Type
- And I wait "2000" milliseconds
- And I click on id "role"
- And I click on id "role_1"
- #Scroll Window Down
- And I scroll "applications[0][type]" into view
- #Application Type (Instance Only)
- And I wait "2000" milliseconds
- And I click on id "applications[0][type]"
- And I click on id "application_form_type_4"
- And I wait "2000" milliseconds
- And I click on id "applications[0][application]"
- And I click on id "application_2"
- #Save
- And I click on class "formPropertySaveBtn"
- And I wait "2000" milliseconds
- Then I should see random string
- And I should see "Get Started by clicking or dragging elements here"
- #FORM-456, 457, 458 (Set Form Default Required, Visible, and Read-Only Setting)
- @javascript @createForm
- Scenario: Create Form - SHORT HAPPY PATH (Set Form Default Required, Visible, and Read-Only Setting)
- Given I am an 'Admin'
- When I go to the Form Index page
- And I click on Span Text "Forms"
- And I click on class "createForm"
- And I wait "4000" milliseconds
- #Form Title & Description
- And I fill in "Title" with random string
- And I fill in "Description" with "Form Description"
- #Form Type
- And I wait "2000" milliseconds
- And I click on id "formType"
- And I click on id "form_type_1"
- #Role Type
- And I wait "2000" milliseconds
- And I click on id "role"
- And I click on id "role_1"
- #Toggle Switches (Required, Visible, and Read-Only)
- And I click on id "isVisible"
- And I click on id "isRequired"
- And I click on id "isReadOnly"
- #Scroll Window Down
- And I scroll "applications[0][type]" into view
- #Application Type (Instance Only)
- And I wait "2000" milliseconds
- And I click on id "applications[0][type]"
- And I click on id "application_form_type_1"
- And I wait "2000" milliseconds
- And I click on id "applications[0][application]"
- And I click on id "application_2"
- #Save
- And I click on class "formPropertySaveBtn"
- And I wait "2000" milliseconds
- Then I should see random string
- And I should see "Get Started by clicking or dragging elements here"
- #4xx Validation Issues
- @javascript @createForm
- Scenario: Create Form - Form Title Required
- Given I am an 'Admin'
- When I go to the Form Index page
- And I click on Span Text "Forms"
- And I click on class "createForm"
- And I wait "4000" milliseconds
- And I fill in "Title" with " "
- And I fill in "Description" with random string
- And I wait "2000" milliseconds
- And I click on id "formType"
- And I click on id "form_type_1"
- And I wait "2000" milliseconds
- And I click on id "role"
- And I click on id "role_1"
- And I scroll "applications[0][type]" into view
- And I wait "2000" milliseconds
- And I click on id "applications[0][type]"
- And I click on id "application_form_type_1"
- And I wait "2000" milliseconds
- And I click on id "applications[0][application]"
- And I click on id "application_2"
- And I click on class "formPropertySaveBtn"
- And I wait "2000" milliseconds
- Then I should see "The title field is required."
- @javascript @createForm
- Scenario: Create Form - Form Title exceeds 256 characters
- Given I am an 'Admin'
- When I go to the Form Index page
- And I click on Span Text "Forms"
- And I click on class "createForm"
- And I wait "4000" milliseconds
- And I fill in "Title" with more than "257" characters
- And I fill in "Description" with random string
- And I wait "2000" milliseconds
- And I click on id "formType"
- And I click on id "form_type_1"
- And I wait "2000" milliseconds
- And I click on id "role"
- And I click on id "role_1"
- And I scroll "applications[0][type]" into view
- And I wait "2000" milliseconds
- And I click on id "applications[0][type]"
- And I click on id "application_form_type_1"
- And I wait "2000" milliseconds
- And I click on id "applications[0][application]"
- And I click on id "application_2"
- And I click on class "formPropertySaveBtn"
- And I wait "2000" milliseconds
- Then I should see "The title may not be greater than 256 characters."
- @javascript @createForm
- Scenario: Create Form - Form Description exceeds 256 characters
- Given I am an 'Admin'
- When I go to the Form Index page
- And I click on Span Text "Forms"
- And I click on class "createForm"
- And I wait "4000" milliseconds
- And I fill in "Title" with random string
- And I fill in "Description" with more than "257" characters
- And I wait "2000" milliseconds
- And I click on id "formType"
- And I click on id "form_type_1"
- And I wait "2000" milliseconds
- And I click on id "role"
- And I click on id "role_1"
- And I scroll "applications[0][type]" into view
- And I wait "2000" milliseconds
- And I click on id "applications[0][type]"
- And I click on id "application_form_type_1"
- And I wait "2000" milliseconds
- And I click on id "applications[0][application]"
- And I click on id "application_2"
- And I click on class "formPropertySaveBtn"
- And I wait "2000" milliseconds
- Then I should see "The description may not be greater than 256 characters."
- @javascript @createForm
- Scenario: Create Form - Form Type Selection Required
- Given I am an 'Admin'
- When I go to the Form Index page
- And I click on Span Text "Forms"
- And I click on class "createForm"
- And I wait "4000" milliseconds
- And I fill in "Title" with random string
- And I fill in "Description" with random string
- And I wait "2000" milliseconds
- And I click on id "role"
- And I click on id "role_1"
- And I scroll "applications[0][type]" into view
- And I wait "2000" milliseconds
- And I click on id "applications[0][type]"
- And I click on id "application_form_type_1"
- And I wait "2000" milliseconds
- And I click on id "applications[0][application]"
- And I click on id "application_2"
- And I click on class "formPropertySaveBtn"
- And I wait "2000" milliseconds
- Then I should see "The form type id field is required."
- @javascript @createForm
- Scenario: Create Form - Role Selection Required
- Given I am an 'Admin'
- When I go to the Form Index page
- And I click on Span Text "Forms"
- And I click on class "createForm"
- And I wait "4000" milliseconds
- And I fill in "Title" with random string
- And I fill in "Description" with random string
- And I wait "2000" milliseconds
- And I click on id "formType"
- And I click on id "form_type_1"
- And I scroll "applications[0][type]" into view
- And I wait "2000" milliseconds
- And I click on id "applications[0][type]"
- And I click on id "application_form_type_1"
- And I wait "2000" milliseconds
- And I click on id "applications[0][application]"
- And I click on id "application_2"
- And I click on class "formPropertySaveBtn"
- And I wait "2000" milliseconds
- Then I should see "The role id field is required."
- @javascript @createForm
- Scenario: Create Form - Form Rule Title Required if Form Rule Description, Form Rule Type and Target used
- # Currently we don't have data in form.FormTarget table
- Given I am an 'Admin'
- When I go to the Form Index page
- And I click on Span Text "Forms"
- And I click on class "createForm"
- And I wait "4000" milliseconds
- And I fill in "Title" with random string
- And I fill in "Description" with random string
- And I wait "2000" milliseconds
- And I click on id "formType"
- And I click on id "form_type_1"
- And I wait "2000" milliseconds
- And I click on id "role"
- And I click on id "role_1"
- And I wait "2000" milliseconds
- And I fill in "rules[0][description]" with random string
- And I wait "2000" milliseconds
- And I click on id "rules[0][type]"
- And I click on id "ruleType_1"
- And I wait "2000" milliseconds
- # And I click on id "rules[0][target]"
- # And I click on id "target_1"
- And I scroll "applications[0][type]" into view
- And I wait "2000" milliseconds
- And I click on id "applications[0][type]"
- And I click on id "application_form_type_1"
- And I wait "2000" milliseconds
- And I click on id "applications[0][application]"
- And I click on id "application_2"
- And I click on class "formPropertySaveBtn"
- And I wait "2000" milliseconds
- Then I should see "Title"
- And I should see "Validation: Either parameter value is empty or parameter contains incorrect data type"
- @javascript @createForm
- Scenario: Create Form - Form Rule Title exceeds 256 characters if Form Rule Description, Form Rule Type and Target used
- Given I am an 'Admin'
- When I go to the Form Index page
- And I click on Span Text "Forms"
- And I click on class "createForm"
- And I wait "4000" milliseconds
- And I fill in "Title" with random string
- And I fill in "Description" with random string
- And I wait "2000" milliseconds
- And I click on id "formType"
- And I click on id "form_type_1"
- And I wait "2000" milliseconds
- And I click on id "role"
- And I click on id "role_1"
- And I wait "2000" milliseconds
- And I fill in "rules[0][title]" with more than "257" characters
- And I fill in "rules[0][description]" with random string
- And I scroll "applications[0][type]" into view
- And I wait "2000" milliseconds
- And I click on id "applications[0][type]"
- And I click on id "application_form_type_1"
- And I wait "2000" milliseconds
- And I click on id "applications[0][application]"
- And I click on id "application_2"
- And I click on class "formPropertySaveBtn"
- And I wait "2000" milliseconds
- Then I should see "Title"
- And I should see "Validation: Parameter length exceeds the maximum length"
- @javascript @createForm
- # fails if form.FormTarget table is empty
- Scenario: Create Form - Form Rule Description exceeds 1024 characters if Form Rule Title, Form Rule Type and Target used
- Given I am an 'Admin'
- When I go to the Form Index page
- And I click on Span Text "Forms"
- And I click on class "createForm"
- And I wait "4000" milliseconds
- And I fill in "Title" with random string
- And I fill in "Description" with random string
- And I wait "2000" milliseconds
- And I click on id "formType"
- And I click on id "form_type_1"
- And I wait "2000" milliseconds
- And I click on id "role"
- And I click on id "role_1"
- And I wait "2000" milliseconds
- And I fill in "rules[0][title]" with random string
- And I fill in "rules[0][description]" with more than "1025" characters
- And I click on id "rules[0][type]"
- And I click on id "ruleType_1"
- And I click on id "rules[0][target]"
- And I click on id "target_1"
- And I scroll "applications[0][type]" into view
- And I wait "2000" milliseconds
- And I click on id "applications[0][type]"
- And I click on id "application_form_type_1"
- And I wait "2000" milliseconds
- And I click on id "applications[0][application]"
- And I click on id "application_2"
- And I click on class "formPropertySaveBtn"
- And I wait "2000" milliseconds
- Then I should see "Description"
- And I should see "Validation: Parameter length exceeds the maximum length"
- @javascript @createForm
- Scenario: Create Form - Form Rule Type and Target Selection Required if Form Rule Title and Description used
- Given I am an 'Admin'
- When I go to the Form Index page
- And I click on Span Text "Forms"
- And I click on class "createForm"
- And I wait "4000" milliseconds
- And I fill in "Title" with random string
- And I fill in "Description" with random string
- And I wait "2000" milliseconds
- And I click on id "formType"
- And I click on id "form_type_1"
- And I wait "2000" milliseconds
- And I click on id "role"
- And I click on id "role_1"
- And I wait "2000" milliseconds
- And I fill in "rules[0][title]" with random string
- And I fill in "rules[0][description]" with random string
- And I scroll "applications[0][type]" into view
- And I wait "2000" milliseconds
- And I click on id "applications[0][type]"
- And I click on id "application_form_type_1"
- And I wait "2000" milliseconds
- And I click on id "applications[0][application]"
- And I click on id "application_2"
- And I click on class "formPropertySaveBtn"
- And I wait "2000" milliseconds
- Then I should see "FormRuleTypeId"
- And I should see "Validation: Either parameter value is empty or parameter contains incorrect data type"
- And I should see "FormTargetId"
- And I should see "Validation: Either parameter value is empty or parameter contains incorrect data type"
- @javascript @createForm
- Scenario: Create Form - Application Form Type Selection Required
- Given I am an 'Admin'
- When I go to the Form Index page
- And I click on Span Text "Forms"
- And I click on class "createForm"
- And I wait "4000" milliseconds
- And I fill in "Title" with random string
- And I fill in "Description" with random string
- And I wait "2000" milliseconds
- And I click on id "formType"
- And I click on id "form_type_1"
- And I wait "2000" milliseconds
- And I click on id "role"
- And I click on id "role_1"
- And I scroll "applications[0][type]" into view
- And I wait "2000" milliseconds
- And I click on id "applications[0][application]"
- And I click on id "application_2"
- And I click on class "formPropertySaveBtn"
- And I wait "2000" milliseconds
- Then I should see "AppFormTypeId"
- And I should see "Validation: Either parameter value is empty or parameter contains incorrect data type"
- @javascript @createForm
- Scenario: Create Form - Application Selection Required
- Given I am an 'Admin'
- When I go to the Form Index page
- And I click on Span Text "Forms"
- And I click on class "createForm"
- And I wait "4000" milliseconds
- And I fill in "Title" with random string
- And I fill in "Description" with random string
- And I wait "2000" milliseconds
- And I click on id "formType"
- And I click on id "form_type_1"
- And I wait "2000" milliseconds
- And I click on id "role"
- And I click on id "role_1"
- And I scroll "applications[0][type]" into view
- And I wait "2000" milliseconds
- And I click on id "applications[0][type]"
- And I click on id "application_form_type_1"
- And I click on class "formPropertySaveBtn"
- And I wait "2000" milliseconds
- Then I should see "ApplicationId"
- And I should see "Validation: Either parameter value is empty or parameter contains incorrect data type"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement