spec: Fix syntax errors for selectors in selenium tests
These are some quick fixes to selectors in selenium tests that resulted in syntax errors after upgrading to jQuery 1.8. Cleaning up the selectors in the tests fixed the issues. Additionally, I got an eslint warning to use f over fj, so I fixed that as well. refs FOO-4220 flag=none Test Plan: - Jenkins Passes Change-Id: Icf8d08f3fa65d7a138d1fde34d4f261ee4bcd495 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/339132 Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com> Reviewed-by: Charley Kline <ckline@instructure.com> QA-Review: Charley Kline <ckline@instructure.com> Product-Review: Charley Kline <ckline@instructure.com> Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
This commit is contained in:
parent
1c83200d31
commit
8826001ee2
|
@ -317,7 +317,7 @@ describe "admin settings tab" do
|
|||
end
|
||||
|
||||
it "clicks on the google help dialog" do
|
||||
fj("label['for'='account_services_google_docs_previews'] .icon-question").click
|
||||
f("label[for='account_services_google_docs_previews'] .icon-question").click
|
||||
expect(fj(".ui-dialog-title:visible")).to include_text("About Google Docs Previews")
|
||||
end
|
||||
|
||||
|
|
|
@ -297,7 +297,7 @@ describe "gradebook - logged in as a student" do
|
|||
wait_for_ajaximations
|
||||
|
||||
# Verify that the correct assignments are being dropped
|
||||
dropped_assignments = ffj("tr[data-testid='assignment-row']::contains('Dropped')")
|
||||
dropped_assignments = ffj("tr[data-testid='assignment-row']:contains('Dropped')")
|
||||
expect(dropped_assignments.length).to eq 2
|
||||
dropped_assignments_text = dropped_assignments.map(&:text)
|
||||
expect(dropped_assignments_text.any? { |str| str.include?(@assignment_3.title) }).to be true
|
||||
|
@ -338,7 +338,7 @@ describe "gradebook - logged in as a student" do
|
|||
wait_for_ajaximations
|
||||
|
||||
# Verify that the correct assignments are being dropped
|
||||
dropped_assignments = ffj("tr[data-testid='assignment-row']::contains('Dropped')")
|
||||
dropped_assignments = ffj("tr[data-testid='assignment-row']:contains('Dropped')")
|
||||
expect(dropped_assignments.length).to eq 2
|
||||
dropped_assignments_text = dropped_assignments.map(&:text)
|
||||
expect(dropped_assignments_text.any? { |str| str.include?(@assignment_8.title) }).to be true
|
||||
|
|
|
@ -34,7 +34,7 @@ describe "master courses - settings" do
|
|||
|
||||
it "blueprint course selected in settings", priority: "1" do
|
||||
get "/courses/#{@test_course.id}/settings"
|
||||
expect(is_checked("input[type=checkbox][name=course[blueprint]]")).to be_truthy
|
||||
expect(is_checked("input[type=checkbox][name='course[blueprint]']")).to be_truthy
|
||||
end
|
||||
|
||||
it "blueprint course un-selected in settings", priority: "1" do
|
||||
|
@ -43,7 +43,7 @@ describe "master courses - settings" do
|
|||
wait_for_ajaximations
|
||||
wait_for_new_page_load { submit_form("#course_form") }
|
||||
expect(MasterCourses::MasterTemplate).not_to be_is_master_course @course
|
||||
expect(is_checked("input[type=checkbox][name=course[blueprint]]")).not_to be_truthy
|
||||
expect(is_checked("input[type=checkbox][name='course[blueprint]']")).not_to be_truthy
|
||||
end
|
||||
|
||||
it "leaves box unchecked for non-blueprint course", priority: "1" do
|
||||
|
|
Loading…
Reference in New Issue