Test stabilization: Extended user creation browser helper by phone and active attribute.

This commit is contained in:
Thorsten Eckel 2018-08-20 11:13:18 +02:00
parent 79ff7a66fc
commit 4dec6209dc
2 changed files with 11 additions and 6 deletions

View file

@ -167,15 +167,12 @@ class IntegrationCtiTest < TestCase
data: { data: {
login: 'test_user', login: 'test_user',
firstname: 'John', firstname: 'John',
lastname: 'Doe' lastname: 'Doe',
phone: '1234567890',
active: false,
}, },
) )
click(css: 'table.user-list > tbody > tr:first-of-type > td:first-of-type')
set(css: 'input[name="phone"]', value: '1234567890')
select(css: 'select[name="active"]', value: 'inactive')
click(css: 'button[type="submit"]')
# enable CTI # enable CTI
click(css: 'a[href="#manage"]') click(css: 'a[href="#manage"]')
click(css: 'a[href="#system/integration"]') click(css: 'a[href="#system/integration"]')

View file

@ -2861,6 +2861,14 @@ wait untill text in selector disabppears
element = instance.find_elements(css: '.modal input[name=password_confirm]')[0] element = instance.find_elements(css: '.modal input[name=password_confirm]')[0]
element.clear element.clear
element.send_keys(data[:password]) element.send_keys(data[:password])
element = instance.find_elements(css: '.modal input[name=phone]')[0]
element.clear
element.send_keys(data[:phone])
if data[:active] == false
select(css: 'select[name="active"]', value: 'inactive')
end
if data[:organization] if data[:organization]
element = instance.find_elements(css: '.modal input.searchableSelect-main')[0] element = instance.find_elements(css: '.modal input.searchableSelect-main')[0]
element.clear element.clear