diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2023-10-24 19:06:43 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2023-10-24 19:06:43 +0000 |
commit | 7ba9cb1da6364aba9500ec60bcb25b9ad93e6773 (patch) | |
tree | 9f3cb33e6982a5b7c091f775d19a6667ae1a78c9 /test/system/issues_test.rb | |
parent | b141aed19fd90c2be76304850d6ad335c6214227 (diff) | |
download | redmine-7ba9cb1da6364aba9500ec60bcb25b9ad93e6773.tar.gz redmine-7ba9cb1da6364aba9500ec60bcb25b9ad93e6773.zip |
Use assert_selector which automatically waits until the HTML condition is met (#39109).
Patch by Takashi Kato.
git-svn-id: https://svn.redmine.org/redmine/trunk@22372 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/system/issues_test.rb')
-rw-r--r-- | test/system/issues_test.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/system/issues_test.rb b/test/system/issues_test.rb index a66b19e38..f0a749238 100644 --- a/test/system/issues_test.rb +++ b/test/system/issues_test.rb @@ -443,8 +443,8 @@ class IssuesSystemTest < ApplicationSystemTestCase # wait for ajax response assert page.has_select?('issue_project_id', selected: 'OnlineStore') + assert_selector 'input[type=submit]', count: 2 submit_buttons = page.all('input[type=submit]') - assert_equal 2, submit_buttons.size assert_equal 'Move', submit_buttons[0].value assert_equal 'Move and follow', submit_buttons[1].value @@ -507,8 +507,9 @@ class IssuesSystemTest < ApplicationSystemTestCase # wait for ajax response assert page.has_select?('issue_project_id', selected: 'OnlineStore') + assert_selector 'input[type=submit]', count: 2 submit_buttons = page.all('input[type=submit]') - assert_equal 2, submit_buttons.size + assert_equal 'Copy', submit_buttons[0].value assert_equal 'Copy and follow', submit_buttons[1].value page.find('#issue_priority_id').select('High') @@ -645,7 +646,7 @@ class IssuesSystemTest < ApplicationSystemTestCase wait_for_ajax # assert log time form does not exist anymore for user without required permissions on the new project - assert_not page.has_css?('#log_time') + assert page.has_no_css?('#log_time') end def test_update_issue_form_should_include_add_notes_form_only_for_users_with_permission @@ -665,6 +666,6 @@ class IssuesSystemTest < ApplicationSystemTestCase wait_for_ajax # assert add notes form does not exist anymore for user without required permissions on the new project - assert_not page.has_css?('#add_notes') + assert page.has_no_css?('#add_notes') end end |