Defect #42687 ยป 0001-Fix-random-failures-in-several-system-tests-with-Chrome-133-and-later.patch
| test/system/issues_test.rb | ||
|---|---|---|
|
find('input[name=commit]').click
|
||
|
end
|
||
|
assert_text /Issue #\d+ created./
|
||
|
# find created issue
|
||
|
issue = Issue.find_by_subject("new test issue")
|
||
|
assert_kind_of Issue, issue
|
||
| ... | ... | |
|
fill_in field2.name, :with => 'CF2 value'
|
||
|
assert_difference 'Issue.count' do
|
||
|
page.first(:button, 'Create').click
|
||
|
assert_text /Issue #\d+ created./
|
||
|
end
|
||
|
issue = Issue.order('id desc').first
|
||
| ... | ... | |
|
end
|
||
|
assert_difference 'Issue.count' do
|
||
|
find('input[name=commit]').click
|
||
|
assert_text /Issue #\d+ created./
|
||
|
end
|
||
|
issue = Issue.order('id desc').first
|
||
| ... | ... | |
|
attach_file 'attachments[dummy][file]', Rails.root.join('test/fixtures/files/testfile.txt')
|
||
|
fill_in 'attachments[1][description]', :with => 'Some description'
|
||
|
click_on 'Create'
|
||
|
assert_text /Issue #\d+ created./
|
||
|
end
|
||
|
assert_equal 1, issue.attachments.count
|
||
|
assert_equal 'Some description', issue.attachments.first.description
|
||
| ... | ... | |
|
attach_file 'attachments[dummy][file]', Rails.root.join('test/fixtures/files/testfile.txt')
|
||
|
fill_in 'attachments[1][description]', :with => 'Some description'
|
||
|
click_on 'Create'
|
||
|
assert_text /Issue #\d+ created./
|
||
|
end
|
||
|
assert_equal 1, issue.attachments.count
|
||
|
assert_equal 'Some description', issue.attachments.first.description
|
||
| ... | ... | |
|
click_on 'Create'
|
||
|
end
|
||
|
click_on 'Create'
|
||
|
assert_text /Issue #\d+ created./
|
||
|
end
|
||
|
end
|
||
| ... | ... | |
|
end
|
||
|
assert_difference 'Issue.count' do
|
||
|
click_button('Create')
|
||
|
assert_text /Issue #\d+ created./
|
||
|
end
|
||
|
issue = Issue.order('id desc').first
|
||
| ... | ... | |
|
fill_in 'Form update CF', :with => 'CF value'
|
||
|
assert_no_difference 'Issue.count' do
|
||
|
page.first(:button, 'Submit').click
|
||
|
assert_text 'Successful update.'
|
||
|
end
|
||
|
assert page.has_css?('#flash_notice')
|
||
|
issue = Issue.find(1)
|
||
| ... | ... | |
|
page.find("#issue_status_id").select("Closed")
|
||
|
assert_no_difference 'Issue.count' do
|
||
|
page.first(:button, 'Submit').click
|
||
|
assert_text 'Successful update.'
|
||
|
end
|
||
|
assert page.has_css?('#flash_notice')
|
||
|
assert_equal 5, issue.reload.status.id
|
||
| ... | ... | |
|
click_on 'Submit'
|
||
|
assert_text 'Successful update.'
|
||
|
assert_equal 3, Issue.find(2).attachments.count
|
||
|
end
|
||
| test/system/sudo_mode_test.rb | ||
|---|---|---|
|
find('input[name=commit]').click
|
||
|
end
|
||
|
assert_equal '/users', current_path
|
||
|
assert page.has_content?("Confirm your password to continue")
|
||
|
assert page.has_css?('form#sudo-form')
|
||
| ... | ... | |
|
fill_in 'Password', :with => 'admin'
|
||
|
click_button 'Submit'
|
||
|
end
|
||
|
assert_text /User johnpaul created./
|
||
|
end
|
||
|
end
|
||
| test/system/timelog_test.rb | ||
|---|---|---|
|
select 'QA', :from => 'Activity'
|
||
|
page.first(:button, 'Submit').click
|
||
|
assert_text 'Successful update.'
|
||
|
entries = TimeEntry.where(:id => [1, 2, 3]).to_a
|
||
|
assert entries.all? {|entry| entry.hours == 8.5}
|
||
|
assert entries.all? {|entry| entry.activity.name == 'QA'}
|
||
| ... | ... | |
|
select 'Tracker', :from => 'Available Columns'
|
||
|
page.first('input[type=button].move-right').click
|
||
|
click_on 'Save'
|
||
|
assert_text 'Successful update.'
|
||
|
# Display the list with updated settings
|
||
|
visit '/time_entries'
|
||