From b29288c50a85cb1910d67717fc349878a7b27541 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Fri, 14 Jun 2013 08:30:53 +0000 Subject: prevent UI test failure randomly git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11973 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/ui/issues_test.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'test/ui') diff --git a/test/ui/issues_test.rb b/test/ui/issues_test.rb index d1e92dc9b..750d8763d 100644 --- a/test/ui/issues_test.rb +++ b/test/ui/issues_test.rb @@ -102,8 +102,8 @@ class Redmine::UiTest::IssuesTest < Redmine::UiTest::Base end def test_create_issue_with_watchers - User.generate!(:firstname => 'Some', :lastname => 'Watcher') - + user = User.generate!(:firstname => 'Some', :lastname => 'Watcher') + assert_equal 'Some Watcher', user.name log_user('jsmith', 'jsmith') visit '/projects/ecookbook/issues/new' fill_in 'Subject', :with => 'Issue with watchers' @@ -123,7 +123,9 @@ class Redmine::UiTest::IssuesTest < Redmine::UiTest::Base assert page.has_css?('form#issue-form') assert page.has_css?('p#watchers_form') within('span#watchers_inputs') do - assert has_content?('Some Watcher'), "No watcher content" + within("label#issue_watcher_user_ids_#{user.id}") do + assert has_content?('Some Watcher'), "No watcher content" + end end assert_difference 'Issue.count' do find('input[name=commit]').click -- cgit v1.2.3