diff --git a/app/models/submission.rb b/app/models/submission.rb
index b4ce0246..ff3ba4ba 100644
--- a/app/models/submission.rb
+++ b/app/models/submission.rb
@@ -33,7 +33,6 @@ class Submission < ApplicationRecord
belongs_to :challenge
belongs_to :phase, counter_cache: true
belongs_to :submitter, class_name: 'User'
- belongs_to :manager, class_name: 'User'
has_many :evaluator_submission_assignments, dependent: :destroy
has_many :evaluators, through: :evaluator_submission_assignments, class_name: "User"
has_many :evaluations, dependent: :destroy
diff --git a/app/views/phases/_submissions_stats.html.erb b/app/views/phases/_submissions_stats.html.erb
index 9ecadf12..72260580 100644
--- a/app/views/phases/_submissions_stats.html.erb
+++ b/app/views/phases/_submissions_stats.html.erb
@@ -11,9 +11,9 @@
<%= @submissions_count %>
-
+
Total Submissions
-
+
Evaluations due by <%= @phase.evaluation_form&.closing_date&.strftime('%m/%d/%Y') || "N/A" %>
@@ -26,15 +26,15 @@
<%= @submissions_by_status[:completed] || 0 %>
- Completed
+ Completed
- <%= @submissions_by_status[:in_progress] || 0 %>
- In Progress
+ <%= @submissions_by_status[:in_progress] || 0 %>
+ In Progress
<%= @submissions_by_status[:not_started] || 0 %>
- Not Started
+ Not Started
diff --git a/spec/factories/submission.rb b/spec/factories/submission.rb
index f1be95be..803994bf 100644
--- a/spec/factories/submission.rb
+++ b/spec/factories/submission.rb
@@ -4,7 +4,6 @@
association :challenge
association :phase
association :submitter, factory: :user
- association :manager, factory: :user
title { Faker::Lorem.sentence }
status { "draft" }
diff --git a/spec/models/evaluation_spec.rb b/spec/models/evaluation_spec.rb
index 04d66ee7..4c3d7d8f 100644
--- a/spec/models/evaluation_spec.rb
+++ b/spec/models/evaluation_spec.rb
@@ -18,7 +18,7 @@
RSpec.describe Evaluation, type: :model do
let(:user) { create(:user, :evaluator) }
- let(:submission) { create(:submission, manager: user) }
+ let(:submission) { create(:submission) }
let(:evaluator_submission_assignment) { create(:evaluator_submission_assignment, evaluator: user) }
let(:evaluation_form) { create(:evaluation_form) }
let(:evaluation) { create(:evaluation, user:, evaluation_form:, submission:, evaluator_submission_assignment:) }
diff --git a/spec/requests/submissions_spec.rb b/spec/requests/submissions_spec.rb
index 96a6ee85..e3904d1d 100644
--- a/spec/requests/submissions_spec.rb
+++ b/spec/requests/submissions_spec.rb
@@ -190,7 +190,7 @@
get submissions_phase_path(phase)
expect(response.body).to include("Boston Tea Party Cleanup")
# total submission count
- expect(response.body).to have_css("h3.text-primary", text: "Total Submissions")
+ expect(response.body).to have_css("h2.text-primary", text: "Total Submissions")
expect(response.body).to have_css("span.font-sans-3xl.text-primary.text-bold", text: "2")
# selected to advance
expect(response.body).to have_css("span.text-primary", text: "1 of 2")
@@ -229,9 +229,9 @@
expect(response.body).to have_css("[data-submission-id='#{submission.id}']")
end
- expect(response.body).to have_css('.text-secondary-dark.text-bold', text: '2') # not_started, eligible
- expect(response.body).to have_css('.text-orange.text-bold', text: '1') # in_progress
- expect(response.body).to have_css('.text-green.text-bold', text: '2') # completed, selected
+ expect(response.body).to have_css('.text-secondary-dark.text-bold', text: '2') # not_started, eligible
+ expect(response.body).to have_css('.text-accent-warm-dark.text-bold', text: '1') # in_progress
+ expect(response.body).to have_css('.text-green.text-bold', text: '2') # completed, selected
end
context 'when filtering submissions' do
diff --git a/spec/system/submission_details_spec.rb b/spec/system/submission_details_spec.rb
index c10e3962..7e89fbda 100644
--- a/spec/system/submission_details_spec.rb
+++ b/spec/system/submission_details_spec.rb
@@ -7,7 +7,7 @@
let(:user) { create_user(role: "challenge_manager") }
let(:challenge) { create_challenge(user: user, title: "Boston Tea Party Cleanup") }
let(:phase) { create(:phase, challenge: challenge) }
- let(:submission) { create(:submission, challenge:, phase:, manager: user, status: "submitted") }
+ let(:submission) { create(:submission, challenge:, phase:, status: "submitted") }
let(:fake_comments) { Faker::Lorem.sentence }
before do
diff --git a/spec/system/submissions_spec.rb b/spec/system/submissions_spec.rb
index c6a55575..37299056 100644
--- a/spec/system/submissions_spec.rb
+++ b/spec/system/submissions_spec.rb
@@ -11,14 +11,14 @@
it "manage submissions by challenge phase page is accessible with one challenge" do
challenge = create_challenge(user: user, title: "Boston Tea Party Cleanup")
phase = create_phase(challenge_id: challenge.id)
- create(:submission, manager: user, challenge: challenge, phase: phase)
+ create(:submission, challenge: challenge, phase: phase)
visit submissions_phase_path(phase)
expect(user.role).to eq("challenge_manager")
expect(page).to have_content("Boston Tea Party Cleanup")
expect(page).to have_content("Total Submissions")
# commenting out for now, switch this back on soon
- # expect(page).to(be_axe_clean)
+ expect(page).to(be_axe_clean)
end
end
end