add selenium test for error CR error UI
flag = conditional_release Closes LS-1310 Test Plan: passes jenkins Change-Id: I931210a72db755a2e59f65dc554ae867c7ee1a1a Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246112 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: James Williams <jamesw@instructure.com> QA-Review: Robin Kuss <rkuss@instructure.com> Product-Review: Robin Kuss <rkuss@instructure.com>
This commit is contained in:
parent
1beb3b7d9b
commit
428c279bee
|
@ -180,6 +180,18 @@ describe 'native canvas conditional release' do
|
|||
|
||||
expect(ConditionalReleaseObjects.assignment_exists_in_scoring_range?(1,assignment_for_mp.title)).to be(true)
|
||||
end
|
||||
|
||||
it 'should be able see errors for invalid scoring ranges' do
|
||||
assignment = assignment_model(course: @course, points_possible: 100)
|
||||
get "/courses/#{@course.id}/assignments/#{assignment.id}/edit"
|
||||
ConditionalReleaseObjects.conditional_release_link.click
|
||||
|
||||
replace_content(ConditionalReleaseObjects.division_cutoff1, "")
|
||||
expect(ConditionalReleaseObjects.must_not_be_empty_exists?).to eq(true)
|
||||
|
||||
replace_content(ConditionalReleaseObjects.division_cutoff1, "35")
|
||||
expect(ConditionalReleaseObjects.these_scores_are_out_of_order_exists?).to eq(true)
|
||||
end
|
||||
end
|
||||
|
||||
context 'Mastery Path Breakdowns' do
|
||||
|
|
|
@ -76,6 +76,14 @@ class ConditionalReleaseObjects
|
|||
f("[title='Division cutoff 2']")
|
||||
end
|
||||
|
||||
def must_not_be_empty_exists?
|
||||
element_exists?("//*[contains(@id,'error') and contains(text(),'must not be empty')]", true)
|
||||
end
|
||||
|
||||
def these_scores_are_out_of_order_exists?
|
||||
element_exists?("//*[contains(@id,'error') and contains(text(),'these scores are out of order')]", true)
|
||||
end
|
||||
|
||||
# Common Selectors
|
||||
def conditional_release_link
|
||||
f("#conditional_release_link")
|
||||
|
|
Loading…
Reference in New Issue