Improved browser test.

This commit is contained in:
Martin Edenhofer 2016-03-11 06:58:27 +01:00
parent 2c50fcfa39
commit 4b37e4da2b
2 changed files with 10 additions and 5 deletions

View file

@ -382,6 +382,7 @@ returns on fail
'Connection refused' => { host: true },
'Mailbox doesn\'t exist' => { folder: true },
'Folder doesn\'t exist' => { folder: true },
'Unknown Mailbox' => { folder: true },
}
end

View file

@ -48,15 +48,19 @@ class AdminChannelEmailTest < TestCase
watch_for(
css: '.modal',
value: 'already exists',
value: '(already exists|unknown mailbox)',
)
click(css: '.modal .js-close')
# delete
click(css: '#content .js-channelDelete')
sleep 2
click(css: '.modal .js-submit')
# delete all channels
loop do
break if !@browser.find_elements(css: '#content .js-channelDelete')[0]
click(css: '#content .js-channelDelete')
sleep 2
click(css: '.modal .js-submit')
sleep 2
end
# re-create
click(css: '#content .js-channelNew')