Fixed test.

This commit is contained in:
Martin Edenhofer 2015-06-10 02:28:21 +02:00
parent 7d1a3dcb6b
commit 2b030f436f

View file

@ -20,26 +20,26 @@ class SwitchToUserTest < TestCase
) )
sleep 3 sleep 3
@browser.mouse.move_to( @browser.find_elements( { css: '#content .table-overview tbody tr:first-child' } )[0] )
click( click(
css: '#content .icon-user', css: '#content .icon-switchView',
) )
watch_for( watch_for(
:css => '#app', :css => '.switchBackToUser',
:value => 'zammad looks like', :value => 'zammad looks like',
) )
watch_for( watch_for(
:css => '#app .switchBackToUser', :css => '.switchBackToUser',
:value => 'Nicole', :value => 'Nicole',
) )
login = @browser.find_elements( { css: '.user-menu .user a' } )[0].attribute('title') login = @browser.find_elements( { css: '.user-menu .user a' } )[0].attribute('title')
assert_equal(login, 'nicole.braun@zammad.org') assert_equal(login, 'nicole.braun@zammad.org')
click( css: '#app .switchBackToUser .js-close' ) click( css: '.switchBackToUser .js-close' )
login = @browser.find_elements( { css: '.user-menu .user a' } )[0].attribute('title') login = @browser.find_elements( { css: '.user-menu .user a' } )[0].attribute('title')
assert_equal(login, 'master@example.com') assert_equal(login, 'master@example.com')
end end
end end