Spec: Fix element_not_visible flakyness

Closes QA - 626

Test Plan:
   --- Passes Jenkins

Change-Id: Ic4793ea033ac60d040cc0a28e98ba288a571cd51
Reviewed-on: https://gerrit.instructure.com/170964
Tested-by: Jenkins
Reviewed-by: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
This commit is contained in:
Indira Pai 2018-11-02 17:35:38 -05:00
parent 292b50a49b
commit 422109c390
2 changed files with 18 additions and 17 deletions

View File

@ -60,7 +60,7 @@ describe "conversations new" do
end
it "should check the Journal messages for correct time and sender", priority: "1", test_id: 75701 do
skip_if_chrome('fragile in chrome')
# skip_if_chrome('fragile in chrome')
user_session(@teacher)
conversations
compose course: @course, subject: 'Christmas', to: [@s1], body: 'The Fat Man cometh.', journal: true, send: true
@ -73,7 +73,7 @@ describe "conversations new" do
end
it "should allow an admin to delete a Journal message", priority: "1", test_id: 75703 do
skip_if_chrome('fragile in chrome')
# skip_if_chrome('fragile in chrome')
skip_if_safari(:alert)
user_session(@teacher)
conversations
@ -118,7 +118,7 @@ describe "conversations new" do
end
it "should be allowed on new private conversations with students", priority: "1", test_id: 207094 do
skip_if_chrome('fragile in chrome')
# skip_if_chrome('fragile in chrome')
compose course: @course, to: [@s1, @s2], body: 'hallo!', send: false
checkbox = f('.user_note')
expect(checkbox).to be_displayed
@ -131,7 +131,7 @@ describe "conversations new" do
end
it "should be allowed with student groups", priority: "1", test_id: 207093 do
skip_if_chrome('fragile in chrome')
# skip_if_chrome('fragile in chrome')
compose course: @course, to: [@group], body: 'hallo!', send: false
checkbox = f('.user_note')
expect(checkbox).to be_displayed
@ -142,7 +142,7 @@ describe "conversations new" do
end
it "should not be allowed if disabled", priority: "1", test_id: 207092 do
skip_if_chrome('fragile in chrome')
# skip_if_chrome('fragile in chrome')
@course.account.update_attribute(:enable_user_notes, false)
conversations
compose course: @course, to: [@s1], body: 'hallo!', send: false
@ -150,7 +150,7 @@ describe "conversations new" do
end
it "should not be allowed for students", priority: "1", test_id: 138686 do
skip_if_chrome('fragile in chrome')
# skip_if_chrome('fragile in chrome')
user_session(@s1)
conversations
compose course: @course, to: [@s2], body: 'hallo!', send: false
@ -158,13 +158,13 @@ describe "conversations new" do
end
it "should not be allowed with non-student recipient", priority: "1", test_id: 138687 do
skip_if_chrome('fragile in chrome')
# skip_if_chrome('fragile in chrome')
compose course: @course, to: [@teacher], body: 'hallo!', send: false
expect(f('.user_note')).not_to be_displayed
end
it "should have the Journal entry checkbox come back unchecked", priority: "1", test_id: 523385 do
skip_if_chrome('Fragile in Chrome')
# skip_if_chrome('Fragile in Chrome')
f('#compose-btn').click
wait_for_ajaximations
expect(f('.user_note')).not_to be_displayed
@ -186,7 +186,7 @@ describe "conversations new" do
end
it "should have the Journal entry checkbox visible", priority: "1", test_id: 75008 do
skip_if_chrome('Fragile in Chrome')
# skip_if_chrome('Fragile in Chrome')
f('#compose-btn').click
wait_for_ajaximations
expect(f('.user_note')).not_to be_displayed
@ -208,7 +208,7 @@ describe "conversations new" do
end
it "should send a message with faculty journal checked", priority: "1", test_id: 75433 do
skip_if_chrome('fragile in chrome')
# skip_if_chrome('fragile in chrome')
conversations
# First verify teacher can send a message with faculty journal entry checked to one student
compose course: @course, to: [@s1], body: 'hallo!', journal: true, send: true

View File

@ -76,19 +76,19 @@ module ConversationsCommon
end
def message_course
fj('.message_course.bootstrap-select')
f('.message_course.bootstrap-select')
end
def message_recipients_input
fj('.compose_form #compose-message-recipients')
f('.compose_form #compose-message-recipients')
end
def message_subject_input
fj('#compose-message-subject')
f('#compose-message-subject')
end
def message_body_input
fj('.conversation_body')
f('.conversation_body')
end
def bootstrap_select_value(element)
@ -146,9 +146,9 @@ module ConversationsCommon
def select_message_course(new_course, is_group = false)
new_course = new_course.name if new_course.respond_to? :name
fj('.dropdown-toggle', message_course).click
f('.dropdown-toggle', message_course).click
wait_for_ajaximations
if is_group
wait_for_ajaximations
fj("a:contains('Groups')", message_course).click
end
fj("a:contains('#{new_course}')", message_course).click
@ -189,9 +189,10 @@ module ConversationsCommon
end
def compose(options={})
fj('#compose-btn').click
f('#compose-btn').click
wait_for_ajaximations
select_message_course(options[:course]) if options[:course]
(options[:to] || []).each {|recipient| add_message_recipient recipient}
write_message_subject(options[:subject]) if options[:subject]
write_message_body(options[:body]) if options[:body]