spec: selenium ruby jenkins upgrade

Change-Id: I65ec3115175d2cb4a1740d7abc320527b8a41cc9
Reviewed-on: https://gerrit.instructure.com/26596
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
Reviewed-by: Shawn Meredith <shawn@instructure.com>
Product-Review: Shawn Meredith <shawn@instructure.com>
QA-Review: Shawn Meredith <shawn@instructure.com>
This commit is contained in:
Hannah Bottalla 2013-11-22 12:43:35 -07:00
parent a7c4a85064
commit 31a44b7246
7 changed files with 13 additions and 11 deletions

View File

@ -108,14 +108,12 @@ describe "assignment groups" do
end
it "should not allow all assignment groups to be deleted" do
pending("bug 7480 - User should not be permitted to delete all assignment groups") do
get "/courses/#{@course.id}/assignments"
assignment_groups = get_assignment_groups
assignment_groups.count.should == 1
assignment_groups[0].find_element(:css, '.delete_group_link').should_not be_displayed
refresh_page #refresh page to make sure the trashcan doesn't come back
get_assignment_groups[0].find_element(:css, '.delete_group_link').should_not be_displayed
end
end
it "should add multiple assignment groups and not allow the last one to be deleted" do
@ -356,7 +354,7 @@ describe "assignment groups" do
wait_for_ajaximations
refresh_page
wait_for_ajaximations
f(selector).should have_attribute('aria-expanded', 'false')
keep_trying_until { f(selector).should have_attribute('aria-expanded', 'false') }
end
#QUnit

View File

@ -68,7 +68,7 @@ module SeleniumTestsHelperMethods
if SELENIUM_CONFIG[:firefox_profile].present?
profile = Selenium::WebDriver::Firefox::Profile.from_name(SELENIUM_CONFIG[:firefox_profile])
end
profile.native_events = native
profile.native_events = true
options[:profile] = profile
end
if path = SELENIUM_CONFIG[:paths].try(:[], browser)

View File

@ -120,7 +120,6 @@ describe "courses" do
select.click
wait_for_ajaximations
find_with_jquery('#course_url option:not([selected])').click
driver.current_url.should match %r{/courses/#{course2.id}/grades}
end

View File

@ -199,7 +199,7 @@ describe "dashboard" do
#verify assignment is in drop down
assignment_menu = f('#assignments_menu_item')
driver.action.move_to(assignment_menu).perform
assignment_menu.should include_text("To Turn In")
keep_trying_until { assignment_menu.should include_text("To Turn In") }
assignment_menu.should include_text(assignment.title)
end
@ -228,7 +228,7 @@ describe "dashboard" do
course_menu = f('#courses_menu_item')
driver.action.move_to(course_menu).perform
course_menu.should include_text('Current Groups')
keep_trying_until { course_menu.should include_text('Current Groups') }
course_menu.should include_text(group.name)
end
@ -329,7 +329,7 @@ describe "dashboard" do
driver.action.move_to(f('#courses_menu_item')).perform
course_menu = f('#menu_enrollments')
course_menu.should be_displayed
keep_trying_until { course_menu.should be_displayed }
course_menu.should_not include_text(c1.name)
end
@ -383,7 +383,7 @@ describe "dashboard" do
#verify assignment is in drop down
assignment_menu = f('#assignments_menu_item')
driver.action.move_to(assignment_menu).perform
assignment_menu.should include_text("To Grade")
keep_trying_until { assignment_menu.should include_text("To Grade") }
assignment_menu.should include_text(assignment.title)
end

View File

@ -232,6 +232,7 @@ describe "eportfolios" do
it "should add a course submission" do
f(".add_submission_link").click
wait_for_ajaximations
f(".submission_list").should include_text(@assignment.title)
f(".select_submission_button").click
submit_form(".form_content")

View File

@ -275,6 +275,7 @@ describe "manage groups students" do
confirm_dialog = driver.switch_to.alert
confirm_dialog.accept
ff(".left_side .group").should be_empty
wait_for_ajaximations
@course.group_categories.all.count.should == 0
end

View File

@ -127,11 +127,13 @@ describe "submissions" do
wait_for_ajaximations
assignment_form = f('#submit_online_text_entry_form')
wait_for_tiny(assignment_form)
submit_form(assignment_form)
wait_for_ajaximations
# it should not actually submit and pop up an error message
f('.error_box').should be_displayed
ff('.error_box')[1].should include_text('Required')
Submission.count.should == 0
# now make sure it works
@ -150,7 +152,7 @@ describe "submissions" do
submit_form("#submit_online_text_entry_form")
# it should not actually submit and pop up an error message
f('.error_box').should be_displayed
ff('.error_box')[1].should include_text('Required')
Submission.count.should == 0
# navigate off the page and dismiss the alert box to avoid problems
@ -205,6 +207,7 @@ describe "submissions" do
end
end
it "should submit an assignment and validate confirmation information" do
pending "BUG 6783 - Coming Up assignments update error" do
@assignment.update_attributes(:submission_types => 'online_url')