Edit NSR Selenium spec

refs OUT-2140

Test plan:
 - QA-CR
 - Selenium specs pass on Jenkins

Change-Id: I93a4ab616f9b0d07e5ed63e267a8bf49b48fb1cf
Reviewed-on: https://gerrit.instructure.com/153055
Reviewed-by: Frank Murphy <fmurphy@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Tested-by: Jenkins
Product-Review: Augusto Callejas <acallejas@instructure.com>
QA-Review: Augusto Callejas <acallejas@instructure.com>
This commit is contained in:
Dariusz Dzien 2018-06-07 17:11:18 -07:00
parent 90e95356be
commit 6a96c9f1c6
1 changed files with 55 additions and 0 deletions

View File

@ -538,6 +538,61 @@ describe "assignment rubrics" do
end
end
context "non-scoring rubrics" do
before(:each) do
@course.account.root_account.enable_feature!(:non_scoring_rubrics)
@assignment = @course.assignments.create(name: 'NSR assignment')
outcome_with_rubric
@rubric.associate_with(@assignment, @course, purpose: 'grading')
end
it "should create and edit a non-scoring rubric" do
get "/courses/#{@course.id}/assignments/#{@assignment.id}"
f(' .rubric_title .icon-edit').click
wait_for_ajaximations
# Hide points on rubric
f('#hide_points').click
wait_for_ajaximations
rating_points_elements = ff('.points')
rating_points_elements.each do |points|
expect(points).not_to be_displayed
end
total_points_elements = ff('[class="total_points_holder toggle_for_hide_points "]')
total_points_elements.each do |total_points|
expect(total_points).not_to be_displayed
end
# Add rating
ff('.add_rating_link_after')[5].click
expect(fj('span:contains("Edit Rating")')).to be_present
rating_score_fields = ff('#rating_form_score_label')
rating_score_fields.each do |rating_score_field|
expect(rating_score_field).not_to be_displayed
end
wait_for_ajaximations
set_value(ff('#rating_form_title')[0], 'Test rating 1')
set_value(ff('#rating_form_description')[0], 'Test description 1')
fj('span:contains("Update Rating")').click
wait_for_ajaximations
expect(ff('[class="description rating_description_value"]')[10].text).to eq "Test rating 1"
expect(ff('[class="rating_long_description small_description"]')[10].text).to eq "Test description 1"
# Save rubric
find_button("Update Rubric").click
wait_for_ajaximations
expect(ff('[class="description rating_description_value"]')[5].text).to eq "Test rating 1"
expect(ff('[class="rating_long_description small_description"]')[5].text).to eq "Test description 1"
rating_points_elements = ff('.points')
rating_points_elements.each do |points|
expect(points).not_to be_displayed
end
end
end
context "criterion copy" do
before(:each) do
@course.account.root_account.enable_feature!(:rubric_criterion_range)