spec: Added various new selenium specs
Change-Id: I3d7c6d4c0571f60674570932cf4dde50c29a5f94 Reviewed-on: https://gerrit.instructure.com/70077 Reviewed-by: Steven Shepherd <sshepherd@instructure.com> Tested-by: Jenkins Product-Review: Derek Hansen <dhansen@instructure.com> QA-Review: Derek Hansen <dhansen@instructure.com>
This commit is contained in:
parent
5c47cb849c
commit
b41febb69c
|
@ -341,4 +341,18 @@ describe "assignment groups" do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "Should be able to delete assignments when deleting assignment Groups", priority: "2", test_id: 56007 do
|
||||||
|
group0 = @course.assignment_groups.create!(name: "Guybrush Group")
|
||||||
|
assignment = @course.assignments.create!(title: "Fine Leather Jacket", assignment_group: group0,)
|
||||||
|
get "/courses/#{@course.id}/assignments"
|
||||||
|
expect(f('#ag-list')).to include_text(assignment.name)
|
||||||
|
|
||||||
|
f("#ag_#{group0.id}_manage_link").click
|
||||||
|
|
||||||
|
f("#assignment_group_#{group0.id} .delete_group").click
|
||||||
|
wait_for_ajaximations
|
||||||
|
fj('.delete_group:visible').click
|
||||||
|
wait_for_ajaximations
|
||||||
|
expect(f('#ag-list')).not_to include_text(assignment.name)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -697,4 +697,37 @@ describe "assignments" do
|
||||||
expect(is_checked('#assignment_post_to_sis')).to be_falsey
|
expect(is_checked('#assignment_post_to_sis')).to be_falsey
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'adding new assignment groups from assignment creation page' do
|
||||||
|
before do
|
||||||
|
course_with_teacher_logged_in
|
||||||
|
@new_group = 'fine_leather_jacket'
|
||||||
|
get "/courses/#{@course.id}/assignments/new"
|
||||||
|
click_option('#assignment_group_id', '[ New Group ]')
|
||||||
|
|
||||||
|
# type something in here so you can check to make sure it was not added
|
||||||
|
fj('div.controls > input:visible').send_keys(@new_group)
|
||||||
|
end
|
||||||
|
|
||||||
|
it "should add a new assignment group", priority: "1", test_id:525190 do
|
||||||
|
fj('.button_type_submit:visible').click
|
||||||
|
wait_for_ajaximations
|
||||||
|
|
||||||
|
expect(f('#assignment_group_id')).to include_text(@new_group)
|
||||||
|
end
|
||||||
|
|
||||||
|
it "should cancel adding new assignment group via the cancel button", priority: "2", test_id: 602873 do
|
||||||
|
fj('.cancel-button:visible').click
|
||||||
|
wait_for_ajaximations
|
||||||
|
|
||||||
|
expect(f('#assignment_group_id')).not_to include_text(@new_group)
|
||||||
|
end
|
||||||
|
|
||||||
|
it "should cancel adding new assignment group via the x button", priority: "2", test_id: 602874 do
|
||||||
|
fj('.ui-icon-closethick:visible').click
|
||||||
|
wait_for_ajaximations
|
||||||
|
|
||||||
|
expect(f('#assignment_group_id')).not_to include_text(@new_group)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -361,4 +361,38 @@ describe "screenreader gradebook" do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'warning messages for group weights with no points' do
|
||||||
|
before(:each) do
|
||||||
|
init_course_with_students 1
|
||||||
|
group0 = @course.assignment_groups.create!(name: "Guybrush Group")
|
||||||
|
@course.assignment_groups.create!(name: "Threepwood Group")
|
||||||
|
@assignment = @course.assignments.create!(title: "Fine Leather Jacket", assignment_group: group0)
|
||||||
|
|
||||||
|
get srgb
|
||||||
|
|
||||||
|
# turn on group weights
|
||||||
|
f('#ag_weights').click
|
||||||
|
wait_for_ajaximations
|
||||||
|
f('#group_weighting_scheme').click
|
||||||
|
f('.ui-button-text').click
|
||||||
|
wait_for_ajaximations
|
||||||
|
end
|
||||||
|
|
||||||
|
it "should have a no point possible warning when a student is selected", priority: "2", test_id: 164226 do
|
||||||
|
# select from dropdown
|
||||||
|
click_option('#student_select', @students[0].name)
|
||||||
|
|
||||||
|
expect(f('span.text-error > i.icon-warning')).to be_displayed
|
||||||
|
expect(f('#student_information > div.row')).to include_text('Score does not include assignments from the group')
|
||||||
|
end
|
||||||
|
|
||||||
|
it "should have a no point possible warning when an assignment is selected", priority: "2", test_id: 602625 do
|
||||||
|
# select from dropdown
|
||||||
|
click_option('#assignment_select', @assignment.name)
|
||||||
|
|
||||||
|
expect(f('a > i.icon-warning')).to be_displayed
|
||||||
|
expect(f('#assignment_information > div.row')).to include_text('Assignments in this group have no points')
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue