Write tests around API for domain lock

This commit is contained in:
Maciej Szlosarczyk 2018-08-10 14:18:24 +03:00
parent 2a7caaa33e
commit 0a0962e007
No known key found for this signature in database
GPG key ID: 41D62D42D3B0D765
6 changed files with 89 additions and 17 deletions

View file

@ -16,6 +16,7 @@ class RegistryLockTest < JavaScriptApplicationSystemTestCase
def test_does_not_have_link_when_domain_is_not_locked
visit edit_admin_domain_path(@domain)
click_link_or_button('Actions')
refute(page.has_link?('Remove registry lock'))
end
@ -26,7 +27,7 @@ class RegistryLockTest < JavaScriptApplicationSystemTestCase
click_link_or_button('Actions')
assert(page.has_link?('Remove registry lock'))
accept_confirm('Are you sure you want to remove registry lock?') do
accept_confirm('Are you sure you want to remove the registry lock?') do
click_link_or_button('Remove registry lock')
end
@ -46,7 +47,7 @@ class RegistryLockTest < JavaScriptApplicationSystemTestCase
click_link_or_button('Actions')
assert(page.has_link?('Remove registry lock'))
accept_confirm('Are you sure you want to remove registry lock that was set by registrant?') do
accept_confirm('Are you sure you want to remove the registry lock?') do
click_link_or_button('Remove registry lock')
end

View file

@ -25,5 +25,6 @@ class AdminDomainsTestTest < ApplicationSystemTestCase
visit admin_domain_path(lockable_domain)
assert_text 'Registry lock time 2010-07-05 00:30'
assert_text 'registryLock'
end
end