diff options
author | Go MAEDA <maeda@farend.jp> | 2021-07-25 02:27:54 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2021-07-25 02:27:54 +0000 |
commit | 37d3f3faa9a639288e3c056d688d0114e943d70c (patch) | |
tree | c6bd97ce245970bae425b9cf64a52667dbfe224c /test/system | |
parent | b50973196517d5887b938ff9152fb6647a7cc197 (diff) | |
download | redmine-37d3f3faa9a639288e3c056d688d0114e943d70c.tar.gz redmine-37d3f3faa9a639288e3c056d688d0114e943d70c.zip |
Add watching users to a ticket should switch "watch" link to "unwatch" if own user was added (#15634).
Patch by Takenori TAKAKI.
git-svn-id: http://svn.redmine.org/redmine/trunk@21079 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/system')
-rw-r--r-- | test/system/issues_test.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/system/issues_test.rb b/test/system/issues_test.rb index 1d77a9829..4f4939a9b 100644 --- a/test/system/issues_test.rb +++ b/test/system/issues_test.rb @@ -290,6 +290,21 @@ class IssuesSystemTest < ApplicationSystemTestCase assert issue1.reload.watched_by?(jsmith) end + def test_change_watch_or_unwatch_icon_from_sidebar + user = User.find(2) + log_user('jsmith', 'jsmith') + visit '/issues/1' + assert page.has_css?('#content .contextual .issue-1-watcher.icon-fav-off') + # add watcher 'jsmith' from sidebar + page.find('#watchers .contextual a', :text => 'Add').click + page.find('#users_for_watcher label', :text => 'John Smith').click + page.find('#new-watcher-form p.buttons input[type=submit]').click + assert page.has_css?('#content .contextual .issue-1-watcher.icon-fav') + # remove watcher 'jsmith' from sidebar + page.find('#watchers ul li.user-2 a.delete').click + assert page.has_css?('#content .contextual .issue-1-watcher.icon-fav-off') + end + def test_bulk_watch_issues_via_context_menu log_user('jsmith', 'jsmith') visit '/issues' |