kuality-coeus 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/Gemfile +1 -1
- data/Gemfile.lock +2 -2
- data/features/grants_gov/grants_gov_forms/code_and_form_mapping.feature +1 -1
- data/features/grants_gov/grants_gov_forms/s2s_questionnaire.feature +8 -12
- data/features/grants_gov/s2s_submission.feature +7 -4
- data/features/grants_gov/s2s_validation.feature +3 -3
- data/features/proposal_development/create_proposal.feature +2 -9
- data/features/proposal_development/key_personnel_validations.feature +1 -7
- data/features/proposal_development/proposal_permissions.feature +1 -28
- data/features/proposal_development/proposal_workflow.feature +1 -7
- data/features/roles/roles.feature +14 -0
- data/features/step_definitions/awards/create_award.rb +15 -0
- data/features/step_definitions/budget_versions/budget_versions.rb +8 -1
- data/features/step_definitions/grants_gov/s2s_submission.rb +2 -2
- data/features/step_definitions/groups.rb +13 -0
- data/features/step_definitions/maintenance.rb +7 -0
- data/features/step_definitions/proposal_development/budget_versions.rb +98 -0
- data/features/step_definitions/proposal_development/edit_proposal.rb +4 -0
- data/features/step_definitions/proposal_development/key_personnel_validations.rb +7 -7
- data/features/step_definitions/proposal_development/proposal_permissions.rb +20 -2
- data/features/step_definitions/proposal_logs/create_proposal_log.rb +13 -0
- data/features/step_definitions/protocol_development/irb_create_protocol.rb +28 -0
- data/features/step_definitions/roles.rb +17 -0
- data/features/step_definitions/users.rb +42 -7
- data/features/support/env.rb +16 -1
- data/kuality-coeus.gemspec +2 -2
- data/lib/kuality-coeus.rb +1 -0
- data/lib/kuality-coeus/data_objects/award/award.rb +13 -14
- data/lib/kuality-coeus/data_objects/award/award_transaction.rb +3 -1
- data/lib/kuality-coeus/data_objects/budget/budget_periods.rb +17 -3
- data/lib/kuality-coeus/data_objects/budget/budget_versions.rb +9 -12
- data/lib/kuality-coeus/data_objects/budget/cost_sharing.rb +56 -0
- data/lib/kuality-coeus/data_objects/budget/personnel.rb +3 -3
- data/lib/kuality-coeus/data_objects/budget/subaward_budget.rb +2 -2
- data/lib/kuality-coeus/data_objects/committee_document/committee_document.rb +2 -2
- data/lib/kuality-coeus/data_objects/committee_document/committee_members.rb +4 -2
- data/lib/kuality-coeus/data_objects/committee_document/committee_schedule.rb +3 -1
- data/lib/kuality-coeus/data_objects/committee_document/member_roles.rb +3 -1
- data/lib/kuality-coeus/data_objects/compliance_and_protocol/irb_protocol_development.rb +86 -0
- data/lib/kuality-coeus/data_objects/identity/group.rb +22 -8
- data/lib/kuality-coeus/{page_objects/identity/assignee.rb → data_objects/identity/group_assignee.rb} +4 -4
- data/lib/kuality-coeus/data_objects/identity/role.rb +124 -0
- data/lib/kuality-coeus/data_objects/identity/role_assignee.rb +43 -0
- data/lib/kuality-coeus/data_objects/institutional_proposal/institutional_proposal.rb +87 -4
- data/lib/kuality-coeus/data_objects/institutional_proposal/ip_cost_sharing.rb +61 -0
- data/lib/kuality-coeus/data_objects/institutional_proposal/project_personnel.rb +35 -0
- data/lib/kuality-coeus/data_objects/institutional_proposal/unrecovered_fa.rb +64 -0
- data/lib/kuality-coeus/data_objects/maintenance/budget_column.rb +89 -0
- data/lib/kuality-coeus/data_objects/navigation.rb +12 -0
- data/lib/kuality-coeus/data_objects/proposal_development/degrees.rb +2 -2
- data/lib/kuality-coeus/data_objects/proposal_development/key_personnel.rb +6 -5
- data/lib/kuality-coeus/data_objects/proposal_development/personnel_attachments.rb +3 -3
- data/lib/kuality-coeus/data_objects/proposal_development/proposal_attachments.rb +3 -3
- data/lib/kuality-coeus/data_objects/proposal_development/proposal_development.rb +28 -34
- data/lib/kuality-coeus/data_objects/proposal_development/special_review.rb +3 -1
- data/lib/kuality-coeus/data_objects/proposal_log/proposal_log.rb +73 -0
- data/lib/kuality-coeus/data_objects/rates/institute_rate.rb +1 -0
- data/lib/kuality-coeus/data_objects/{user.rb → user/user.rb} +164 -146
- data/lib/kuality-coeus/data_objects/user/user_group.rb +36 -0
- data/lib/kuality-coeus/data_objects/user/user_role.rb +45 -0
- data/lib/kuality-coeus/page_objects/000_base_page.rb +27 -6
- data/lib/kuality-coeus/page_objects/budget/distribution_income.rb +14 -0
- data/lib/kuality-coeus/page_objects/central_admin.rb +2 -3
- data/lib/kuality-coeus/page_objects/identity/group.rb +2 -2
- data/lib/kuality-coeus/page_objects/identity/person.rb +7 -3
- data/lib/kuality-coeus/page_objects/identity/role.rb +38 -0
- data/lib/kuality-coeus/page_objects/institute_rates_maintenance.rb +18 -0
- data/lib/kuality-coeus/page_objects/institutional_proposal/institutional_proposal.rb +2 -0
- data/lib/kuality-coeus/page_objects/kc_protocol.rb +2 -0
- data/lib/kuality-coeus/page_objects/login.rb +1 -1
- data/lib/kuality-coeus/page_objects/lookup_pages/000_lookups.rb +1 -0
- data/lib/kuality-coeus/page_objects/lookup_pages/award_lookup.rb +5 -0
- data/lib/kuality-coeus/page_objects/lookup_pages/award_status_lookup.rb +5 -0
- data/lib/kuality-coeus/page_objects/lookup_pages/budget_columns_to_alter_lookup.rb +7 -0
- data/lib/kuality-coeus/page_objects/lookup_pages/campus_lookup.rb +10 -0
- data/lib/kuality-coeus/page_objects/lookup_pages/campus_type_lookup.rb +6 -0
- data/lib/kuality-coeus/page_objects/lookup_pages/group_lookup.rb +2 -0
- data/lib/kuality-coeus/page_objects/lookup_pages/institutional_proposal_lookup.rb +9 -0
- data/lib/kuality-coeus/page_objects/lookup_pages/institutional_proposal_person_lookup.rb +3 -0
- data/lib/kuality-coeus/page_objects/lookup_pages/kim_type_lookup.rb +6 -0
- data/lib/kuality-coeus/page_objects/lookup_pages/proposal_development_document_lookup.rb +5 -0
- data/lib/kuality-coeus/page_objects/lookup_pages/proposal_log_lookup.rb +5 -0
- data/lib/kuality-coeus/page_objects/lookup_pages/proposal_status_lookup.rb +5 -0
- data/lib/kuality-coeus/page_objects/lookup_pages/proposal_type_lookup.rb +5 -0
- data/lib/kuality-coeus/page_objects/lookup_pages/research_areas_lookup.rb +5 -0
- data/lib/kuality-coeus/page_objects/lookup_pages/role_lookup.rb +2 -2
- data/lib/kuality-coeus/page_objects/lookup_pages/sponsor_type_lookup.rb +6 -0
- data/lib/kuality-coeus/page_objects/lookup_pages/unit_lookup.rb +2 -0
- data/lib/kuality-coeus/page_objects/maintenance.rb +1 -1
- data/lib/kuality-coeus/page_objects/maintenance/budget_column_to_alter.rb +12 -0
- data/lib/kuality-coeus/page_objects/proposal_development/proposal_actions.rb +9 -0
- data/lib/kuality-coeus/page_objects/proposal_development/s2s.rb +1 -1
- data/lib/kuality-coeus/page_objects/proposal_log/proposal_log.rb +23 -0
- data/lib/kuality-coeus/page_objects/protocol/protocol_actions.rb +7 -0
- data/lib/kuality-coeus/page_objects/protocol/protocol_overview.rb +55 -0
- data/lib/kuality-coeus/page_objects/researcher.rb +1 -1
- data/lib/kuality-coeus/page_objects/system_admin.rb +1 -1
- data/lib/kuality-coeus/utilities.rb +8 -1
- metadata +45 -10
- data/features/proposal_development/special_review_validations.feature +0 -12
- data/features/step_definitions/delete_proposals.rb +0 -9
- data/features/step_definitions/test.rb +0 -12
- data/features/test.feature +0 -8
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
MmI0OGVlNGE1YzE0MDJiYzFkMjBjMzBhZWE5NmIwMDExNGIxNjRlYg==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
YmVhZTk2Y2M3YjI4MmU4MGJjZDQ5MzJlZTQ4ZTcwMzNiMDI5MTQ5Mw==
|
|
7
7
|
!binary "U0hBNTEy":
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
MDc2OTIxMTQwODBlYmE0ODUxNTkyOGYxMjRmOWJhOTIzODFhOWRjMmViMmQx
|
|
10
|
+
NTk5MjgzNmM0N2EwZjdmOWRkMWExMTc3MjM0MzVkZWU5YmU3MmQ1Mjg3NjE1
|
|
11
|
+
ZTg5NWZmOTVlNTIwZWIwNmNhMmJjZGM5NWE4YmE4NzUxMTUxYzc=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
YTkzNGFmOWE4YjFiNzlkNmRiMGNhYWViMDc5YjkwMTcxYjI3NjA4ZDNkZDJh
|
|
14
|
+
NDAwOTY2ZjQ5MjEzOWNmYTQ4Y2YxNDIxMjRiMDM3MzUzNDM3MTQ0ODZlODRh
|
|
15
|
+
ZjNiMTU1OThmZDUxMjBkODUxYjJjYmE0MDBjMzc0M2IzOTA1YzQ=
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -30,7 +30,7 @@ GEM
|
|
|
30
30
|
multi_json (~> 1.0)
|
|
31
31
|
rubyzip
|
|
32
32
|
websocket (~> 1.0.4)
|
|
33
|
-
test-factory (0.
|
|
33
|
+
test-factory (0.3.1)
|
|
34
34
|
watir-webdriver (>= 0.6.2)
|
|
35
35
|
watir-webdriver (0.6.4)
|
|
36
36
|
selenium-webdriver (>= 2.18.0)
|
|
@@ -42,5 +42,5 @@ PLATFORMS
|
|
|
42
42
|
DEPENDENCIES
|
|
43
43
|
cucumber
|
|
44
44
|
rspec
|
|
45
|
-
test-factory (>= 0.1
|
|
45
|
+
test-factory (>= 0.3.1)
|
|
46
46
|
watir-webdriver (>= 0.6.4)
|
|
@@ -11,7 +11,7 @@ Feature: Opportunity Code and S2S Form Mapping
|
|
|
11
11
|
Given a user exists with the system role: 'Proposal Creator'
|
|
12
12
|
And I log in with the Proposal Creator user
|
|
13
13
|
And initiate a proposal with NIH as the sponsor
|
|
14
|
-
|
|
14
|
+
|
|
15
15
|
Scenario Outline: Selecting opportunities brings different forms
|
|
16
16
|
Given I initiate a proposal with NIH as the sponsor
|
|
17
17
|
When I add the Grants.Gov opportunity id of <Opportunity> to the proposal
|
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
Feature: S2S Questionnaire Population and Functionality
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
As a proposal creator, I want to create proposals with the relevant set of
|
|
4
|
+
questions available to be answered.
|
|
5
|
+
|
|
6
|
+
Background: Logged in with a proposal creator; have other necessary users
|
|
4
7
|
Given a user exists with the system role: 'Proposal Creator'
|
|
5
8
|
And a user exists that can be a PI for Grants.gov proposals
|
|
6
9
|
And an AOR user exists
|
|
7
10
|
And I log in with the Proposal Creator user
|
|
8
11
|
|
|
9
12
|
Scenario: Initiate a proposal with PHS forms attached
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
Scenario: Attach the PHS Fellowship and Training forms, and complete the questionnaires
|
|
16
|
-
Given I initiate a proposal with NIH as the sponsor
|
|
17
|
-
And add the Grants.Gov opportunity id of PA-B2-ALL to the proposal
|
|
18
|
-
When I attach the PHS training and fellowship forms to the proposal
|
|
19
|
-
And complete their respective questionnaires
|
|
20
|
-
Then the questionnaire titles should indicate that the questionnaires have been completed
|
|
13
|
+
Given I initiate a proposal with NIH as the sponsor
|
|
14
|
+
And add the Grants.Gov opportunity id of PA-B2-ALL to the proposal
|
|
15
|
+
When I attach the PHS training and fellowship forms to the proposal
|
|
16
|
+
Then the PHS training and fellowship questionnaires should appear in the proposal
|
|
@@ -15,12 +15,12 @@ Feature: Submitting Proposals via s2s to Grants.gov
|
|
|
15
15
|
And add the <Provider> user as the proposal's PI
|
|
16
16
|
And set valid credit splits for the proposal
|
|
17
17
|
And add and mark complete all the required attachments
|
|
18
|
-
And create
|
|
18
|
+
And create a final and complete budget version for the proposal
|
|
19
19
|
And complete the required custom fields on the proposal
|
|
20
20
|
And answer the S2S questions
|
|
21
21
|
And submit the proposal
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
When I log in with the AOR user
|
|
23
|
+
And submit the proposal to S2S
|
|
24
24
|
Then the S2S tab's submission details will say the proposal is submitted
|
|
25
25
|
And within a couple minutes the submission status will be updated
|
|
26
26
|
|
|
@@ -30,4 +30,7 @@ Feature: Submitting Proposals via s2s to Grants.gov
|
|
|
30
30
|
| Grants.Gov | NIH | RR-FORMFAMILY-009-2010 |
|
|
31
31
|
| Grants.Gov | DOD-Agency | CAL-TEST-DOD2 |
|
|
32
32
|
| Grants.Gov | DOD-Agency | CSS-120809-SF424RR-V12 |
|
|
33
|
-
| Grants.Gov | NASA - Washington | RR-FORMFAMILY-004-2010 |
|
|
33
|
+
| Grants.Gov | NASA - Washington | RR-FORMFAMILY-004-2010 |
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Feature: Validating content of s2s proposals
|
|
2
2
|
|
|
3
|
-
As
|
|
4
|
-
|
|
3
|
+
As a Proposal creator for federal grant money, I want to ensure my
|
|
4
|
+
proposals are free of errors, prior to submission
|
|
5
5
|
|
|
6
6
|
Background: Logged in with a proposal creator; initiate a proposal for grants.gov
|
|
7
7
|
Given a user exists with the system role: 'Proposal Creator'
|
|
@@ -33,4 +33,4 @@ Feature: Validating content of s2s proposals
|
|
|
33
33
|
Scenario: Resubmission proposal type selected inappropriately
|
|
34
34
|
Given I set the proposal type to either 'Resubmission', 'Renewal', or 'Continuation'
|
|
35
35
|
When I activate a validation check
|
|
36
|
-
Then one of the validation errors should say that the prior award number is required
|
|
36
|
+
Then one of the validation errors should say that the prior award number is required
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Feature: Creating
|
|
1
|
+
Feature: Creating a proposal development document
|
|
2
2
|
|
|
3
3
|
As a researcher I want the ability to create a proposal,
|
|
4
4
|
so that I can get funding for my research.
|
|
@@ -6,7 +6,7 @@ Feature: Creating proposals
|
|
|
6
6
|
Background: Logged in with a proposal creator user
|
|
7
7
|
Given a user exists with the system role: 'Proposal Creator'
|
|
8
8
|
And I log in with the Proposal Creator user
|
|
9
|
-
|
|
9
|
+
|
|
10
10
|
Scenario: Attempt to save a proposal missing a required field
|
|
11
11
|
When I initiate a proposal but miss a required field
|
|
12
12
|
Then I should see an error that says the field is required
|
|
@@ -18,10 +18,3 @@ Feature: Creating proposals
|
|
|
18
18
|
Scenario: Successful initiation of proposal with federal sponsor type
|
|
19
19
|
When I initiate a proposal with a 'Federal' sponsor type
|
|
20
20
|
Then The S2S tab should become available
|
|
21
|
-
|
|
22
|
-
Scenario: Successful submission of a Private Profit proposal document into routing
|
|
23
|
-
When I complete a valid simple proposal for a 'Private Profit' organization
|
|
24
|
-
And submit the proposal
|
|
25
|
-
Then The proposal should immediately have a status of 'Approval Pending'
|
|
26
|
-
And The proposal route log's 'Actions Taken' should include 'COMPLETED'
|
|
27
|
-
And The proposal's 'Future Action Requests' should include 'PENDING APPROVE' for the principal investigator
|
|
@@ -33,10 +33,4 @@ Feature: Key Personnel Validations
|
|
|
33
33
|
|
|
34
34
|
Scenario: Error when adding a key person with an invalid unit
|
|
35
35
|
When I add a key person with an invalid unit type
|
|
36
|
-
Then a key personnel error should say to select a valid unit
|
|
37
|
-
|
|
38
|
-
Scenario: Error when adding the same user as a PI and Co-Investigator
|
|
39
|
-
Given a user exists with the system role: 'Unassigned'
|
|
40
|
-
When I add the Unassigned user as a Principal Investigator to the key personnel proposal roles
|
|
41
|
-
And I add the Unassigned user as a Co-Investigator to the key personnel proposal roles
|
|
42
|
-
Then there should be an error that says the Unassigned user already holds investigator role
|
|
36
|
+
Then a key personnel error should say to select a valid unit
|
|
@@ -46,31 +46,4 @@ Feature: Permissions in a Proposal
|
|
|
46
46
|
| Narrative Writer |
|
|
47
47
|
| Aggregator |
|
|
48
48
|
| approver |
|
|
49
|
-
| Delete Proposal |
|
|
50
|
-
|
|
51
|
-
Scenario Outline: Users who are assigned the Aggregator role cannot be assigned additional roles
|
|
52
|
-
Given a user exists with the system role: '<Role>'
|
|
53
|
-
And I assign the <Role> user as an aggregator in the proposal permissions
|
|
54
|
-
When I attempt to add an additional proposal role to the <Role> user
|
|
55
|
-
Then there should be an error message that says not to select other roles alongside aggregator
|
|
56
|
-
|
|
57
|
-
Examples:
|
|
58
|
-
| Role |
|
|
59
|
-
| Unassigned |
|
|
60
|
-
| Proposal Creator |
|
|
61
|
-
|
|
62
|
-
Scenario Outline: Users with the appropriate permissions can edit proposals that have been recalled for revisions
|
|
63
|
-
Given a user exists with the system role: 'Unassigned'
|
|
64
|
-
And assign the Unassigned user as a <Role> in the proposal permissions
|
|
65
|
-
And complete the proposal
|
|
66
|
-
And submit the proposal
|
|
67
|
-
When I recall the proposal
|
|
68
|
-
Then the Unassigned user can access the proposal
|
|
69
|
-
And their proposal permissions allow them to <Permissions>
|
|
70
|
-
|
|
71
|
-
Examples:
|
|
72
|
-
| Role | Permissions |
|
|
73
|
-
| Aggregator | edit all parts of the proposal |
|
|
74
|
-
| Budget Creator | only update the budget |
|
|
75
|
-
| Delete Proposal | delete the proposal |
|
|
76
|
-
| Viewer | only read the proposal |
|
|
49
|
+
| Delete Proposal |
|
|
@@ -4,9 +4,6 @@ Feature: Proposal Workflows and Routing
|
|
|
4
4
|
take actions against a proposal that will navigate it through various routes
|
|
5
5
|
in workflow.
|
|
6
6
|
|
|
7
|
-
#=================
|
|
8
|
-
# Proposal Actions
|
|
9
|
-
#=================
|
|
10
7
|
Scenario Outline: Proposal is successfully routed to PI for action
|
|
11
8
|
Given users exist with the following roles: OSPApprover, Proposal Creator, Unassigned
|
|
12
9
|
And I log in with the Proposal Creator user
|
|
@@ -55,7 +52,7 @@ Feature: Proposal Workflows and Routing
|
|
|
55
52
|
And I submit a new development proposal into routing
|
|
56
53
|
When I blanket approve the proposal
|
|
57
54
|
Then the proposal status should be Approval Granted
|
|
58
|
-
|
|
55
|
+
|
|
59
56
|
Scenario: Aggregator successfully recalls a routed proposal
|
|
60
57
|
Given a user exists with the system role: 'Proposal Creator'
|
|
61
58
|
And I log in with the Proposal Creator user
|
|
@@ -63,9 +60,6 @@ Feature: Proposal Workflows and Routing
|
|
|
63
60
|
When I recall the proposal
|
|
64
61
|
Then the proposal status should be Revisions Requested
|
|
65
62
|
|
|
66
|
-
#=================
|
|
67
|
-
# Notifications
|
|
68
|
-
#=================
|
|
69
63
|
Scenario: Successful delivery of an FYI from a development proposal
|
|
70
64
|
Given users exist with the following roles: Proposal Creator, OSPApprover
|
|
71
65
|
And I log in with the Proposal Creator user
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Feature: Roles Administration
|
|
2
|
+
|
|
3
|
+
As an administrator, I want to be able to set up
|
|
4
|
+
roles in the system, so that I can control what
|
|
5
|
+
the system users can do.
|
|
6
|
+
|
|
7
|
+
Scenario: Adding an unassigned user to a Group in a Proposal Aggregator Role
|
|
8
|
+
Given I'm in as the admin
|
|
9
|
+
And I create a group
|
|
10
|
+
And create an 'unassigned' user
|
|
11
|
+
And create a role with permission to create proposals
|
|
12
|
+
And add the group to the role
|
|
13
|
+
When I add the user to the group
|
|
14
|
+
Then the user should be able to create a proposal
|
|
@@ -1,3 +1,18 @@
|
|
|
1
1
|
When /^I? ?create an award for the institutional_proposal$/ do
|
|
2
2
|
@award = create AwardObject, funding_proposal: @institutional_proposal.proposal_number
|
|
3
|
+
end
|
|
4
|
+
|
|
5
|
+
When /^I? ?initiate an award document$/ do
|
|
6
|
+
@award = create AwardObject
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
When /^I ? ?initiate an award document with a missing required field$/ do
|
|
10
|
+
@required_field = ['Description', 'Transaction Type', 'Award Status', 'Award Title',
|
|
11
|
+
'Activity Type', 'Award Type', 'Project Start Date', 'Project End Date',
|
|
12
|
+
'Lead Unit', 'Obligation Start Date', 'Obligation End Date',
|
|
13
|
+
'Anticipated Amount', 'Obligated Amount', 'Transactions'
|
|
14
|
+
].sample
|
|
15
|
+
@required_field=~/Type/ ? value='select' : value=''
|
|
16
|
+
field = snake_case(@required_field)
|
|
17
|
+
@proposal = create AwardObject, field=>value
|
|
3
18
|
end
|
|
@@ -17,7 +17,7 @@ When /^correcting the Budget Version date will remove the warning$/ do
|
|
|
17
17
|
on(Parameters).warnings.size.should be 0
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
Given /^I? ?create
|
|
20
|
+
Given /^I? ?create a final and complete budget version for the proposal$/ do
|
|
21
21
|
@proposal.add_budget_version status: 'Complete', final: :set
|
|
22
22
|
end
|
|
23
23
|
|
|
@@ -100,3 +100,10 @@ end
|
|
|
100
100
|
Then /^I see an error that only one version can be final$/ do
|
|
101
101
|
on(BudgetVersions).errors.should include 'Only one Budget Version can be marked "Final".'
|
|
102
102
|
end
|
|
103
|
+
|
|
104
|
+
When /^I? ?create a budget version with cost sharing for the proposal$/ do
|
|
105
|
+
@proposal.add_budget_version
|
|
106
|
+
@budget_version = @proposal.budget_versions[0]
|
|
107
|
+
@budget_version.edit_period(1, cost_sharing: random_dollar_value(1000000).to_f)
|
|
108
|
+
@budget_version.budget_periods.period(1).cost_sharing_distribution_list[0].edit source_account: random_alphanums
|
|
109
|
+
end
|
|
@@ -12,14 +12,14 @@ end
|
|
|
12
12
|
Then /^within a couple minutes the submission status will be updated$/ do
|
|
13
13
|
on S2S do |page|
|
|
14
14
|
x = 0
|
|
15
|
-
while page.
|
|
15
|
+
while page.s2s_submission_status=='Submitted to S2S'
|
|
16
16
|
sleep 5
|
|
17
17
|
page.refresh_submission_details
|
|
18
18
|
x += 1
|
|
19
19
|
break if x == 24
|
|
20
20
|
end
|
|
21
21
|
# We don't care what it is. Only that it's updated...
|
|
22
|
-
page.
|
|
22
|
+
page.s2s_submission_status.should_not == 'Submitted to S2S'
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
25
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
When /^I? ?create a group$/ do
|
|
2
|
+
@group = create GroupObject
|
|
3
|
+
end
|
|
4
|
+
|
|
5
|
+
When /^I? ?add the user to the group$/ do
|
|
6
|
+
# Note that this step is assuming you're adding the user that was
|
|
7
|
+
# last created in the scenario...
|
|
8
|
+
@group.add_assignee member_identifier: $users[-1].principal_id
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
Given /^I? ?add the group to the user$/ do
|
|
12
|
+
$users[-1].add_group id: @group.id
|
|
13
|
+
end
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Given /^the Budget Column's '(.*)' has a lookup for '(.*)' that returns '(.*)'$/ do |name, look, ret|
|
|
2
|
+
create BudgetColumnObject, name: name, lookup_argument: look, lookup_return: ret
|
|
3
|
+
end
|
|
4
|
+
|
|
5
|
+
Given /^the Budget Editable Column's include '(.*)'$/ do |column|
|
|
6
|
+
create BudgetColumnObject, name: column
|
|
7
|
+
end
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
When /^I? ?create a budget version for the proposal$/ do
|
|
2
|
+
@proposal.add_budget_version
|
|
3
|
+
@budget_version = @proposal.budget_versions[0]
|
|
4
|
+
end
|
|
5
|
+
|
|
6
|
+
Then /^opening the Budget Version will display a warning about the date change$/ do
|
|
7
|
+
@budget_version.open_budget
|
|
8
|
+
on(Parameters).warnings.should include 'The Project Start and/or End Dates have changed from the previous version of this budget. Please update the Project Start and/or End Dates.'
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
When /^correcting the Budget Version date will remove the warning$/ do
|
|
12
|
+
@budget_version.default_periods
|
|
13
|
+
on(Parameters).warnings.size.should be 0
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
Given /^I? ?create, finalize, and mark complete a budget version for the proposal$/ do
|
|
17
|
+
@proposal.add_budget_version(status: 'Complete', final: :set)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
When /^I? ?copy the budget version \(all periods\)$/ do
|
|
21
|
+
@copied_budget_version = @proposal.budget_versions.copy_all_periods(@budget_version.name, random_alphanums)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
When /^I? ?enter dollar amounts for all the budget periods$/ do
|
|
25
|
+
@budget_version.budget_periods.each do |p|
|
|
26
|
+
randomized_values = {}
|
|
27
|
+
p.dollar_fields[1..-1].each { |f| randomized_values.store(f, random_dollar_value(500000)) }
|
|
28
|
+
p.edit randomized_values
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
Then /^the copied budget's values are all as expected$/ do
|
|
33
|
+
@copied_budget_version.open_budget
|
|
34
|
+
@copied_budget_version.budget_periods.each do |period|
|
|
35
|
+
on Parameters do |page|
|
|
36
|
+
page.start_date_period(period.number).value.should==period.start_date
|
|
37
|
+
page.end_date_period(period.number).value.should==period.end_date
|
|
38
|
+
page.total_sponsor_cost_period(period.number).value.should==(period.direct_cost+period.f_and_a_cost).commas
|
|
39
|
+
page.direct_cost_period(period.number).value.should==period.direct_cost.commas
|
|
40
|
+
page.fa_cost_period(period.number).value.should==period.f_and_a_cost.commas
|
|
41
|
+
page.unrecovered_fa_period(period.number).value.should==period.unrecovered_f_and_a.commas
|
|
42
|
+
page.cost_sharing_period(period.number).value.should==period.cost_sharing.commas
|
|
43
|
+
page.cost_limit_period(period.number).value.should==period.cost_limit.commas
|
|
44
|
+
page.direct_cost_limit_period(period.number).value.should==period.direct_cost_limit.commas
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
When /^I? ?delete one of the budget periods$/ do
|
|
50
|
+
@budget_version.delete_period(rand(@budget_version.budget_periods.size)+1)
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
When /^I? ?change the date range for one of the periods$/ do
|
|
54
|
+
period = @budget_version.budget_periods.sample
|
|
55
|
+
new_start_date = '03'+period.start_date[/\/\d+\/\d+$/]
|
|
56
|
+
new_end_date = '10'+period.end_date[/\/\d+\/\d+$/]
|
|
57
|
+
period.edit start_date: new_start_date, end_date: new_end_date
|
|
58
|
+
on(Confirmation).yes
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
When /^I? ?select the default periods for the budget version$/ do
|
|
62
|
+
@budget_version.default_periods
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
Then /^all budget periods get recreated, zeroed, and given default date ranges$/ do
|
|
66
|
+
default_start_dates={1=>@proposal.project_start_date}
|
|
67
|
+
default_end_dates={@years=>@proposal.project_end_date}
|
|
68
|
+
1.upto(@years-1) do |i|
|
|
69
|
+
default_start_dates.store(i+1, "01/01/#{@proposal.project_start_date[/\d+$/].to_i+i}")
|
|
70
|
+
default_end_dates.store(@years-i, "12/31/#{@proposal.project_end_date[/\d+$/].to_i-i}")
|
|
71
|
+
end
|
|
72
|
+
on(Parameters).period_count.should==@years
|
|
73
|
+
on Parameters do |page|
|
|
74
|
+
1.upto(@years) do |x|
|
|
75
|
+
page.start_date_period(x).value.should==default_start_dates[x]
|
|
76
|
+
page.end_date_period(x).value.should==default_end_dates[x]
|
|
77
|
+
page.total_sponsor_cost_period(x).value.should=='0.00'
|
|
78
|
+
page.direct_cost_period(x).value.should=='0.00'
|
|
79
|
+
page.fa_cost_period(x).value.should=='0.00'
|
|
80
|
+
page.unrecovered_fa_period(x).value.should=='0.00'
|
|
81
|
+
page.cost_sharing_period(x).value.should=='0.00'
|
|
82
|
+
page.cost_limit_period(x).value.should=='0.00'
|
|
83
|
+
page.direct_cost_limit_period(x).value.should=='0.00'
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
When /^I? ?finalize the budget version$/ do
|
|
89
|
+
@budget_version.edit final: :set
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
When /^I? ?mark the budget version complete$/ do
|
|
93
|
+
@budget_version.edit status: 'Complete'
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
Then /^I see an error that only one version can be final$/ do
|
|
97
|
+
on(BudgetVersions).errors.should include 'Only one Budget Version can be marked "Final".'
|
|
98
|
+
end
|
|
@@ -2,6 +2,10 @@ When /^I? ?recall the proposal$/ do
|
|
|
2
2
|
@proposal.recall
|
|
3
3
|
end
|
|
4
4
|
|
|
5
|
+
When /^I? ?reject the proposal$/ do
|
|
6
|
+
@proposal.reject
|
|
7
|
+
end
|
|
8
|
+
|
|
5
9
|
When /^I? ?complete a valid simple proposal for a '(.*)' organization$/ do |org|
|
|
6
10
|
@proposal = create ProposalDevelopmentObject, sponsor_type_code: org
|
|
7
11
|
@proposal.add_principal_investigator
|
|
@@ -6,7 +6,10 @@ end
|
|
|
6
6
|
|
|
7
7
|
When /^I? ?add (.*) as a Key Person with a role of (.*)$/ do |user_name, kp_role|
|
|
8
8
|
user = get(user_name)
|
|
9
|
-
@proposal.add_key_person first_name: user.first_name,
|
|
9
|
+
@proposal.add_key_person first_name: user.first_name,
|
|
10
|
+
last_name: user.last_name,
|
|
11
|
+
role: 'Key Person',
|
|
12
|
+
key_person_role: kp_role
|
|
10
13
|
end
|
|
11
14
|
|
|
12
15
|
And /^I? ?add a (.*) with a (.*) credit split of (.*)$/ do |role, cs_type, amount|
|
|
@@ -28,7 +31,9 @@ When /^I? ?add a co-investigator without a unit$/ do
|
|
|
28
31
|
end
|
|
29
32
|
|
|
30
33
|
When /^I? ?add a key person with an invalid unit type$/ do
|
|
31
|
-
@proposal.add_key_person role: 'Key Person',
|
|
34
|
+
@proposal.add_key_person role: 'Key Person',
|
|
35
|
+
key_person_role: 'king',
|
|
36
|
+
units: [{number: 'invalid'}]
|
|
32
37
|
end
|
|
33
38
|
|
|
34
39
|
Then /^a key personnel error should say (.*)$/ do |error|
|
|
@@ -73,11 +78,6 @@ end
|
|
|
73
78
|
When /^the (.*) user approves the proposal$/ do |role|
|
|
74
79
|
get(role).sign_in
|
|
75
80
|
@proposal.open_proposal
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
sleep 20
|
|
79
|
-
|
|
80
|
-
|
|
81
81
|
on(ProposalSummary).approve
|
|
82
82
|
on(Confirmation).yes
|
|
83
83
|
end
|