-
Notifications
You must be signed in to change notification settings - Fork 15
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
Showing
65 changed files
with
3,260 additions
and
4 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
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
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
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
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
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
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
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
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
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
21 changes: 21 additions & 0 deletions
21
spec/factories/admissions/factory_admission_application.rb
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,21 @@ | ||
# Copyright (c) Universidade Federal Fluminense (UFF). | ||
# This file is part of SAPOS. Please, consult the license terms in the LICENSE file. | ||
|
||
# Read about factories at https://github.com/thoughtbot/factory_bot | ||
|
||
# frozen_string_literal: true | ||
|
||
FactoryBot.define do | ||
factory :admission_application, class: Admissions::AdmissionApplication, aliases: [ | ||
"admissions/admission_application" | ||
] do | ||
name { "ana" } | ||
email { "[email protected]" } | ||
admission_process | ||
filled_form | ||
|
||
trait :in_process_with_letters do | ||
admission_process { create(:admission_process, :with_letter_template) } | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Copyright (c) Universidade Federal Fluminense (UFF). | ||
# This file is part of SAPOS. Please, consult the license terms in the LICENSE file. | ||
|
||
# Read about factories at https://github.com/thoughtbot/factory_bot | ||
|
||
# frozen_string_literal: true | ||
|
||
FactoryBot.define do | ||
factory :admission_committee, class: Admissions::AdmissionCommittee, aliases: [ | ||
"admissions/admission_committee" | ||
] do | ||
name { "Comitê" } | ||
end | ||
end |
15 changes: 15 additions & 0 deletions
15
spec/factories/admissions/factory_admission_committee_member.rb
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,15 @@ | ||
# Copyright (c) Universidade Federal Fluminense (UFF). | ||
# This file is part of SAPOS. Please, consult the license terms in the LICENSE file. | ||
|
||
# Read about factories at https://github.com/thoughtbot/factory_bot | ||
|
||
# frozen_string_literal: true | ||
|
||
FactoryBot.define do | ||
factory :admission_committee_member, class: Admissions::AdmissionCommitteeMember, aliases: [ | ||
"admissions/admission_committee_member" | ||
] do | ||
admission_committee | ||
user | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Copyright (c) Universidade Federal Fluminense (UFF). | ||
# This file is part of SAPOS. Please, consult the license terms in the LICENSE file. | ||
|
||
# Read about factories at https://github.com/thoughtbot/factory_bot | ||
|
||
# frozen_string_literal: true | ||
|
||
FactoryBot.define do | ||
factory :admission_pendency, class: Admissions::AdmissionPendency, aliases: [ | ||
"admissions/admission_pendency" | ||
] do | ||
admission_phase | ||
admission_application | ||
mode { Admissions::AdmissionPendency::SHARED } | ||
status { Admissions::AdmissionPendency::PENDENT } | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Copyright (c) Universidade Federal Fluminense (UFF). | ||
# This file is part of SAPOS. Please, consult the license terms in the LICENSE file. | ||
|
||
# Read about factories at https://github.com/thoughtbot/factory_bot | ||
|
||
# frozen_string_literal: true | ||
|
||
FactoryBot.define do | ||
factory :admission_phase, class: Admissions::AdmissionPhase, aliases: [ | ||
"admissions/admission_phase" | ||
] do | ||
# association :approval_condition, factory: form_condition | ||
# association :keep_in_phase_condition, factory: form_condition | ||
# association :consolidation_form, factory: form_template | ||
# association :candidate_form, factory: form_template | ||
name { "Fase 1" } | ||
can_edit_candidate { false } | ||
candidate_can_see_member { false } | ||
candidate_can_see_shared { false } | ||
candidate_can_see_consolidation { false } | ||
|
||
trait :with_member_form do | ||
member_form { create(:form_template) } | ||
end | ||
trait :with_shared_form do | ||
shared_form { create(:form_template) } | ||
end | ||
end | ||
end |
15 changes: 15 additions & 0 deletions
15
spec/factories/admissions/factory_admission_phase_committee.rb
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,15 @@ | ||
# Copyright (c) Universidade Federal Fluminense (UFF). | ||
# This file is part of SAPOS. Please, consult the license terms in the LICENSE file. | ||
|
||
# Read about factories at https://github.com/thoughtbot/factory_bot | ||
|
||
# frozen_string_literal: true | ||
|
||
FactoryBot.define do | ||
factory :admission_phase_committee, class: Admissions::AdmissionPhaseCommittee, aliases: [ | ||
"admissions/admission_phase_committee" | ||
] do | ||
admission_phase | ||
admission_committee | ||
end | ||
end |
17 changes: 17 additions & 0 deletions
17
spec/factories/admissions/factory_admission_phase_evaluation.rb
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 @@ | ||
# Copyright (c) Universidade Federal Fluminense (UFF). | ||
# This file is part of SAPOS. Please, consult the license terms in the LICENSE file. | ||
|
||
# Read about factories at https://github.com/thoughtbot/factory_bot | ||
|
||
# frozen_string_literal: true | ||
|
||
FactoryBot.define do | ||
factory :admission_phase_evaluation, class: Admissions::AdmissionPhaseEvaluation, aliases: [ | ||
"admissions/admission_phase_evaluation" | ||
] do | ||
admission_phase { create(:admission_phase, :with_member_form) } | ||
user | ||
admission_application | ||
filled_form | ||
end | ||
end |
17 changes: 17 additions & 0 deletions
17
spec/factories/admissions/factory_admission_phase_result.rb
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 @@ | ||
# Copyright (c) Universidade Federal Fluminense (UFF). | ||
# This file is part of SAPOS. Please, consult the license terms in the LICENSE file. | ||
|
||
# Read about factories at https://github.com/thoughtbot/factory_bot | ||
|
||
# frozen_string_literal: true | ||
|
||
FactoryBot.define do | ||
factory :admission_phase_result, class: Admissions::AdmissionPhaseResult, aliases: [ | ||
"admissions/admission_phase_result" | ||
] do | ||
admission_phase { create(:admission_phase, :with_shared_form) } | ||
admission_application | ||
filled_form | ||
mode { Admissions::AdmissionPhaseResult::SHARED } | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Copyright (c) Universidade Federal Fluminense (UFF). | ||
# This file is part of SAPOS. Please, consult the license terms in the LICENSE file. | ||
|
||
# Read about factories at https://github.com/thoughtbot/factory_bot | ||
|
||
# frozen_string_literal: true | ||
|
||
FactoryBot.define do | ||
factory :admission_process, class: Admissions::AdmissionProcess, aliases: [ | ||
"admissions/admission_process" | ||
] do | ||
name { "Mestrado 2024.1" } | ||
simple_url { "mestrado" } | ||
year { 2024 } | ||
semester { 1 } | ||
start_date { Date.parse("2024/01/01") } | ||
end_date { Date.parse("2024/02/01") } | ||
edit_date { Date.parse("2024/02/15") } | ||
form_template | ||
# letter_template | ||
min_letters { 0 } | ||
max_letters { 0 } | ||
allow_multiple_applications { false } | ||
visible { true } | ||
staff_can_edit { true } | ||
staff_can_undo { true } | ||
require_session { false } | ||
|
||
trait :with_letter_template do | ||
letter_template { create(:form_template, template_type: "Carta de Recomendação") } | ||
min_letters { nil } | ||
max_letters { nil } | ||
end | ||
end | ||
end |
15 changes: 15 additions & 0 deletions
15
spec/factories/admissions/factory_admission_process_phase.rb
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,15 @@ | ||
# Copyright (c) Universidade Federal Fluminense (UFF). | ||
# This file is part of SAPOS. Please, consult the license terms in the LICENSE file. | ||
|
||
# Read about factories at https://github.com/thoughtbot/factory_bot | ||
|
||
# frozen_string_literal: true | ||
|
||
FactoryBot.define do | ||
factory :admission_process_phase, class: Admissions::AdmissionProcessPhase, aliases: [ | ||
"admissions/admission_process_phase" | ||
] do | ||
admission_process | ||
admission_phase | ||
end | ||
end |
15 changes: 15 additions & 0 deletions
15
spec/factories/admissions/factory_admission_process_ranking.rb
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,15 @@ | ||
# Copyright (c) Universidade Federal Fluminense (UFF). | ||
# This file is part of SAPOS. Please, consult the license terms in the LICENSE file. | ||
|
||
# Read about factories at https://github.com/thoughtbot/factory_bot | ||
|
||
# frozen_string_literal: true | ||
|
||
FactoryBot.define do | ||
factory :admission_process_ranking, class: Admissions::AdmissionProcessRanking, aliases: [ | ||
"admissions/admission_process_ranking" | ||
] do | ||
ranking_config | ||
admission_process | ||
end | ||
end |
16 changes: 16 additions & 0 deletions
16
spec/factories/admissions/factory_admission_ranking_result.rb
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,16 @@ | ||
# Copyright (c) Universidade Federal Fluminense (UFF). | ||
# This file is part of SAPOS. Please, consult the license terms in the LICENSE file. | ||
|
||
# Read about factories at https://github.com/thoughtbot/factory_bot | ||
|
||
# frozen_string_literal: true | ||
|
||
FactoryBot.define do | ||
factory :admission_ranking_result, class: Admissions::AdmissionRankingResult, aliases: [ | ||
"admissions/admission_ranking_result" | ||
] do | ||
ranking_config | ||
admission_application | ||
filled_form | ||
end | ||
end |
22 changes: 22 additions & 0 deletions
22
spec/factories/admissions/factory_admission_report_column.rb
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,22 @@ | ||
# Copyright (c) Universidade Federal Fluminense (UFF). | ||
# This file is part of SAPOS. Please, consult the license terms in the LICENSE file. | ||
|
||
# Read about factories at https://github.com/thoughtbot/factory_bot | ||
|
||
# frozen_string_literal: true | ||
|
||
FactoryBot.define do | ||
factory :admission_report_column, class: Admissions::AdmissionReportColumn, aliases: [ | ||
"admissions/admission_report_column" | ||
] do | ||
admission_report_group | ||
name { "coluna" } | ||
before(:create) do |column| | ||
if !Admissions::FormField.field_name_exists?( | ||
column.name, in_main: true, in_letter: true | ||
) | ||
FactoryBot.create(:form_field, name: column.name) | ||
end | ||
end | ||
end | ||
end |
15 changes: 15 additions & 0 deletions
15
spec/factories/admissions/factory_admission_report_config.rb
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,15 @@ | ||
# Copyright (c) Universidade Federal Fluminense (UFF). | ||
# This file is part of SAPOS. Please, consult the license terms in the LICENSE file. | ||
|
||
# Read about factories at https://github.com/thoughtbot/factory_bot | ||
|
||
# frozen_string_literal: true | ||
|
||
FactoryBot.define do | ||
factory :admission_report_config, class: Admissions::AdmissionReportConfig, aliases: [ | ||
"admissions/admission_report_config" | ||
] do | ||
name { "Configuração de Relatório" } | ||
group_column_tabular { Admissions::AdmissionReportConfig::COLUMN } | ||
end | ||
end |
17 changes: 17 additions & 0 deletions
17
spec/factories/admissions/factory_admission_report_group.rb
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 @@ | ||
# Copyright (c) Universidade Federal Fluminense (UFF). | ||
# This file is part of SAPOS. Please, consult the license terms in the LICENSE file. | ||
|
||
# Read about factories at https://github.com/thoughtbot/factory_bot | ||
|
||
# frozen_string_literal: true | ||
|
||
FactoryBot.define do | ||
factory :admission_report_group, class: Admissions::AdmissionReportGroup, aliases: [ | ||
"admissions/admission_report_group" | ||
] do | ||
admission_report_config | ||
mode { Admissions::AdmissionReportGroup::MAIN } | ||
pdf_format { Admissions::AdmissionReportGroup::LIST } | ||
operation { Admissions::AdmissionReportGroup::INCLUDE } | ||
end | ||
end |
Oops, something went wrong.