]> source.dussan.org Git - redmine.git/commitdiff
use "right_click" instead of "trigger('contextmenu')" in IssuesSystemTest
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 15 Jun 2020 17:59:13 +0000 (17:59 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 15 Jun 2020 17:59:13 +0000 (17:59 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@19821 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/system/issues_test.rb

index 8352a792f5d2924b36d5bceb53f9a2cc8ea7d26d..613aedaee7a48ba9f1a1e3fc20f8b8acad27647a 100644 (file)
@@ -273,7 +273,7 @@ class IssuesSystemTest < ApplicationSystemTestCase
     visit '/issues'
     assert page.has_css?('tr#issue-1')
     find('tr#issue-1 td.updated_on').click
-    page.execute_script "$('tr#issue-1 td.updated_on').trigger('contextmenu');"
+    find('tr#issue-1 td.updated_on').right_click
     assert_difference 'Watcher.count' do
       within('#context-menu') do
         click_link 'Watch'
@@ -292,7 +292,7 @@ class IssuesSystemTest < ApplicationSystemTestCase
     assert page.has_css?('tr#issue-4')
     find('tr#issue-1 input[type=checkbox]').click
     find('tr#issue-4 input[type=checkbox]').click
-    page.execute_script "$('tr#issue-1 td.updated_on').trigger('contextmenu');"
+    find('tr#issue-1 td.updated_on').right_click
     assert_difference 'Watcher.count', 2 do
       within('#context-menu') do
         click_link 'Watch'