-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
86d2525
commit 7709ca9
Showing
3 changed files
with
83 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,49 @@ | ||
Feature: Agent Create | ||
Background: | ||
Given an administrator user is logged in | ||
And the user is on Agents page | ||
And the user clicks on 'Create Agent' | ||
Scenario: Agent type Person is created | ||
When the user clicks on 'Person' in the dropdown menu | ||
And the user fills in 'Primary Part of Name' with 'Person Agent' in the 'Name Forms' form | ||
And the user clicks on 'Save' | ||
Then the 'Agent' created message is displayed | ||
And the user is on the agent_person edit page | ||
Scenario: Agent type Person is not created because required fields are missing | ||
When the user clicks on 'Person' in the dropdown menu | ||
And the user clicks on 'Save' | ||
Then the following error messages are displayed | ||
| Primary Part of Name - Property is required but was missing | | ||
Scenario: Agent type Family is created | ||
When the user clicks on 'Family' in the dropdown menu | ||
And the user fills in 'Family Name' with 'Family Agent' in the 'Name Forms' form | ||
And the user clicks on 'Save' | ||
Then the 'Agent' created message is displayed | ||
And the user is on the agent_family edit page | ||
Scenario: Agent type Family is not created because required fields are missing | ||
When the user clicks on 'Family' in the dropdown menu | ||
And the user clicks on 'Save' | ||
Then the following error messages are displayed | ||
| Family Name - Property is required but was missing | | ||
Scenario: Agent type Corporate Entity is created | ||
When the user clicks on 'Corporate Entity' in the dropdown menu | ||
And the user fills in 'Primary Part of Name' with 'Corporate Agent' in the 'Name Forms' form | ||
And the user clicks on 'Save' | ||
Then the 'Agent' created message is displayed | ||
And the user is on the agent_corporate_entity edit page | ||
Scenario: Agent type Corporate Entity is not created because required fields are missing | ||
When the user clicks on 'Corporate Entity' in the dropdown menu | ||
And the user clicks on 'Save' | ||
Then the following error messages are displayed | ||
| Primary Part of Name - Property is required but was missing | | ||
Scenario: Agent type Software is created | ||
When the user clicks on 'Software' in the dropdown menu | ||
And the user fills in 'Software Name' with 'Software Agent' in the 'Name Forms' form | ||
And the user clicks on 'Save' | ||
Then the 'Agent' created message is displayed | ||
And the user is on the agent_software edit page | ||
Scenario: Agent type Software is not created because required fields are missing | ||
When the user clicks on 'Software' in the dropdown menu | ||
And the user clicks on 'Save' | ||
Then the following error messages are displayed | ||
| Software Name - Property is required but was missing | | ||
|
||
Given an administrator user is logged in | ||
And the user clicks on 'Create' | ||
And the user hovers on 'Agent' in the dropdown menu | ||
Scenario: Agent Person is created | ||
When the user clicks on 'Person' | ||
And the user fills in 'Primary Part of Name' in the 'Name Forms' form | ||
And the user clicks on 'Save' | ||
Then the 'Agent' created message is displayed | ||
And the 'Primary Part of Name' has a unique value | ||
Scenario: Agent Person is not created because required fields are missing | ||
When the user clicks on 'Person' | ||
And the user clicks on 'Save' | ||
Then the following error messages are displayed | ||
| Primary Part of Name - Property is required but was missing | | ||
Scenario: Agent Family is created | ||
When the user clicks on 'Family' | ||
And the user fills in 'Family Name' in the 'Name Forms' form | ||
And the user clicks on 'Save' | ||
Then the 'Agent' created message is displayed | ||
And the 'Family Name' has a unique value | ||
Scenario: Agent Family is not created because required fields are missing | ||
When the user clicks on 'Family' | ||
And the user clicks on 'Save' | ||
Then the following error messages are displayed | ||
| Family Name - Property is required but was missing | | ||
Scenario: Agent Corporate Entity is created | ||
When the user clicks on 'Corporate Entity' | ||
And the user fills in 'Primary Part of Name' in the 'Name Forms' form | ||
And the user clicks on 'Save' | ||
Then the 'Agent' created message is displayed | ||
And the 'Primary Part of Name' has a unique value | ||
Scenario: Agent Corporate Entity is not created because required fields are missing | ||
When the user clicks on 'Corporate Entity' | ||
And the user clicks on 'Save' | ||
Then the following error messages are displayed | ||
| Primary Part of Name - Property is required but was missing | | ||
Scenario: Agent Software is created | ||
When the user clicks on 'Software' | ||
And the user fills in 'Software Name' in the 'Name Forms' form | ||
And the user clicks on 'Save' | ||
Then the 'Agent' created message is displayed | ||
And the 'Software Name' has a unique value | ||
Scenario: Agent Software is not created because required fields are missing | ||
When the user clicks on 'Software' | ||
And the user clicks on 'Save' | ||
Then the following error messages are displayed | ||
| Software Name - Property is required but was missing | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# frozen_string_literal: true | ||
|
||
Then 'the Agent form has the following values' do |form_values_table| | ||
form_values = form_values_table.hashes | ||
|
||
form_values.each do |row| | ||
section_title = find('h3', text: row['form_section']) | ||
section = section_title.ancestor('section', match: :first) | ||
expect(section[:id]).to_not eq nil | ||
|
||
within section do | ||
field = find_field(row['form_field']) | ||
|
||
expect(field.value.downcase).to eq row['form_value'].downcase | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters