2013-05-28 12:24:48 +00:00
|
|
|
# encoding: utf-8
|
|
|
|
require 'browser_test_helper'
|
|
|
|
|
2014-08-18 07:00:23 +00:00
|
|
|
class AgentTicketActionLevel5Test < TestCase
|
2013-07-17 13:57:12 +00:00
|
|
|
def test_I
|
2014-09-09 23:42:20 +00:00
|
|
|
random = 'text_module_test_' + rand(99999999).to_s
|
|
|
|
random2 = 'text_module_test_' + rand(99999999).to_s
|
2013-05-28 12:24:48 +00:00
|
|
|
|
|
|
|
# user
|
|
|
|
tests = [
|
|
|
|
{
|
|
|
|
:name => 'add #1',
|
|
|
|
:action => [
|
2013-07-17 13:57:12 +00:00
|
|
|
{
|
|
|
|
:execute => 'close_all_tasks',
|
|
|
|
},
|
2013-05-28 12:24:48 +00:00
|
|
|
{
|
|
|
|
:execute => 'click',
|
2013-08-06 20:08:32 +00:00
|
|
|
:css => 'a[href="#manage"]',
|
2013-05-28 12:24:48 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'click',
|
2013-08-06 20:08:32 +00:00
|
|
|
:css => 'a[href="#manage/text_modules"]',
|
2013-05-28 12:24:48 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'click',
|
|
|
|
:css => 'a[data-type="new"]',
|
|
|
|
},
|
2014-12-02 07:41:22 +00:00
|
|
|
{
|
|
|
|
:execute => 'wait',
|
|
|
|
:value => 1,
|
|
|
|
},
|
2013-05-28 12:24:48 +00:00
|
|
|
{
|
|
|
|
:execute => 'set',
|
2013-08-06 20:08:32 +00:00
|
|
|
:css => '.modal input[name=name]',
|
2013-05-28 12:24:48 +00:00
|
|
|
:value => 'some name' + random,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'set',
|
2013-08-06 20:08:32 +00:00
|
|
|
:css => '.modal input[name="keywords"]',
|
2013-05-28 12:24:48 +00:00
|
|
|
:value => random,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'set',
|
2013-08-06 20:08:32 +00:00
|
|
|
:css => '.modal textarea[name="content"]',
|
2013-05-28 12:24:48 +00:00
|
|
|
:value => 'some content' + random,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'click',
|
2014-09-16 18:57:55 +00:00
|
|
|
:css => '.modal button.js-submit',
|
2013-05-28 12:24:48 +00:00
|
|
|
},
|
|
|
|
{
|
2014-12-03 10:01:04 +00:00
|
|
|
:execute => 'watch_for',
|
|
|
|
:area => '#content table',
|
|
|
|
:value => 'some name' + random,
|
2013-05-28 12:24:48 +00:00
|
|
|
},
|
|
|
|
{
|
2014-12-03 10:01:04 +00:00
|
|
|
:execute => 'watch_for_disappear',
|
|
|
|
:area => '.modal',
|
2013-05-28 12:24:48 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:name => 'add #2',
|
|
|
|
:action => [
|
|
|
|
{
|
|
|
|
:execute => 'click',
|
2013-08-06 20:08:32 +00:00
|
|
|
:css => 'a[href="#manage"]',
|
2013-05-28 12:24:48 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'click',
|
2013-08-06 20:08:32 +00:00
|
|
|
:css => 'a[href="#manage/text_modules"]',
|
2013-05-28 12:24:48 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'click',
|
|
|
|
:css => 'a[data-type="new"]',
|
|
|
|
},
|
2014-12-02 07:41:22 +00:00
|
|
|
{
|
|
|
|
:execute => 'wait',
|
|
|
|
:value => 1,
|
|
|
|
},
|
2013-05-28 12:24:48 +00:00
|
|
|
{
|
|
|
|
:execute => 'set',
|
2013-08-06 20:08:32 +00:00
|
|
|
:css => '.modal input[name=name]',
|
2013-05-28 12:24:48 +00:00
|
|
|
:value => 'some name' + random2,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'set',
|
2013-08-06 20:08:32 +00:00
|
|
|
:css => '.modal input[name="keywords"]',
|
2013-05-28 12:24:48 +00:00
|
|
|
:value => random2,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'set',
|
2013-08-06 20:08:32 +00:00
|
|
|
:css => '.modal textarea[name="content"]',
|
2013-05-28 12:24:48 +00:00
|
|
|
:value => 'some content' + random2,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'click',
|
2014-09-16 18:57:55 +00:00
|
|
|
:css => '.modal button.js-submit',
|
2013-05-28 12:24:48 +00:00
|
|
|
},
|
|
|
|
{
|
2014-12-03 10:01:04 +00:00
|
|
|
:execute => 'watch_for',
|
|
|
|
:area => '#content table',
|
|
|
|
:value => 'some name' + random2,
|
2013-05-28 12:24:48 +00:00
|
|
|
},
|
|
|
|
{
|
2014-12-03 10:01:04 +00:00
|
|
|
:execute => 'watch_for_disappear',
|
|
|
|
:area => '.modal',
|
2013-05-28 12:24:48 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:name => 'verify usage',
|
|
|
|
:action => [
|
|
|
|
{
|
|
|
|
:execute => 'click',
|
|
|
|
:css => 'a[href="#new"]',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'click',
|
2014-09-15 09:06:13 +00:00
|
|
|
:css => 'a[href="#ticket/create"]',
|
2013-05-28 12:24:48 +00:00
|
|
|
},
|
|
|
|
{
|
2014-12-03 12:45:59 +00:00
|
|
|
:execute => 'watch_for',
|
|
|
|
:area => '.active [data-name="body"]',
|
|
|
|
:value => '',
|
2013-05-28 12:24:48 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'set',
|
2014-10-03 22:39:54 +00:00
|
|
|
:css => '.active [data-name="body"]',
|
2014-10-14 00:13:19 +00:00
|
|
|
:value => 'test ::' + random,
|
2013-05-28 12:24:48 +00:00
|
|
|
},
|
|
|
|
{
|
2014-12-03 10:01:04 +00:00
|
|
|
:execute => 'watch_for',
|
|
|
|
:area => '.active .shortcut',
|
|
|
|
:value => random,
|
2013-05-28 12:24:48 +00:00
|
|
|
},
|
|
|
|
{
|
2014-10-11 23:35:53 +00:00
|
|
|
:execute => 'sendkey',
|
2014-12-02 23:55:51 +00:00
|
|
|
:value => [:arrow_down]
|
|
|
|
},
|
2014-12-03 12:45:59 +00:00
|
|
|
{
|
|
|
|
:execute => 'wait',
|
|
|
|
:value => 1,
|
|
|
|
},
|
2014-12-02 23:55:51 +00:00
|
|
|
{
|
|
|
|
:execute => 'click',
|
|
|
|
:css => '.active .shortcut > ul> li > a',
|
2013-07-17 13:57:12 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'wait',
|
|
|
|
:value => 1,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'match',
|
2014-10-03 22:39:54 +00:00
|
|
|
:css => '.active [data-name="body"]',
|
2013-07-17 13:57:12 +00:00
|
|
|
:value => 'some content' + random,
|
|
|
|
:match_result => true,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
]
|
|
|
|
browser_signle_test_with_login(tests, { :username => 'master@example.com' })
|
|
|
|
end
|
|
|
|
def test_II
|
2014-09-09 23:42:20 +00:00
|
|
|
random = 'text_II_module_test_' + rand(99999999).to_s
|
2013-07-17 13:57:12 +00:00
|
|
|
|
2014-09-09 23:42:20 +00:00
|
|
|
user_rand = rand(99999999).to_s
|
2014-08-15 08:59:40 +00:00
|
|
|
login = 'agent-text-module-' + user_rand
|
|
|
|
firstname = 'Text' + user_rand
|
|
|
|
lastname = 'Module' + user_rand
|
|
|
|
email = 'agent-text-module-' + user_rand + '@example.com'
|
|
|
|
password = 'agentpw'
|
|
|
|
|
2013-07-17 13:57:12 +00:00
|
|
|
# user
|
|
|
|
tests = [
|
|
|
|
{
|
|
|
|
:name => 'start',
|
|
|
|
:instance1 => browser_instance,
|
|
|
|
:instance2 => browser_instance,
|
|
|
|
:instance1_username => 'master@example.com',
|
|
|
|
:instance1_password => 'test',
|
|
|
|
:instance2_username => 'agent1@example.com',
|
|
|
|
:instance2_password => 'test',
|
|
|
|
:action => [
|
|
|
|
# create ticket
|
|
|
|
{
|
|
|
|
:where => :instance2,
|
|
|
|
:execute => 'close_all_tasks',
|
|
|
|
},
|
|
|
|
{
|
2014-10-14 00:13:19 +00:00
|
|
|
:where => :instance2,
|
|
|
|
:execute => 'create_ticket',
|
|
|
|
:subject => 'A',
|
|
|
|
:customer => '',
|
|
|
|
:do_not_submit => true,
|
2013-07-17 21:23:31 +00:00
|
|
|
},
|
2013-07-17 13:57:12 +00:00
|
|
|
{
|
2014-10-14 00:13:19 +00:00
|
|
|
:where => :instance2,
|
|
|
|
:execute => 'create_ticket',
|
|
|
|
:customer => '',
|
|
|
|
:subject => 'B',
|
|
|
|
:do_not_submit => true,
|
2013-07-17 13:57:12 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
# create new text module
|
|
|
|
{
|
|
|
|
:where => :instance1,
|
|
|
|
:execute => 'click',
|
2013-08-06 20:08:32 +00:00
|
|
|
:css => 'a[href="#manage"]',
|
2013-07-17 13:57:12 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
:where => :instance1,
|
|
|
|
:execute => 'click',
|
2013-08-06 20:08:32 +00:00
|
|
|
:css => 'a[href="#manage/text_modules"]',
|
2013-07-17 13:57:12 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
:where => :instance1,
|
|
|
|
:execute => 'click',
|
|
|
|
:css => 'a[data-type="new"]',
|
|
|
|
},
|
2014-12-02 07:41:22 +00:00
|
|
|
{
|
|
|
|
:execute => 'wait',
|
|
|
|
:value => 1,
|
|
|
|
},
|
2013-07-17 13:57:12 +00:00
|
|
|
{
|
|
|
|
:where => :instance1,
|
|
|
|
:execute => 'set',
|
2013-08-06 20:08:32 +00:00
|
|
|
:css => '.modal input[name=name]',
|
2013-07-17 13:57:12 +00:00
|
|
|
:value => 'some name' + random,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:where => :instance1,
|
|
|
|
:execute => 'set',
|
2013-08-06 20:08:32 +00:00
|
|
|
:css => '.modal input[name="keywords"]',
|
2013-07-17 13:57:12 +00:00
|
|
|
:value => random,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:where => :instance1,
|
|
|
|
:execute => 'set',
|
2013-08-06 20:08:32 +00:00
|
|
|
:css => '.modal textarea[name="content"]',
|
2013-07-17 13:57:12 +00:00
|
|
|
:value => 'some content <%= @ticket.customer.lastname %>' + random,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:where => :instance1,
|
|
|
|
:execute => 'click',
|
2014-09-16 18:57:55 +00:00
|
|
|
:css => '.modal button.js-submit',
|
2013-07-17 13:57:12 +00:00
|
|
|
},
|
|
|
|
{
|
2014-12-03 10:01:04 +00:00
|
|
|
:where => :instance1,
|
|
|
|
:execute => 'watch_for',
|
|
|
|
:area => '#content table',
|
|
|
|
:value => random,
|
2013-07-17 13:57:12 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
:where => :instance1,
|
2014-12-03 10:01:04 +00:00
|
|
|
:execute => 'watch_for_disappear',
|
|
|
|
:area => '.modal',
|
2013-07-17 13:57:12 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
},
|
2014-08-15 08:59:40 +00:00
|
|
|
|
|
|
|
# create user
|
|
|
|
{
|
|
|
|
:name => 'create user',
|
|
|
|
:action => [
|
|
|
|
{
|
2014-12-03 10:01:04 +00:00
|
|
|
:where => :instance1,
|
|
|
|
:execute => 'create_user',
|
|
|
|
:login => login,
|
|
|
|
:firstname => firstname,
|
|
|
|
:lastname => lastname,
|
|
|
|
:email => email,
|
|
|
|
:password => password,
|
2014-08-15 08:59:40 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2013-07-17 13:57:12 +00:00
|
|
|
{
|
|
|
|
:name => 'check if text module exists in instance2, for ready to use',
|
|
|
|
:action => [
|
|
|
|
{
|
|
|
|
:execute => 'wait',
|
2013-08-19 15:26:44 +00:00
|
|
|
:value => 4,
|
2013-07-17 13:57:12 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
:where => :instance2,
|
|
|
|
:execute => 'set',
|
2014-10-03 22:39:54 +00:00
|
|
|
:css => '.active [data-name="body"]',
|
2013-07-17 13:57:12 +00:00
|
|
|
:value => '::' + random,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:where => :instance2,
|
|
|
|
:execute => 'wait',
|
2014-10-14 00:13:19 +00:00
|
|
|
:value => 2,
|
2013-07-17 13:57:12 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
:where => :instance2,
|
|
|
|
:execute => 'match',
|
|
|
|
:css => 'body',
|
|
|
|
:value => random,
|
|
|
|
:match_result => true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:where => :instance2,
|
2014-10-11 23:35:53 +00:00
|
|
|
:execute => 'sendkey',
|
2014-12-02 23:55:51 +00:00
|
|
|
:value => [:arrow_down]
|
|
|
|
},
|
2014-12-03 12:45:59 +00:00
|
|
|
{
|
|
|
|
:where => :instance2,
|
|
|
|
:execute => 'wait',
|
|
|
|
:value => 3,
|
|
|
|
},
|
2014-12-02 23:55:51 +00:00
|
|
|
{
|
|
|
|
:where => :instance2,
|
|
|
|
:execute => 'click',
|
|
|
|
:css => '.active .shortcut > ul> li > a',
|
2013-07-17 13:57:12 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
:where => :instance2,
|
|
|
|
:execute => 'wait',
|
|
|
|
:value => 1,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:where => :instance2,
|
|
|
|
:execute => 'match',
|
2014-10-03 22:39:54 +00:00
|
|
|
:css => '.active [data-name="body"]',
|
2013-07-17 13:57:12 +00:00
|
|
|
:value => 'some content ' + random,
|
|
|
|
:match_result => true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'wait',
|
|
|
|
:value => 3,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:where => :instance2,
|
|
|
|
:execute => 'set',
|
2014-10-11 23:35:53 +00:00
|
|
|
:css => '.active .newTicket input[name="customer_id_completion"]',
|
2013-07-17 13:57:12 +00:00
|
|
|
:value => 'nicole',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'wait',
|
|
|
|
:value => 4,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:where => :instance2,
|
2013-05-28 12:24:48 +00:00
|
|
|
:execute => 'sendkey',
|
2014-12-02 21:34:46 +00:00
|
|
|
:value => [:arrow_down]
|
|
|
|
},
|
2014-12-03 12:45:59 +00:00
|
|
|
{
|
|
|
|
:where => :instance2,
|
|
|
|
:execute => 'wait',
|
|
|
|
:value => 1,
|
|
|
|
},
|
2014-12-02 21:34:46 +00:00
|
|
|
{
|
|
|
|
:where => :instance2,
|
|
|
|
:execute => 'click',
|
|
|
|
:css => '.active .newTicket .recipientList-entry.js-user.is-active',
|
2013-07-17 13:57:12 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
:where => :instance2,
|
|
|
|
:execute => 'wait',
|
|
|
|
:value => 1,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:where => :instance2,
|
|
|
|
:execute => 'set',
|
2014-10-03 22:39:54 +00:00
|
|
|
:css => '.active [data-name="body"]',
|
2013-07-17 13:57:12 +00:00
|
|
|
:value => '::' + random,
|
2013-05-28 12:24:48 +00:00
|
|
|
},
|
|
|
|
{
|
2013-07-17 13:57:12 +00:00
|
|
|
:where => :instance2,
|
2013-05-28 12:24:48 +00:00
|
|
|
:execute => 'wait',
|
|
|
|
:value => 1,
|
|
|
|
},
|
|
|
|
{
|
2013-07-17 13:57:12 +00:00
|
|
|
:where => :instance2,
|
2014-10-11 23:35:53 +00:00
|
|
|
:execute => 'sendkey',
|
2014-12-02 23:55:51 +00:00
|
|
|
:value => [:arrow_down]
|
|
|
|
},
|
2014-12-03 12:45:59 +00:00
|
|
|
{
|
|
|
|
:where => :instance2,
|
|
|
|
:execute => 'wait',
|
2014-12-03 18:53:42 +00:00
|
|
|
:value => 1,
|
2014-12-03 12:45:59 +00:00
|
|
|
},
|
2014-12-02 23:55:51 +00:00
|
|
|
{
|
|
|
|
:where => :instance2,
|
|
|
|
:execute => 'click',
|
|
|
|
:css => '.active .shortcut > ul> li > a',
|
2013-07-17 13:57:12 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
:where => :instance2,
|
|
|
|
:execute => 'wait',
|
|
|
|
:value => 1,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:where => :instance2,
|
2013-05-28 12:24:48 +00:00
|
|
|
:execute => 'match',
|
2014-10-03 22:39:54 +00:00
|
|
|
:css => '.active [data-name="body"]',
|
2013-07-17 13:57:12 +00:00
|
|
|
:value => 'some content Braun' + random,
|
2013-05-28 12:24:48 +00:00
|
|
|
:match_result => true,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2013-08-19 13:15:49 +00:00
|
|
|
{
|
|
|
|
:name => 'verify zoom',
|
|
|
|
:action => [
|
|
|
|
|
2014-08-15 18:17:39 +00:00
|
|
|
{
|
|
|
|
:where => :instance1,
|
|
|
|
:execute => 'click',
|
|
|
|
:css => 'a[href="#manage"]',
|
|
|
|
},
|
|
|
|
|
2013-08-19 13:15:49 +00:00
|
|
|
# create ticket
|
|
|
|
{
|
|
|
|
:where => :instance2,
|
|
|
|
:execute => 'create_ticket',
|
|
|
|
:group => 'Users',
|
|
|
|
:subject => 'some subject 123äöü',
|
|
|
|
:body => 'some body 123äöü',
|
|
|
|
},
|
|
|
|
|
|
|
|
# check ticket
|
|
|
|
{
|
|
|
|
:where => :instance2,
|
|
|
|
:execute => 'match',
|
2013-10-01 22:41:56 +00:00
|
|
|
:css => '.active div.ticket-article',
|
2013-08-19 13:15:49 +00:00
|
|
|
:value => 'some body 123äöü',
|
|
|
|
:match_result => true,
|
|
|
|
},
|
|
|
|
|
|
|
|
# check ticket zoom
|
|
|
|
{
|
|
|
|
:execute => 'wait',
|
|
|
|
:value => 4,
|
|
|
|
},
|
2013-08-19 15:26:44 +00:00
|
|
|
{
|
|
|
|
:where => :instance2,
|
|
|
|
:execute => 'set',
|
2014-10-03 22:39:54 +00:00
|
|
|
:css => '.active [data-name="body"]',
|
2013-08-19 15:26:44 +00:00
|
|
|
:value => 'test',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'wait',
|
2014-09-09 23:42:20 +00:00
|
|
|
:value => 2,
|
2013-08-19 15:26:44 +00:00
|
|
|
},
|
2013-08-19 13:15:49 +00:00
|
|
|
{
|
|
|
|
:where => :instance2,
|
|
|
|
:execute => 'set',
|
2014-10-03 22:39:54 +00:00
|
|
|
:css => '.active [data-name="body"]',
|
2013-08-19 13:15:49 +00:00
|
|
|
:value => '::' + random,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'wait',
|
2014-10-14 00:13:19 +00:00
|
|
|
:value => 2,
|
2013-08-19 13:15:49 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
:where => :instance2,
|
|
|
|
:execute => 'match',
|
2014-12-03 18:53:42 +00:00
|
|
|
:css => '.active .ticket-edit',
|
2013-08-19 13:15:49 +00:00
|
|
|
:value => random,
|
|
|
|
:match_result => true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:where => :instance2,
|
2014-10-11 23:35:53 +00:00
|
|
|
:execute => 'sendkey',
|
2014-12-02 23:55:51 +00:00
|
|
|
:value => [:arrow_down]
|
|
|
|
},
|
2014-12-03 12:45:59 +00:00
|
|
|
{
|
|
|
|
:where => :instance2,
|
|
|
|
:execute => 'wait',
|
|
|
|
:value => 1,
|
|
|
|
},
|
2014-12-02 23:55:51 +00:00
|
|
|
{
|
|
|
|
:where => :instance2,
|
|
|
|
:execute => 'click',
|
|
|
|
:css => '.active .shortcut > ul> li > a',
|
2013-08-19 13:15:49 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'wait',
|
|
|
|
:value => 1,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:where => :instance2,
|
|
|
|
:execute => 'match',
|
2014-10-03 22:39:54 +00:00
|
|
|
:css => '.active [data-name="body"]',
|
2013-08-19 15:26:44 +00:00
|
|
|
:value => 'some content Braun' + random,
|
2013-08-19 13:15:49 +00:00
|
|
|
:match_result => true,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2014-08-14 09:04:02 +00:00
|
|
|
{
|
|
|
|
:name => 'change customer',
|
|
|
|
:action => [
|
|
|
|
|
2014-08-15 18:17:39 +00:00
|
|
|
{
|
|
|
|
:where => :instance1,
|
|
|
|
:execute => 'click',
|
|
|
|
:css => 'a[href="#manage"]',
|
|
|
|
},
|
2014-08-14 09:04:02 +00:00
|
|
|
{
|
|
|
|
:where => :instance2,
|
|
|
|
:execute => 'click',
|
2014-12-01 20:04:37 +00:00
|
|
|
:css => '.active div[data-tab="ticket"] .js-actions .select-arrow',
|
2014-08-14 09:04:02 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
:where => :instance2,
|
|
|
|
:execute => 'click',
|
2014-12-01 20:04:37 +00:00
|
|
|
:css => '.active div[data-tab="ticket"] .js-actions a[data-type="customer-change"]',
|
2014-08-14 09:04:02 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'wait',
|
|
|
|
:value => 1,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:where => :instance2,
|
|
|
|
:execute => 'set',
|
2014-10-14 00:13:19 +00:00
|
|
|
:css => '.modal [name="customer_id_completion"]',
|
2014-08-15 12:33:03 +00:00
|
|
|
:value => firstname,
|
2014-08-14 09:04:02 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'wait',
|
|
|
|
:value => 4,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:where => :instance2,
|
|
|
|
:execute => 'sendkey',
|
2014-12-02 21:34:46 +00:00
|
|
|
:value => [:arrow_down]
|
|
|
|
},
|
2014-12-03 12:45:59 +00:00
|
|
|
{
|
|
|
|
:where => :instance2,
|
|
|
|
:execute => 'wait',
|
|
|
|
:value => 1,
|
|
|
|
},
|
2014-12-02 21:34:46 +00:00
|
|
|
{
|
|
|
|
:where => :instance2,
|
|
|
|
:execute => 'click',
|
|
|
|
:css => '.modal .recipientList-entry.js-user.is-active',
|
2014-08-14 09:04:02 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
:where => :instance2,
|
|
|
|
:execute => 'wait',
|
|
|
|
:value => 1,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:where => :instance2,
|
|
|
|
:execute => 'click',
|
2014-10-14 00:13:19 +00:00
|
|
|
:css => '.modal-content .js-submit',
|
2014-08-14 09:04:02 +00:00
|
|
|
},
|
|
|
|
{
|
2014-12-03 12:45:59 +00:00
|
|
|
:execute => 'watch_for_disappear',
|
|
|
|
:area => '.modal',
|
2014-08-14 09:04:02 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
:where => :instance2,
|
|
|
|
:execute => 'set',
|
2014-10-03 22:39:54 +00:00
|
|
|
:css => '.active [data-name="body"]',
|
2014-08-14 09:04:02 +00:00
|
|
|
:value => '::' + random,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'wait',
|
2014-10-14 00:13:19 +00:00
|
|
|
:value => 2,
|
2014-08-18 07:00:23 +00:00
|
|
|
},
|
|
|
|
# {
|
|
|
|
# :where => :instance2,
|
|
|
|
# :execute => 'match',
|
|
|
|
# :css => 'body',
|
|
|
|
# :value => random,
|
|
|
|
# :match_result => true,
|
|
|
|
# },
|
2014-08-14 09:04:02 +00:00
|
|
|
{
|
|
|
|
:where => :instance2,
|
2014-10-11 23:35:53 +00:00
|
|
|
:execute => 'sendkey',
|
2014-12-02 23:55:51 +00:00
|
|
|
:value => [:arrow_down]
|
|
|
|
},
|
2014-12-03 12:45:59 +00:00
|
|
|
{
|
|
|
|
:where => :instance2,
|
|
|
|
:execute => 'wait',
|
|
|
|
:value => 1,
|
|
|
|
},
|
2014-12-02 23:55:51 +00:00
|
|
|
{
|
|
|
|
:where => :instance2,
|
|
|
|
:execute => 'click',
|
|
|
|
:css => '.active .shortcut > ul> li > a',
|
2014-08-14 09:04:02 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'wait',
|
|
|
|
:value => 1,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:where => :instance2,
|
|
|
|
:execute => 'match',
|
2014-10-03 22:39:54 +00:00
|
|
|
:css => '.active [data-name="body"]',
|
2014-08-15 08:59:40 +00:00
|
|
|
:value => 'some content ' + lastname,
|
2014-08-14 09:04:02 +00:00
|
|
|
:match_result => true,
|
|
|
|
},
|
2014-08-15 12:33:03 +00:00
|
|
|
{
|
|
|
|
:execute => 'wait',
|
|
|
|
:value => 2,
|
|
|
|
},
|
2014-08-14 09:04:02 +00:00
|
|
|
],
|
|
|
|
},
|
|
|
|
|
|
|
|
|
2013-05-28 12:24:48 +00:00
|
|
|
]
|
2013-07-17 13:57:12 +00:00
|
|
|
browser_double_test(tests)
|
2013-05-28 12:24:48 +00:00
|
|
|
end
|
|
|
|
end
|