From 4dec6209dc85f78e1077298fdb520bf6cee8a4b5 Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Mon, 20 Aug 2018 11:13:18 +0200 Subject: [PATCH] Test stabilization: Extended user creation browser helper by phone and active attribute. --- test/browser/integration_cti_test.rb | 9 +++------ test/browser_test_helper.rb | 8 ++++++++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/test/browser/integration_cti_test.rb b/test/browser/integration_cti_test.rb index e305ff463..ed872a7ad 100644 --- a/test/browser/integration_cti_test.rb +++ b/test/browser/integration_cti_test.rb @@ -167,15 +167,12 @@ class IntegrationCtiTest < TestCase data: { login: 'test_user', 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 click(css: 'a[href="#manage"]') click(css: 'a[href="#system/integration"]') diff --git a/test/browser_test_helper.rb b/test/browser_test_helper.rb index d64b147ab..9190cf1a3 100644 --- a/test/browser_test_helper.rb +++ b/test/browser_test_helper.rb @@ -2861,6 +2861,14 @@ wait untill text in selector disabppears element = instance.find_elements(css: '.modal input[name=password_confirm]')[0] element.clear 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] element = instance.find_elements(css: '.modal input.searchableSelect-main')[0] element.clear