Project

General

Profile

Defect #42687 ยป 0001-Fix-random-failures-in-several-system-tests-with-Chrome-133-and-later.patch

Katsuya HIDAKA, 2025-05-10 11:56

View differences:

test/system/issues_test.rb
34 34
      find('input[name=commit]').click
35 35
    end
36 36

  
37
    assert_text /Issue #\d+ created./
38

  
37 39
    # find created issue
38 40
    issue = Issue.find_by_subject("new test issue")
39 41
    assert_kind_of Issue, issue
......
86 88
    fill_in field2.name, :with => 'CF2 value'
87 89
    assert_difference 'Issue.count' do
88 90
      page.first(:button, 'Create').click
91
      assert_text /Issue #\d+ created./
89 92
    end
90 93

  
91 94
    issue = Issue.order('id desc').first
......
125 128
    end
126 129
    assert_difference 'Issue.count' do
127 130
      find('input[name=commit]').click
131
      assert_text /Issue #\d+ created./
128 132
    end
129 133

  
130 134
    issue = Issue.order('id desc').first
......
141 145
      attach_file 'attachments[dummy][file]', Rails.root.join('test/fixtures/files/testfile.txt')
142 146
      fill_in 'attachments[1][description]', :with => 'Some description'
143 147
      click_on 'Create'
148
      assert_text /Issue #\d+ created./
144 149
    end
145 150
    assert_equal 1, issue.attachments.count
146 151
    assert_equal 'Some description', issue.attachments.first.description
......
163 168
      attach_file 'attachments[dummy][file]', Rails.root.join('test/fixtures/files/testfile.txt')
164 169
      fill_in 'attachments[1][description]', :with => 'Some description'
165 170
      click_on 'Create'
171
      assert_text /Issue #\d+ created./
166 172
    end
167 173
    assert_equal 1, issue.attachments.count
168 174
    assert_equal 'Some description', issue.attachments.first.description
......
181 187
          click_on 'Create'
182 188
        end
183 189
        click_on 'Create'
190
        assert_text /Issue #\d+ created./
184 191
      end
185 192
    end
186 193

  
......
200 207
    end
201 208
    assert_difference 'Issue.count' do
202 209
      click_button('Create')
210
      assert_text /Issue #\d+ created./
203 211
    end
204 212

  
205 213
    issue = Issue.order('id desc').first
......
230 238
    fill_in 'Form update CF', :with => 'CF value'
231 239
    assert_no_difference 'Issue.count' do
232 240
      page.first(:button, 'Submit').click
241
      assert_text 'Successful update.'
233 242
    end
234 243
    assert page.has_css?('#flash_notice')
235 244
    issue = Issue.find(1)
......
245 254
    page.find("#issue_status_id").select("Closed")
246 255
    assert_no_difference 'Issue.count' do
247 256
      page.first(:button, 'Submit').click
257
      assert_text 'Successful update.'
248 258
    end
249 259
    assert page.has_css?('#flash_notice')
250 260
    assert_equal 5, issue.reload.status.id
......
267 277

  
268 278
    click_on 'Submit'
269 279

  
280
    assert_text 'Successful update.'
270 281
    assert_equal 3, Issue.find(2).attachments.count
271 282
  end
272 283

  
test/system/sudo_mode_test.rb
48 48
        find('input[name=commit]').click
49 49
      end
50 50

  
51
      assert_equal '/users', current_path
52 51
      assert page.has_content?("Confirm your password to continue")
53 52
      assert page.has_css?('form#sudo-form')
54 53

  
......
56 55
        fill_in 'Password', :with => 'admin'
57 56
        click_button 'Submit'
58 57
      end
58

  
59
      assert_text /User johnpaul created./
59 60
    end
60 61
  end
61 62

  
test/system/timelog_test.rb
49 49
    select 'QA', :from => 'Activity'
50 50
    page.first(:button, 'Submit').click
51 51

  
52
    assert_text 'Successful update.'
53

  
52 54
    entries = TimeEntry.where(:id => [1, 2, 3]).to_a
53 55
    assert entries.all? {|entry| entry.hours == 8.5}
54 56
    assert entries.all? {|entry| entry.activity.name == 'QA'}
......
89 91
    select 'Tracker', :from => 'Available Columns'
90 92
    page.first('input[type=button].move-right').click
91 93
    click_on 'Save'
94
    assert_text 'Successful update.'
92 95

  
93 96
    # Display the list with updated settings
94 97
    visit '/time_entries'
    (1-1/1)