-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
760 acknowledge page #786
760 acknowledge page #786
Conversation
bf0bdb0
to
c971db0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few small things. Everything else looks good.
<%= form.input :sig_4, label: false, placeholder: I18n.t("graduate.submission.acknowledge.initial") %> | ||
<%= form.label :sig_5, I18n.t("graduate.submission.acknowledge.point5", degree_type: @degree_type) %> | ||
<%= form.input :sig_5, label: false, placeholder: I18n.t("graduate.submission.acknowledge.initial") %> | ||
<%= form.label :sig_5, I18n.t("graduate.submission.acknowledge.point6") %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be :sig_6
. I think this affects the id of the rendered html element.
@@ -0,0 +1,5 @@ | |||
class AddAcknowledgementPageToSubmission < ActiveRecord::Migration[6.1] | |||
def change | |||
add_column :submissions, :acknowledgment_page_viewed_at, :datetime |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a major issue, so this is more of a suggestion, but I think :acknowledgment_page_submitted_at
would be better here. Just so it's clear that the timestamp is set after submission. I've found (particularly since returning to ETDA) that being precise with the timestamp name can help to remember exactly when it should be set.
c971db0
to
caf6f80
Compare
caf6f80
to
53a65fd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a couple of suggestions below. Otherwise looking good.
<%= form.input :sig_6, label: false, placeholder: I18n.t("graduate.submission.acknowledge.initial") %> | ||
<%= form.label :sig_7, I18n.t("graduate.submission.acknowledge.point7") %> | ||
<%= form.input :sig_7, label: false, placeholder: I18n.t("graduate.submission.acknowledge.initial") %> | ||
<%= form.button :submit, class: "btn-primary", value: "Submit", disabled: @is_good %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious about the disabled: @is_good
. Does that need to be there? I might be missing something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's my mistake...it's leftover from an earlier experiment I was trying. I'll remove it.
db/schema.rb
Outdated
@@ -301,6 +301,8 @@ | |||
t.string "lionpath_semester" | |||
t.string "academic_program" | |||
t.string "degree_checkout_status" | |||
t.datetime "author_release_warning_sent_at" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be removed before we merge this to main so the migrations don't get mixed up
allow(controller).to receive(:find_submission).and_return(submission) | ||
expect(get(:edit, params:)).to redirect_to author_submission_acknowledge_path(submission.id) | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be good to also test what happens when acknowledgment_page_submitted_at
is set and when the partner is not graduate here.
field.set('JLE') | ||
end | ||
find_button('Submit').click | ||
expect(page).to have_content("Update #{new_submission.degree_type} Title") | ||
select second_program.name, from: current_partner.program_label.to_s | ||
second_program_id = Program.where(name: second_program.name).first.id | ||
click_on "Update #{new_submission.degree_type} Title" if current_partner.graduate? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is a graduate only test, then we should be able to remove the if current_partner.graduate?
logic here and the line below.
5a48726
to
910e3fb
Compare
end | ||
|
||
unless current_partner.graduate? | ||
it 'renders the edit page regardless of the acknowledgment page status' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to get this to run in CI it'll need the honors: true
tag (or something other than graduate). So it would look like: it 'renders the edit page regardless of the acknowledgment page status', honors: true do
910e3fb
to
f4aa8bf
Compare
If the value for acknowledgment_page_viewed_at is a Datetime, the page has been viewed.
Hitting submit on the validation page will save when the acknowledgment page was viewed and will reroute it to the standard edit page.
The students must initial the fields...they cannot be blank.
Also includes some tweaks to the appearance of the page.
Tests that the new methods do what they are intended to do.
Now updates an integration test to ensure that the acknowledgment page appears for the grad program.
Renames the model field to `acknowledgment_page_submitted_at`
f4aa8bf
to
15ebd7f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm!
Closes #760
Adds a page of things authors must acknowledge before proceeding with a submission.
Will convert to a proper PR once the Graduate school provides title.