kuality-coeus 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -0,0 +1,61 @@
|
|
1
|
+
class IPCostSharingObject
|
2
|
+
|
3
|
+
include Foundry
|
4
|
+
include DataFactory
|
5
|
+
include StringFactory
|
6
|
+
include Navigation
|
7
|
+
|
8
|
+
attr_accessor :project_period, :percentage, :type,
|
9
|
+
:source_account, :amount, :index
|
10
|
+
|
11
|
+
def initialize(browser, opts={})
|
12
|
+
@browser = browser
|
13
|
+
|
14
|
+
defaults = {
|
15
|
+
project_period: '1',
|
16
|
+
percentage: '100.00',
|
17
|
+
type: '::random::',
|
18
|
+
source_account: random_alphanums,
|
19
|
+
amount: random_dollar_value(1000)
|
20
|
+
}
|
21
|
+
set_options(defaults.merge(opts))
|
22
|
+
end
|
23
|
+
|
24
|
+
def create
|
25
|
+
view
|
26
|
+
on Distribution do |page|
|
27
|
+
page.expand_all
|
28
|
+
page.add_cost_share_project_period.set @project_period
|
29
|
+
page.add_cost_share_type.pick! @type
|
30
|
+
page.add_cost_share_percentage.set @percentage
|
31
|
+
page.add_cost_share_source_account.set @source_account
|
32
|
+
page.add_cost_share_amount.set @amount
|
33
|
+
page.add_cost_share
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def view
|
38
|
+
# Note: Currently assumes we're already viewing
|
39
|
+
# the institutional proposal!
|
40
|
+
on(InstitutionalProposal).distribution
|
41
|
+
end
|
42
|
+
|
43
|
+
def edit(opts)
|
44
|
+
view
|
45
|
+
on Distribution do |page|
|
46
|
+
page.expand_all
|
47
|
+
#TODO: Add this code
|
48
|
+
page.save
|
49
|
+
end
|
50
|
+
update_options(opts)
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
54
|
+
|
55
|
+
class IPCostSharingCollection < CollectionsFactory
|
56
|
+
|
57
|
+
contains IPCostSharingObject
|
58
|
+
|
59
|
+
#TODO: Write code that will update indexes when items change their order in the list.
|
60
|
+
|
61
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
class ProjectPersonnelObject
|
2
|
+
|
3
|
+
include Foundry
|
4
|
+
include DataFactory
|
5
|
+
|
6
|
+
attr_accessor :full_name, :first_name, :last_name, :role, :lead_unit,
|
7
|
+
:units, :faculty, :total_effort, :academic_year_effort,
|
8
|
+
:summer_effort, :calendar_year_effort, :responsibility,
|
9
|
+
:recognition, :financial, :space, :project_role, :principal_name
|
10
|
+
|
11
|
+
def initialize(browser, opts={})
|
12
|
+
@browser = browser
|
13
|
+
|
14
|
+
defaults = {
|
15
|
+
units: []
|
16
|
+
}
|
17
|
+
|
18
|
+
set_options(defaults.merge(opts))
|
19
|
+
end
|
20
|
+
|
21
|
+
# Note: This currently only has support for adding
|
22
|
+
# employees, not non-employees.
|
23
|
+
def create
|
24
|
+
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
|
29
|
+
class ProjectPersonnelCollection < CollectionsFactory
|
30
|
+
|
31
|
+
contains ProjectPersonnelObject
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
class IPUnrecoveredFAObject
|
2
|
+
|
3
|
+
include Foundry
|
4
|
+
include DataFactory
|
5
|
+
include StringFactory
|
6
|
+
include DateFactory
|
7
|
+
include Navigation
|
8
|
+
|
9
|
+
attr_accessor :fiscal_year, :rate_type, :applicable_rate,
|
10
|
+
:on_campus_contract, :source_account, :amount
|
11
|
+
|
12
|
+
def initialize(browser, opts={})
|
13
|
+
@browser = browser
|
14
|
+
|
15
|
+
defaults = {
|
16
|
+
fiscal_year: right_now[:year],
|
17
|
+
rate_type: '::random::',
|
18
|
+
on_campus_contract: :set,
|
19
|
+
source_account: random_alphanums,
|
20
|
+
amount: random_dollar_value(1000)
|
21
|
+
}
|
22
|
+
set_options(defaults.merge(opts))
|
23
|
+
end
|
24
|
+
|
25
|
+
def create
|
26
|
+
view
|
27
|
+
on Distribution do |page|
|
28
|
+
page.expand_all
|
29
|
+
page.add_unrec_f_a_fiscal_year.set @fiscal_year
|
30
|
+
page.add_rate_type.pick! @rate_type
|
31
|
+
page.add_fa_applicable_rate.fit @applicable_rate
|
32
|
+
page.add_fa_campus_flag.fit @on_campus_contract
|
33
|
+
page.add_fa_source_account.set @source_account
|
34
|
+
page.add_fa_amount.set @amount
|
35
|
+
page.add_unrecovered_f_a
|
36
|
+
page.save
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def view
|
41
|
+
# Note: Currently assumes we're already viewing
|
42
|
+
# the institutional proposal!
|
43
|
+
on(InstitutionalProposal).distribution
|
44
|
+
end
|
45
|
+
|
46
|
+
def edit(opts)
|
47
|
+
view
|
48
|
+
on Distribution do |page|
|
49
|
+
page.expand_all
|
50
|
+
#TODO: Add this code
|
51
|
+
page.save
|
52
|
+
end
|
53
|
+
update_options(opts)
|
54
|
+
end
|
55
|
+
|
56
|
+
end
|
57
|
+
|
58
|
+
class IPUnrecoveredFACollection < CollectionsFactory
|
59
|
+
|
60
|
+
contains IPUnrecoveredFAObject
|
61
|
+
|
62
|
+
#TODO: Write code that will update indexes when items change their order in the list.
|
63
|
+
|
64
|
+
end
|
@@ -0,0 +1,89 @@
|
|
1
|
+
class BudgetColumnObject
|
2
|
+
|
3
|
+
include Foundry
|
4
|
+
include DataFactory
|
5
|
+
include StringFactory
|
6
|
+
include Navigation
|
7
|
+
|
8
|
+
attr_accessor :name, :has_lookup, :lookup_argument, :lookup_return
|
9
|
+
|
10
|
+
def initialize(browser, opts={})
|
11
|
+
@browser = browser
|
12
|
+
|
13
|
+
defaults = {
|
14
|
+
name: '::random::',
|
15
|
+
has_lookup: :set,
|
16
|
+
lookup_argument: '::random::',
|
17
|
+
lookup_return: '::random::'
|
18
|
+
}
|
19
|
+
|
20
|
+
set_options(defaults.merge(opts))
|
21
|
+
end
|
22
|
+
|
23
|
+
def create
|
24
|
+
if exists?
|
25
|
+
edit has_lookup: @has_lookup, lookup_argument: @lookup_argument,
|
26
|
+
lookup_return: @lookup_return
|
27
|
+
else
|
28
|
+
on(BudgetColumnsToAlterLookup).create
|
29
|
+
on BudgetColumnToAlter do |create|
|
30
|
+
create.description.set random_alphanums
|
31
|
+
# Note: can't use fill_out here because field
|
32
|
+
# selection can't be in a random order.
|
33
|
+
create.name.pick! @name
|
34
|
+
create.has_lookup.fit @has_lookup
|
35
|
+
create.lookup_argument.pick! @lookup_argument
|
36
|
+
create.lookup_return.pick! @lookup_return
|
37
|
+
create.blanket_approve
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
def view(in_class=false)
|
43
|
+
if in_class
|
44
|
+
# add navigation code here, because we're using this method outside
|
45
|
+
# of the class methods
|
46
|
+
end
|
47
|
+
on(BudgetColumnsToAlterLookup).edit_first_item
|
48
|
+
end
|
49
|
+
|
50
|
+
def edit opts={}
|
51
|
+
view(true)
|
52
|
+
on BudgetColumnToAlter do |edit|
|
53
|
+
edit.description.set random_alphanums
|
54
|
+
edit.has_lookup.fit opts[:has_lookup]
|
55
|
+
edit.lookup_argument.pick! opts[:lookup_argument]
|
56
|
+
edit.lookup_return.pick! opts[:lookup_return]
|
57
|
+
edit.blanket_approve
|
58
|
+
end
|
59
|
+
update_options opts
|
60
|
+
end
|
61
|
+
|
62
|
+
def exists?
|
63
|
+
# TODO: This will need to be made more robust at some point because not every user will have permissions
|
64
|
+
# To keep it simple for now, just be sure this code is run very early in scenarios.
|
65
|
+
$users.admin.log_in if $users.current_user==nil
|
66
|
+
visit Maintenance do |page|
|
67
|
+
if Login.new(@browser).username.present?
|
68
|
+
UserObject.new(@browser).log_in
|
69
|
+
end
|
70
|
+
page.budget_editable_columns
|
71
|
+
end
|
72
|
+
on BudgetColumnsToAlterLookup do |look|
|
73
|
+
look.column_name.select @name
|
74
|
+
look.search
|
75
|
+
|
76
|
+
begin
|
77
|
+
if look.results_table.present?
|
78
|
+
return true
|
79
|
+
else
|
80
|
+
return false
|
81
|
+
end
|
82
|
+
rescue
|
83
|
+
return false
|
84
|
+
end
|
85
|
+
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
end
|
@@ -31,6 +31,18 @@ module Navigation
|
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
34
|
+
def window_cleanup
|
35
|
+
on BasePage do |page|
|
36
|
+
if page.windows.size > 1 && page.portal_window.exists?
|
37
|
+
page.return_to_portal
|
38
|
+
page.close_children
|
39
|
+
elsif page.windows.size > 1
|
40
|
+
page.use_new_tab
|
41
|
+
page.close_parents
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
34
46
|
# Use in the #create method of your data objects for filling out
|
35
47
|
# fields. This method eliminates the need to write repetitive
|
36
48
|
# lines of code, with one line for every field needing to be
|
@@ -19,7 +19,7 @@ class KeyPersonObject
|
|
19
19
|
defaults = {
|
20
20
|
role: 'Principal Investigator',
|
21
21
|
units: [],
|
22
|
-
degrees:
|
22
|
+
degrees: collection('Degrees'),
|
23
23
|
certified: true, # Set this to false if you do not want any Proposal Person Certification Questions answered
|
24
24
|
certify_info_true: 'Y',
|
25
25
|
potential_for_conflict: 'Y',
|
@@ -36,6 +36,7 @@ class KeyPersonObject
|
|
36
36
|
|
37
37
|
def create
|
38
38
|
navigate
|
39
|
+
# TODO: Add support for non-employee personnel...
|
39
40
|
on(KeyPersonnel).employee_search
|
40
41
|
if @last_name==nil
|
41
42
|
on PersonLookup do |look|
|
@@ -176,9 +177,7 @@ class KeyPersonObject
|
|
176
177
|
def add_degree_info opts={}
|
177
178
|
defaults = { document_id: @document_id,
|
178
179
|
person: @full_name }
|
179
|
-
|
180
|
-
degree.create
|
181
|
-
@degrees << degree
|
180
|
+
@degrees.add defaults.merge(opts)
|
182
181
|
end
|
183
182
|
|
184
183
|
def delete
|
@@ -241,7 +240,9 @@ class KeyPersonObject
|
|
241
240
|
|
242
241
|
end # KeyPersonObject
|
243
242
|
|
244
|
-
class KeyPersonnelCollection <
|
243
|
+
class KeyPersonnelCollection < CollectionsFactory
|
244
|
+
|
245
|
+
contains KeyPersonObject
|
245
246
|
|
246
247
|
def names
|
247
248
|
self.collect { |person| person.full_name }
|
@@ -18,7 +18,7 @@ class PersonnelAttachmentObject
|
|
18
18
|
requires :document_id, :file_name
|
19
19
|
end
|
20
20
|
|
21
|
-
def
|
21
|
+
def create
|
22
22
|
navigate
|
23
23
|
on AbstractsAndAttachments do |attach|
|
24
24
|
attach.expand_all
|
@@ -39,8 +39,8 @@ class PersonnelAttachmentObject
|
|
39
39
|
|
40
40
|
end
|
41
41
|
|
42
|
-
class PersonnelAttachmentsCollection <
|
43
|
-
|
42
|
+
class PersonnelAttachmentsCollection < CollectionsFactory
|
44
43
|
|
44
|
+
contains PersonnelAttachmentObject
|
45
45
|
|
46
46
|
end
|
@@ -12,7 +12,7 @@ class ProposalAttachmentObject
|
|
12
12
|
requires :document_id, :type, :file_name
|
13
13
|
end
|
14
14
|
|
15
|
-
def
|
15
|
+
def create
|
16
16
|
navigate
|
17
17
|
on AbstractsAndAttachments do |attach|
|
18
18
|
attach.expand_all
|
@@ -34,8 +34,8 @@ class ProposalAttachmentObject
|
|
34
34
|
|
35
35
|
end
|
36
36
|
|
37
|
-
class ProposalAttachmentsCollection <
|
38
|
-
|
37
|
+
class ProposalAttachmentsCollection < CollectionsFactory
|
39
38
|
|
39
|
+
contains ProposalAttachmentObject
|
40
40
|
|
41
41
|
end
|
@@ -29,26 +29,18 @@ class ProposalDevelopmentObject
|
|
29
29
|
sponsor_deadline_date: next_week[:date_w_slashes],
|
30
30
|
mail_by: '::random::',
|
31
31
|
mail_type: '::random::',
|
32
|
-
key_personnel:
|
33
|
-
special_review:
|
34
|
-
budget_versions:
|
35
|
-
personnel_attachments:
|
36
|
-
proposal_attachments:
|
32
|
+
key_personnel: collection('KeyPersonnel'),
|
33
|
+
special_review: collection('SpecialReview'),
|
34
|
+
budget_versions: collection('BudgetVersions'),
|
35
|
+
personnel_attachments: collection('PersonnelAttachments'),
|
36
|
+
proposal_attachments: collection('ProposalAttachments')
|
37
37
|
}
|
38
38
|
|
39
39
|
set_options(defaults.merge(opts))
|
40
40
|
end
|
41
41
|
|
42
42
|
def create
|
43
|
-
|
44
|
-
if page.windows.size > 1 && page.portal_window.exists?
|
45
|
-
page.return_to_portal
|
46
|
-
page.close_children
|
47
|
-
elsif page.windows.size > 1
|
48
|
-
page.use_new_tab
|
49
|
-
page.close_parents
|
50
|
-
end
|
51
|
-
end
|
43
|
+
window_cleanup
|
52
44
|
visit(Researcher).create_proposal
|
53
45
|
on Proposal do |doc|
|
54
46
|
@doc_header=doc.doc_title
|
@@ -84,7 +76,7 @@ class ProposalDevelopmentObject
|
|
84
76
|
end
|
85
77
|
|
86
78
|
def add_key_person opts={}
|
87
|
-
@key_personnel
|
79
|
+
@key_personnel.add merge_settings(opts)
|
88
80
|
end
|
89
81
|
# This alias is recommended only for when
|
90
82
|
# using this method with no options.
|
@@ -123,12 +115,12 @@ class ProposalDevelopmentObject
|
|
123
115
|
end
|
124
116
|
|
125
117
|
def add_special_review opts={}
|
126
|
-
@special_review
|
118
|
+
@special_review.add merge_settings(opts)
|
127
119
|
end
|
128
120
|
|
129
121
|
def add_budget_version opts={}
|
130
122
|
opts[:version] ||= (@budget_versions.size+1).to_s
|
131
|
-
@budget_versions
|
123
|
+
@budget_versions.add merge_settings(opts)
|
132
124
|
end
|
133
125
|
|
134
126
|
def add_custom_data opts={}
|
@@ -136,17 +128,11 @@ class ProposalDevelopmentObject
|
|
136
128
|
end
|
137
129
|
|
138
130
|
def add_proposal_attachment opts={}
|
139
|
-
merge_settings(opts)
|
140
|
-
p_a = make ProposalAttachmentObject, opts
|
141
|
-
p_a.add
|
142
|
-
@proposal_attachments << p_a
|
131
|
+
@proposal_attachments.add merge_settings(opts)
|
143
132
|
end
|
144
133
|
|
145
134
|
def add_personnel_attachment opts={}
|
146
|
-
merge_settings(opts)
|
147
|
-
p_a = make PersonnelAttachmentObject, opts
|
148
|
-
p_a.add
|
149
|
-
@personnel_attachments << p_a
|
135
|
+
@personnel_attachments.add merge_settings(opts)
|
150
136
|
end
|
151
137
|
|
152
138
|
def complete_s2s_questionnaire opts={}
|
@@ -167,14 +153,22 @@ class ProposalDevelopmentObject
|
|
167
153
|
proposal_type: @proposal_type,
|
168
154
|
activity_type: @activity_type,
|
169
155
|
project_title: @project_title,
|
170
|
-
project_personnel: Marshal::load(Marshal.dump(@key_personnel)),
|
171
156
|
special_review: Marshal::load(Marshal.dump(@special_review)),
|
172
157
|
custom_data: Marshal::load(Marshal.dump(@custom_data))
|
173
|
-
|
158
|
+
@key_personnel.each do |person|
|
159
|
+
project_person = make ProjectPersonnelObject, full_name: person[:full_name],
|
160
|
+
first_name: person[:first_name], last_name: person[:last_name],
|
161
|
+
lead_unit: person[:home_unit], role: person[:role],
|
162
|
+
project_role: person[:key_person_role], units: person[:units],
|
163
|
+
responsibility: person[:responsibility], space: person[:space],
|
164
|
+
financial: person[:financial], recognition: person[:recognition]
|
165
|
+
ip.project_personnel << project_person
|
166
|
+
end
|
167
|
+
# TODO: Add more here as needed...
|
174
168
|
end
|
175
169
|
|
176
170
|
def delete
|
177
|
-
|
171
|
+
view 'Proposal Actions'
|
178
172
|
on(ProposalActions).delete_proposal
|
179
173
|
on(Confirmation).yes
|
180
174
|
# Have to update the data object's status value
|
@@ -198,6 +192,10 @@ class ProposalDevelopmentObject
|
|
198
192
|
@status=on(Proposal).document_status
|
199
193
|
end
|
200
194
|
|
195
|
+
def reject
|
196
|
+
# TODO - Coeus is buggy right now
|
197
|
+
end
|
198
|
+
|
201
199
|
def close
|
202
200
|
open_proposal
|
203
201
|
on(Proposal).close
|
@@ -213,7 +211,7 @@ class ProposalDevelopmentObject
|
|
213
211
|
def submit(type=:s)
|
214
212
|
types={:s=>:submit, :ba=>:blanket_approve,
|
215
213
|
:to_sponsor=>:submit_to_sponsor, :to_s2s=>:submit_to_s2s}
|
216
|
-
|
214
|
+
view 'Proposal Actions'
|
217
215
|
on(ProposalActions).send(types[type])
|
218
216
|
if type==:to_sponsor
|
219
217
|
on NotificationEditor do |page|
|
@@ -244,6 +242,7 @@ class ProposalDevelopmentObject
|
|
244
242
|
on(Proposal).save
|
245
243
|
end
|
246
244
|
|
245
|
+
# TODO: Make this private. Step defs should use #view!
|
247
246
|
def open_proposal
|
248
247
|
open_document @doc_header
|
249
248
|
end
|
@@ -289,11 +288,6 @@ class ProposalDevelopmentObject
|
|
289
288
|
end
|
290
289
|
end
|
291
290
|
|
292
|
-
def proposal_actions
|
293
|
-
open_proposal
|
294
|
-
on(Proposal).proposal_actions
|
295
|
-
end
|
296
|
-
|
297
291
|
def prep(object_class, opts)
|
298
292
|
merge_settings(opts)
|
299
293
|
object = make object_class, opts
|