Maintenance: Activated rubocop Style/MethodCallWithoutArgsParentheses.
This commit is contained in:
parent
814f7e997b
commit
5243efbc25
82 changed files with 326 additions and 331 deletions
|
@ -91,11 +91,6 @@ Layout/LeadingCommentSpace:
|
||||||
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-space'
|
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-space'
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
Style/MethodCallWithoutArgsParentheses:
|
|
||||||
Description: 'Do not use parentheses for method calls with no arguments.'
|
|
||||||
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-args-no-parens'
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Layout/SpaceInsideReferenceBrackets:
|
Layout/SpaceInsideReferenceBrackets:
|
||||||
Description: 'Checks the spacing inside referential brackets.'
|
Description: 'Checks the spacing inside referential brackets.'
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
|
@ -75,7 +75,7 @@ module ApplicationController::RendersModels
|
||||||
def model_destroy_render(object, params)
|
def model_destroy_render(object, params)
|
||||||
generic_object = object.find(params[:id])
|
generic_object = object.find(params[:id])
|
||||||
generic_object.destroy!
|
generic_object.destroy!
|
||||||
model_destroy_render_item()
|
model_destroy_render_item
|
||||||
end
|
end
|
||||||
|
|
||||||
def model_destroy_render_item()
|
def model_destroy_render_item()
|
||||||
|
|
|
@ -5,7 +5,7 @@ class PackagesController < ApplicationController
|
||||||
|
|
||||||
# GET /api/v1/packages
|
# GET /api/v1/packages
|
||||||
def index
|
def index
|
||||||
packages = Package.all().order('name')
|
packages = Package.all.order('name')
|
||||||
render json: {
|
render json: {
|
||||||
packages: packages
|
packages: packages
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ class CommunicateTelegramJob < ApplicationJob
|
||||||
api = TelegramAPI.new(channel.options[:api_token])
|
api = TelegramAPI.new(channel.options[:api_token])
|
||||||
chat_id = ticket.preferences[:telegram][:chat_id]
|
chat_id = ticket.preferences[:telegram][:chat_id]
|
||||||
result = api.sendMessage(chat_id, article.body)
|
result = api.sendMessage(chat_id, article.body)
|
||||||
me = api.getMe()
|
me = api.getMe
|
||||||
article.attachments.each do |file|
|
article.attachments.each do |file|
|
||||||
parts = file.filename.split(%r{^(.*)(\..+?)$})
|
parts = file.filename.split(%r{^(.*)(\..+?)$})
|
||||||
t = Tempfile.new([parts[1], parts[2]])
|
t = Tempfile.new([parts[1], parts[2]])
|
||||||
|
|
|
@ -118,7 +118,7 @@ example
|
||||||
timeout(check_type_timeout) do
|
timeout(check_type_timeout) do
|
||||||
@imap = ::Net::IMAP.new(options[:host], port, ssl, nil, false)
|
@imap = ::Net::IMAP.new(options[:host], port, ssl, nil, false)
|
||||||
if starttls
|
if starttls
|
||||||
@imap.starttls()
|
@imap.starttls
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -232,7 +232,7 @@ example
|
||||||
Rails.logger.info " - verify email #{verify_string} found"
|
Rails.logger.info " - verify email #{verify_string} found"
|
||||||
timeout(600) do
|
timeout(600) do
|
||||||
@imap.store(message_id, '+FLAGS', [:Deleted])
|
@imap.store(message_id, '+FLAGS', [:Deleted])
|
||||||
@imap.expunge()
|
@imap.expunge
|
||||||
end
|
end
|
||||||
disconnect
|
disconnect
|
||||||
return {
|
return {
|
||||||
|
@ -339,7 +339,7 @@ example
|
||||||
if !keep_on_server
|
if !keep_on_server
|
||||||
begin
|
begin
|
||||||
timeout(EXPUNGE_TIMEOUT) do
|
timeout(EXPUNGE_TIMEOUT) do
|
||||||
@imap.expunge()
|
@imap.expunge
|
||||||
end
|
end
|
||||||
rescue Timeout::Error => e
|
rescue Timeout::Error => e
|
||||||
Rails.logger.error "Unable to expunge server (#{options[:host]}/#{options[:user]}): #{e.inspect}"
|
Rails.logger.error "Unable to expunge server (#{options[:host]}/#{options[:user]}): #{e.inspect}"
|
||||||
|
@ -382,7 +382,7 @@ example
|
||||||
return if !@imap
|
return if !@imap
|
||||||
|
|
||||||
timeout(1.minute) do
|
timeout(1.minute) do
|
||||||
@imap.disconnect()
|
@imap.disconnect
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -118,7 +118,7 @@ returns
|
||||||
permission_ids = Role.permission_ids_by_name(keys)
|
permission_ids = Role.permission_ids_by_name(keys)
|
||||||
Role.joins(:permissions_roles).joins(:permissions).where(
|
Role.joins(:permissions_roles).joins(:permissions).where(
|
||||||
'permissions_roles.permission_id IN (?) AND roles.active = ? AND permissions.active = ?', permission_ids, true, true
|
'permissions_roles.permission_id IN (?) AND roles.active = ? AND permissions.active = ?', permission_ids, true, true
|
||||||
).distinct()
|
).distinct
|
||||||
end
|
end
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
@ -142,7 +142,7 @@ returns
|
||||||
permission_ids = Role.permission_ids_by_name(keys)
|
permission_ids = Role.permission_ids_by_name(keys)
|
||||||
return true if Role.joins(:permissions_roles).joins(:permissions).where(
|
return true if Role.joins(:permissions_roles).joins(:permissions).where(
|
||||||
'roles.id = ? AND permissions_roles.permission_id IN (?) AND permissions.active = ?', id, permission_ids, true
|
'roles.id = ? AND permissions_roles.permission_id IN (?) AND permissions.active = ?', id, permission_ids, true
|
||||||
).distinct().count.nonzero?
|
).distinct.count.nonzero?
|
||||||
|
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
|
@ -192,7 +192,7 @@ returns
|
||||||
|
|
||||||
def last_admin_check_admin_count
|
def last_admin_check_admin_count
|
||||||
admin_role_ids = Role.joins(:permissions).where(permissions: { name: ['admin', 'admin.user'], active: true }, roles: { active: true }).where.not(id: id).pluck(:id)
|
admin_role_ids = Role.joins(:permissions).where(permissions: { name: ['admin', 'admin.user'], active: true }, roles: { active: true }).where.not(id: id).pluck(:id)
|
||||||
User.joins(:roles).where(roles: { id: admin_role_ids }, users: { active: true }).distinct().count
|
User.joins(:roles).where(roles: { id: admin_role_ids }, users: { active: true }).distinct.count
|
||||||
end
|
end
|
||||||
|
|
||||||
def validate_agent_limit_by_attributes
|
def validate_agent_limit_by_attributes
|
||||||
|
@ -202,8 +202,8 @@ returns
|
||||||
return true if !with_permission?('ticket.agent')
|
return true if !with_permission?('ticket.agent')
|
||||||
|
|
||||||
ticket_agent_role_ids = Role.joins(:permissions).where(permissions: { name: 'ticket.agent', active: true }, roles: { active: true }).pluck(:id)
|
ticket_agent_role_ids = Role.joins(:permissions).where(permissions: { name: 'ticket.agent', active: true }, roles: { active: true }).pluck(:id)
|
||||||
currents = User.joins(:roles).where(roles: { id: ticket_agent_role_ids }, users: { active: true }).distinct().pluck(:id)
|
currents = User.joins(:roles).where(roles: { id: ticket_agent_role_ids }, users: { active: true }).distinct.pluck(:id)
|
||||||
news = User.joins(:roles).where(roles: { id: id }, users: { active: true }).distinct().pluck(:id)
|
news = User.joins(:roles).where(roles: { id: id }, users: { active: true }).distinct.pluck(:id)
|
||||||
count = currents.concat(news).uniq.count
|
count = currents.concat(news).uniq.count
|
||||||
raise Exceptions::UnprocessableEntity, 'Agent limit exceeded, please check your account settings.' if count > Setting.get('system_agent_limit').to_i
|
raise Exceptions::UnprocessableEntity, 'Agent limit exceeded, please check your account settings.' if count > Setting.get('system_agent_limit').to_i
|
||||||
|
|
||||||
|
@ -218,7 +218,7 @@ returns
|
||||||
|
|
||||||
ticket_agent_role_ids = Role.joins(:permissions).where(permissions: { name: 'ticket.agent' }, roles: { active: true }).pluck(:id)
|
ticket_agent_role_ids = Role.joins(:permissions).where(permissions: { name: 'ticket.agent' }, roles: { active: true }).pluck(:id)
|
||||||
ticket_agent_role_ids.push(id)
|
ticket_agent_role_ids.push(id)
|
||||||
count = User.joins(:roles).where(roles: { id: ticket_agent_role_ids }, users: { active: true }).distinct().count
|
count = User.joins(:roles).where(roles: { id: ticket_agent_role_ids }, users: { active: true }).distinct.count
|
||||||
raise Exceptions::UnprocessableEntity, 'Agent limit exceeded, please check your account settings.' if count > Setting.get('system_agent_limit').to_i
|
raise Exceptions::UnprocessableEntity, 'Agent limit exceeded, please check your account settings.' if count > Setting.get('system_agent_limit').to_i
|
||||||
|
|
||||||
true
|
true
|
||||||
|
|
|
@ -288,7 +288,7 @@ class Scheduler < ApplicationModel
|
||||||
)
|
)
|
||||||
|
|
||||||
logger.info "execute #{job.method} (try_count #{try_count})..."
|
logger.info "execute #{job.method} (try_count #{try_count})..."
|
||||||
eval job.method() # rubocop:disable Security/Eval
|
eval job.method # rubocop:disable Security/Eval
|
||||||
took = Time.zone.now - started_at
|
took = Time.zone.now - started_at
|
||||||
logger.info "ended #{job.method} took: #{took} seconds."
|
logger.info "ended #{job.method} took: #{took} seconds."
|
||||||
rescue => e
|
rescue => e
|
||||||
|
|
|
@ -459,7 +459,7 @@ returns
|
||||||
end
|
end
|
||||||
next if permission_ids.blank?
|
next if permission_ids.blank?
|
||||||
|
|
||||||
Role.joins(:permissions_roles).joins(:permissions).where('permissions_roles.permission_id IN (?) AND roles.active = ? AND permissions.active = ?', permission_ids, true, true).distinct().pluck(:id).each do |role_id|
|
Role.joins(:permissions_roles).joins(:permissions).where('permissions_roles.permission_id IN (?) AND roles.active = ? AND permissions.active = ?', permission_ids, true, true).distinct.pluck(:id).each do |role_id|
|
||||||
role_ids.push role_id
|
role_ids.push role_id
|
||||||
end
|
end
|
||||||
total_role_ids.push role_ids
|
total_role_ids.push role_ids
|
||||||
|
@ -1058,7 +1058,7 @@ raise 'Minimum one user need to have admin permissions'
|
||||||
|
|
||||||
def last_admin_check_admin_count
|
def last_admin_check_admin_count
|
||||||
admin_role_ids = Role.joins(:permissions).where(permissions: { name: ['admin', 'admin.user'], active: true }, roles: { active: true }).pluck(:id)
|
admin_role_ids = Role.joins(:permissions).where(permissions: { name: ['admin', 'admin.user'], active: true }, roles: { active: true }).pluck(:id)
|
||||||
User.joins(:roles).where(roles: { id: admin_role_ids }, users: { active: true }).distinct().count - 1
|
User.joins(:roles).where(roles: { id: admin_role_ids }, users: { active: true }).distinct.count - 1
|
||||||
end
|
end
|
||||||
|
|
||||||
def validate_agent_limit_by_attributes
|
def validate_agent_limit_by_attributes
|
||||||
|
@ -1068,7 +1068,7 @@ raise 'Minimum one user need to have admin permissions'
|
||||||
return true if !permissions?('ticket.agent')
|
return true if !permissions?('ticket.agent')
|
||||||
|
|
||||||
ticket_agent_role_ids = Role.joins(:permissions).where(permissions: { name: 'ticket.agent', active: true }, roles: { active: true }).pluck(:id)
|
ticket_agent_role_ids = Role.joins(:permissions).where(permissions: { name: 'ticket.agent', active: true }, roles: { active: true }).pluck(:id)
|
||||||
count = User.joins(:roles).where(roles: { id: ticket_agent_role_ids }, users: { active: true }).distinct().count + 1
|
count = User.joins(:roles).where(roles: { id: ticket_agent_role_ids }, users: { active: true }).distinct.count + 1
|
||||||
raise Exceptions::UnprocessableEntity, 'Agent limit exceeded, please check your account settings.' if count > Setting.get('system_agent_limit').to_i
|
raise Exceptions::UnprocessableEntity, 'Agent limit exceeded, please check your account settings.' if count > Setting.get('system_agent_limit').to_i
|
||||||
|
|
||||||
true
|
true
|
||||||
|
@ -1081,7 +1081,7 @@ raise 'Minimum one user need to have admin permissions'
|
||||||
return true if !role.with_permission?('ticket.agent')
|
return true if !role.with_permission?('ticket.agent')
|
||||||
|
|
||||||
ticket_agent_role_ids = Role.joins(:permissions).where(permissions: { name: 'ticket.agent', active: true }, roles: { active: true }).pluck(:id)
|
ticket_agent_role_ids = Role.joins(:permissions).where(permissions: { name: 'ticket.agent', active: true }, roles: { active: true }).pluck(:id)
|
||||||
count = User.joins(:roles).where(roles: { id: ticket_agent_role_ids }, users: { active: true }).distinct().count
|
count = User.joins(:roles).where(roles: { id: ticket_agent_role_ids }, users: { active: true }).distinct.count
|
||||||
|
|
||||||
# if new added role is a ticket.agent role
|
# if new added role is a ticket.agent role
|
||||||
if ticket_agent_role_ids.include?(role.id)
|
if ticket_agent_role_ids.include?(role.id)
|
||||||
|
|
|
@ -6,7 +6,7 @@ class Auth
|
||||||
def valid?(user, password)
|
def valid?(user, password)
|
||||||
return false if !Setting.get('ldap_integration')
|
return false if !Setting.get('ldap_integration')
|
||||||
|
|
||||||
ldap_user = ::Ldap::User.new()
|
ldap_user = ::Ldap::User.new
|
||||||
|
|
||||||
# get from config or fallback to login
|
# get from config or fallback to login
|
||||||
# for a list of user attributes which should
|
# for a list of user attributes which should
|
||||||
|
|
|
@ -64,7 +64,7 @@ class Ldap
|
||||||
# @return [true] Returns always true
|
# @return [true] Returns always true
|
||||||
def search(filter, base: nil, scope: nil, attributes: nil, &block)
|
def search(filter, base: nil, scope: nil, attributes: nil, &block)
|
||||||
|
|
||||||
base ||= base_dn()
|
base ||= base_dn
|
||||||
scope ||= Net::LDAP::SearchScope_WholeSubtree
|
scope ||= Net::LDAP::SearchScope_WholeSubtree
|
||||||
|
|
||||||
connection.search(
|
connection.search(
|
||||||
|
|
|
@ -15,7 +15,7 @@ check token and return bot attributes of token
|
||||||
def self.check_token(token)
|
def self.check_token(token)
|
||||||
api = TelegramAPI.new(token)
|
api = TelegramAPI.new(token)
|
||||||
begin
|
begin
|
||||||
bot = api.getMe()
|
bot = api.getMe
|
||||||
rescue
|
rescue
|
||||||
raise Exceptions::UnprocessableEntity, 'invalid api token'
|
raise Exceptions::UnprocessableEntity, 'invalid api token'
|
||||||
end
|
end
|
||||||
|
|
|
@ -22,7 +22,7 @@ RSpec.describe MigrateLdapSamaccountnameToUidJob, type: :job do
|
||||||
}
|
}
|
||||||
allow(Import::Ldap).to receive(:config).and_return(ldap_config)
|
allow(Import::Ldap).to receive(:config).and_return(ldap_config)
|
||||||
|
|
||||||
ldap_user = double()
|
ldap_user = double
|
||||||
allow(ldap_user).to receive(:uid_attribute).and_return('samaccountname')
|
allow(ldap_user).to receive(:uid_attribute).and_return('samaccountname')
|
||||||
allow(::Ldap::User).to receive(:new).and_return(ldap_user)
|
allow(::Ldap::User).to receive(:new).and_return(ldap_user)
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ RSpec.describe MigrateLdapSamaccountnameToUidJob, type: :job do
|
||||||
|
|
||||||
allow(Import::Ldap).to receive(:config).and_return(ldap_config_obsolete)
|
allow(Import::Ldap).to receive(:config).and_return(ldap_config_obsolete)
|
||||||
|
|
||||||
ldap_user = double()
|
ldap_user = double
|
||||||
allow(ldap_user).to receive(:uid_attribute).and_return('objectguid')
|
allow(ldap_user).to receive(:uid_attribute).and_return('objectguid')
|
||||||
allow(::Ldap::User).to receive(:new).and_return(ldap_user)
|
allow(::Ldap::User).to receive(:new).and_return(ldap_user)
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ RSpec.describe TriggerWebhookJob::RecordPayload do
|
||||||
let(:backend) { TriggerWebhookJob::RecordPayload::Ticket }
|
let(:backend) { TriggerWebhookJob::RecordPayload::Ticket }
|
||||||
|
|
||||||
it 'initializes backend instance and sends generate' do
|
it 'initializes backend instance and sends generate' do
|
||||||
instance = double()
|
instance = double
|
||||||
allow(instance).to receive(:generate)
|
allow(instance).to receive(:generate)
|
||||||
allow(backend).to receive(:new).and_return(instance)
|
allow(backend).to receive(:new).and_return(instance)
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ end
|
||||||
|
|
||||||
RSpec.shared_examples 'Import::BaseFactory extender' do
|
RSpec.shared_examples 'Import::BaseFactory extender' do
|
||||||
it 'calls new on determined backend object' do
|
it 'calls new on determined backend object' do
|
||||||
record = double()
|
record = double
|
||||||
allow(described_class).to receive(:backend_class).and_return(Class)
|
allow(described_class).to receive(:backend_class).and_return(Class)
|
||||||
allow(Class).to receive(:new)
|
allow(Class).to receive(:new)
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ RSpec.describe Import::Base do
|
||||||
it 'returns false by default' do
|
it 'returns false by default' do
|
||||||
import_job = create(:import_job)
|
import_job = create(:import_job)
|
||||||
instance = described_class.new(import_job)
|
instance = described_class.new(import_job)
|
||||||
delayed_job = double()
|
delayed_job = double
|
||||||
|
|
||||||
expect(instance.reschedule?(delayed_job)).to be false
|
expect(instance.reschedule?(delayed_job)).to be false
|
||||||
end
|
end
|
||||||
|
|
|
@ -95,7 +95,7 @@ RSpec.describe Import::Ldap, sequencer: :caller do
|
||||||
it 'initiates always a rescheduling' do
|
it 'initiates always a rescheduling' do
|
||||||
import_job = create(:import_job)
|
import_job = create(:import_job)
|
||||||
instance = described_class.new(import_job)
|
instance = described_class.new(import_job)
|
||||||
delayed_job = double()
|
delayed_job = double
|
||||||
|
|
||||||
expect(instance.reschedule?(delayed_job)).to be true
|
expect(instance.reschedule?(delayed_job)).to be true
|
||||||
end
|
end
|
||||||
|
@ -103,7 +103,7 @@ RSpec.describe Import::Ldap, sequencer: :caller do
|
||||||
it 'updates the result with an info text' do
|
it 'updates the result with an info text' do
|
||||||
import_job = create(:import_job)
|
import_job = create(:import_job)
|
||||||
instance = described_class.new(import_job)
|
instance = described_class.new(import_job)
|
||||||
delayed_job = double()
|
delayed_job = double
|
||||||
|
|
||||||
expect do
|
expect do
|
||||||
instance.reschedule?(delayed_job)
|
instance.reschedule?(delayed_job)
|
||||||
|
|
|
@ -45,7 +45,7 @@ RSpec.describe Import::OTRS::Article::AttachmentFactory do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'deletes old and reimports' do
|
it 'deletes old and reimports' do
|
||||||
dummy_attachment = double()
|
dummy_attachment = double
|
||||||
expect(dummy_attachment).to receive(:delete)
|
expect(dummy_attachment).to receive(:delete)
|
||||||
article_attachment_expectations([dummy_attachment])
|
article_attachment_expectations([dummy_attachment])
|
||||||
import_expectations
|
import_expectations
|
||||||
|
|
|
@ -19,8 +19,8 @@ RSpec.describe Import::OTRS::Requester do
|
||||||
context 'caching request results' do
|
context 'caching request results' do
|
||||||
|
|
||||||
let(:response) do
|
let(:response) do
|
||||||
response = double()
|
response = double
|
||||||
response_body = double()
|
response_body = double
|
||||||
allow(response_body).to receive(:to_s).at_least(:once).and_return('{"Result": {}}')
|
allow(response_body).to receive(:to_s).at_least(:once).and_return('{"Result": {}}')
|
||||||
allow(response).to receive('success?').at_least(:once).and_return(true)
|
allow(response).to receive('success?').at_least(:once).and_return(true)
|
||||||
allow(response).to receive('body').at_least(:once).and_return(response_body)
|
allow(response).to receive('body').at_least(:once).and_return(response_body)
|
||||||
|
|
|
@ -10,7 +10,7 @@ RSpec.describe Ldap::Group do
|
||||||
# required as 'let' to perform test based
|
# required as 'let' to perform test based
|
||||||
# expectations and reuse it in 'let' instance
|
# expectations and reuse it in 'let' instance
|
||||||
# as additional parameter
|
# as additional parameter
|
||||||
let(:mocked_ldap) { double() }
|
let(:mocked_ldap) { double }
|
||||||
|
|
||||||
describe '.uid_attribute' do
|
describe '.uid_attribute' do
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ RSpec.describe Ldap::Guid do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'tunnels to instance method' do
|
it 'tunnels to instance method' do
|
||||||
instance = double()
|
instance = double
|
||||||
allow(instance).to receive(:hex)
|
allow(instance).to receive(:hex)
|
||||||
allow(described_class).to receive(:new).with(string).and_return(instance)
|
allow(described_class).to receive(:new).with(string).and_return(instance)
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ RSpec.describe Ldap::Guid do
|
||||||
|
|
||||||
it 'tunnels to instance method' do
|
it 'tunnels to instance method' do
|
||||||
|
|
||||||
instance = double()
|
instance = double
|
||||||
allow(instance).to receive(:string)
|
allow(instance).to receive(:string)
|
||||||
allow(described_class).to receive(:new).with(hex).and_return(instance)
|
allow(described_class).to receive(:new).with(hex).and_return(instance)
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ require 'tcr/net/ldap'
|
||||||
|
|
||||||
RSpec.describe Ldap::User do
|
RSpec.describe Ldap::User do
|
||||||
|
|
||||||
let(:mocked_ldap) { double() }
|
let(:mocked_ldap) { double }
|
||||||
|
|
||||||
describe '.uid_attribute' do
|
describe '.uid_attribute' do
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ RSpec.describe Ldap::User do
|
||||||
it 'creates own Ldap instance if none given' do
|
it 'creates own Ldap instance if none given' do
|
||||||
expect(Ldap).to receive(:new)
|
expect(Ldap).to receive(:new)
|
||||||
|
|
||||||
described_class.new()
|
described_class.new
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ RSpec.describe Ldap::User do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'validates username and password' do
|
it 'validates username and password' do
|
||||||
connection = double()
|
connection = double
|
||||||
allow(mocked_ldap).to receive(:connection).and_return(connection)
|
allow(mocked_ldap).to receive(:connection).and_return(connection)
|
||||||
|
|
||||||
build(:ldap_entry)
|
build(:ldap_entry)
|
||||||
|
@ -107,7 +107,7 @@ RSpec.describe Ldap::User do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'fails for invalid credentials' do
|
it 'fails for invalid credentials' do
|
||||||
connection = double()
|
connection = double
|
||||||
allow(mocked_ldap).to receive(:connection).and_return(connection)
|
allow(mocked_ldap).to receive(:connection).and_return(connection)
|
||||||
|
|
||||||
build(:ldap_entry)
|
build(:ldap_entry)
|
||||||
|
|
|
@ -14,7 +14,7 @@ RSpec.describe Sequencer::Unit::Import::Zendesk::Ticket::Comment::Attachment::Re
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
let(:response) { double() }
|
let(:response) { double }
|
||||||
|
|
||||||
it 'open timeout should be 20s and read timeout should be 240s' do
|
it 'open timeout should be 20s and read timeout should be 240s' do
|
||||||
allow(response).to receive(:success?).and_return(true)
|
allow(response).to receive(:success?).and_return(true)
|
||||||
|
|
|
@ -248,7 +248,7 @@ RSpec.describe ImportJob do
|
||||||
|
|
||||||
it 'returns false for already finished jobs' do
|
it 'returns false for already finished jobs' do
|
||||||
instance = create(:import_job)
|
instance = create(:import_job)
|
||||||
delayed_job = double()
|
delayed_job = double
|
||||||
|
|
||||||
instance.update!(finished_at: Time.zone.now)
|
instance.update!(finished_at: Time.zone.now)
|
||||||
|
|
||||||
|
@ -257,14 +257,14 @@ RSpec.describe ImportJob do
|
||||||
|
|
||||||
it 'returns false for backends not responding to reschedule?' do
|
it 'returns false for backends not responding to reschedule?' do
|
||||||
instance = create(:import_job)
|
instance = create(:import_job)
|
||||||
delayed_job = double()
|
delayed_job = double
|
||||||
|
|
||||||
expect(instance.reschedule?(delayed_job)).to be false
|
expect(instance.reschedule?(delayed_job)).to be false
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'returns the backend reschedule? value' do
|
it 'returns the backend reschedule? value' do
|
||||||
instance = create(:import_job, name: 'Import::NoRescheduleMethod')
|
instance = create(:import_job, name: 'Import::NoRescheduleMethod')
|
||||||
delayed_job = double()
|
delayed_job = double
|
||||||
|
|
||||||
expect(instance.reschedule?(delayed_job)).to eq 'invalid_but_checkable_result'
|
expect(instance.reschedule?(delayed_job)).to eq 'invalid_but_checkable_result'
|
||||||
end
|
end
|
||||||
|
|
|
@ -9,7 +9,7 @@ RSpec.describe Session, type: :model do
|
||||||
subject(:session) { described_class.create( session_id: SecureRandom.urlsafe_base64(64), data: {} ) }
|
subject(:session) { described_class.create( session_id: SecureRandom.urlsafe_base64(64), data: {} ) }
|
||||||
|
|
||||||
it 'does not set the persistent attribute' do
|
it 'does not set the persistent attribute' do
|
||||||
expect(session.persistent).to be_nil()
|
expect(session.persistent).to be_nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ RSpec.describe Session, type: :model do
|
||||||
subject(:session) { described_class.create( session_id: SecureRandom.urlsafe_base64(64), data: { 'persistent' => false }) }
|
subject(:session) { described_class.create( session_id: SecureRandom.urlsafe_base64(64), data: { 'persistent' => false }) }
|
||||||
|
|
||||||
it 'does not set the persistent attribute' do
|
it 'does not set the persistent attribute' do
|
||||||
expect(session.persistent).to be_nil()
|
expect(session.persistent).to be_nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -36,7 +36,7 @@ RSpec.describe Tag, type: :request do
|
||||||
it "found 0 tags using search term '#{search_term}'" do
|
it "found 0 tags using search term '#{search_term}'" do
|
||||||
get '/api/v1/tag_search', params: { term: search_term }
|
get '/api/v1/tag_search', params: { term: search_term }
|
||||||
expect(response).to have_http_status(:ok)
|
expect(response).to have_http_status(:ok)
|
||||||
expect(json_response).to contain_exactly()
|
expect(json_response).to contain_exactly
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ class AgentTicketActionLevel0Test < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# create new ticket
|
# create new ticket
|
||||||
ticket_create(
|
ticket_create(
|
||||||
|
@ -35,7 +35,7 @@ class AgentTicketActionLevel0Test < TestCase
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# invite agent (with one group)
|
# invite agent (with one group)
|
||||||
click(css: '#navigation a[href="#dashboard"]')
|
click(css: '#navigation a[href="#dashboard"]')
|
||||||
|
@ -45,7 +45,7 @@ class AgentTicketActionLevel0Test < TestCase
|
||||||
value: 'Configuration',
|
value: 'Configuration',
|
||||||
)
|
)
|
||||||
click(css: '.active.content .js-inviteAgent')
|
click(css: '.active.content .js-inviteAgent')
|
||||||
modal_ready()
|
modal_ready
|
||||||
set(
|
set(
|
||||||
css: '.modal [name="firstname"]',
|
css: '.modal [name="firstname"]',
|
||||||
value: 'Bob',
|
value: 'Bob',
|
||||||
|
@ -85,7 +85,7 @@ class AgentTicketActionLevel0Test < TestCase
|
||||||
value: 'Configuration',
|
value: 'Configuration',
|
||||||
)
|
)
|
||||||
click(css: '.active.content .js-inviteAgent')
|
click(css: '.active.content .js-inviteAgent')
|
||||||
modal_ready()
|
modal_ready
|
||||||
set(
|
set(
|
||||||
css: '.modal [name="firstname"]',
|
css: '.modal [name="firstname"]',
|
||||||
value: 'Bob2',
|
value: 'Bob2',
|
||||||
|
@ -138,7 +138,7 @@ class AgentTicketActionLevel0Test < TestCase
|
||||||
value: 'Sending',
|
value: 'Sending',
|
||||||
)
|
)
|
||||||
|
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -198,7 +198,7 @@ class AgentTicketActionLevel0Test < TestCase
|
||||||
value: 'one group - some body 1234 äöüß',
|
value: 'one group - some body 1234 äöüß',
|
||||||
)
|
)
|
||||||
|
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -210,7 +210,7 @@ class AgentTicketActionLevel0Test < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
group_create(
|
group_create(
|
||||||
data: {
|
data: {
|
||||||
|
@ -250,7 +250,7 @@ class AgentTicketActionLevel0Test < TestCase
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ class AdminCalendarSlaTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
calendar_name = "ZZZ some calendar #{rand(99_999_999)}"
|
calendar_name = "ZZZ some calendar #{rand(99_999_999)}"
|
||||||
sla_name = "ZZZ some sla #{rand(99_999_999)}"
|
sla_name = "ZZZ some sla #{rand(99_999_999)}"
|
||||||
|
@ -41,7 +41,7 @@ class AdminCalendarSlaTest < TestCase
|
||||||
timeout: 4,
|
timeout: 4,
|
||||||
)
|
)
|
||||||
|
|
||||||
logout()
|
logout
|
||||||
|
|
||||||
login(
|
login(
|
||||||
username: 'master@example.com',
|
username: 'master@example.com',
|
||||||
|
@ -71,7 +71,7 @@ class AdminCalendarSlaTest < TestCase
|
||||||
value: timezone_verify,
|
value: timezone_verify,
|
||||||
timeout: 4,
|
timeout: 4,
|
||||||
)
|
)
|
||||||
modal_close()
|
modal_close
|
||||||
|
|
||||||
sla_create(
|
sla_create(
|
||||||
data: {
|
data: {
|
||||||
|
|
|
@ -19,7 +19,7 @@ class AdminChannelEmailTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
click(css: 'a[href="#manage"]')
|
click(css: 'a[href="#manage"]')
|
||||||
click(css: '.content.active a[href="#channels/email"]')
|
click(css: '.content.active a[href="#channels/email"]')
|
||||||
|
@ -41,7 +41,7 @@ class AdminChannelEmailTest < TestCase
|
||||||
click(css: '.content.active a[href="#c-account"]')
|
click(css: '.content.active a[href="#c-account"]')
|
||||||
click(css: '.content.active .js-channelNew')
|
click(css: '.content.active .js-channelNew')
|
||||||
|
|
||||||
modal_ready()
|
modal_ready
|
||||||
set(
|
set(
|
||||||
css: '.modal input[name="realname"]',
|
css: '.modal input[name="realname"]',
|
||||||
value: 'My System',
|
value: 'My System',
|
||||||
|
@ -82,7 +82,7 @@ class AdminChannelEmailTest < TestCase
|
||||||
# re-create
|
# re-create
|
||||||
click(css: '.content.active .js-channelNew')
|
click(css: '.content.active .js-channelNew')
|
||||||
|
|
||||||
modal_ready()
|
modal_ready
|
||||||
|
|
||||||
set(
|
set(
|
||||||
css: '.modal input[name="realname"]',
|
css: '.modal input[name="realname"]',
|
||||||
|
@ -111,7 +111,7 @@ class AdminChannelEmailTest < TestCase
|
||||||
# set invalid folder
|
# set invalid folder
|
||||||
click(css: '.content.active .js-editInbound')
|
click(css: '.content.active .js-editInbound')
|
||||||
|
|
||||||
modal_ready()
|
modal_ready
|
||||||
|
|
||||||
set(
|
set(
|
||||||
css: '.modal input[name="options::folder"]',
|
css: '.modal input[name="options::folder"]',
|
||||||
|
@ -136,7 +136,7 @@ class AdminChannelEmailTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
click(css: 'a[href="#manage"]')
|
click(css: 'a[href="#manage"]')
|
||||||
click(css: '.content.active a[href="#channels/email"]')
|
click(css: '.content.active a[href="#channels/email"]')
|
||||||
|
@ -146,7 +146,7 @@ class AdminChannelEmailTest < TestCase
|
||||||
# create a new email filter
|
# create a new email filter
|
||||||
click(css: '.content.active a[data-type="new"]')
|
click(css: '.content.active a[data-type="new"]')
|
||||||
|
|
||||||
modal_ready()
|
modal_ready
|
||||||
set(
|
set(
|
||||||
css: '.modal input[name="name"]',
|
css: '.modal input[name="name"]',
|
||||||
value: filter_name,
|
value: filter_name,
|
||||||
|
@ -156,7 +156,7 @@ class AdminChannelEmailTest < TestCase
|
||||||
value: 'target',
|
value: 'target',
|
||||||
)
|
)
|
||||||
click(css: '.modal .js-submit')
|
click(css: '.modal .js-submit')
|
||||||
modal_disappear()
|
modal_disappear
|
||||||
|
|
||||||
watch_for(
|
watch_for(
|
||||||
css: '.content.active .table',
|
css: '.content.active .table',
|
||||||
|
@ -167,9 +167,9 @@ class AdminChannelEmailTest < TestCase
|
||||||
click(css: '.content.active .table .dropdown .btn--table')
|
click(css: '.content.active .table .dropdown .btn--table')
|
||||||
click(css: '.content.active .table .dropdown .js-clone')
|
click(css: '.content.active .table .dropdown .js-clone')
|
||||||
|
|
||||||
modal_ready()
|
modal_ready
|
||||||
click(css: '.modal .js-submit')
|
click(css: '.modal .js-submit')
|
||||||
modal_disappear()
|
modal_disappear
|
||||||
|
|
||||||
# confirm the clone exists in the table
|
# confirm the clone exists in the table
|
||||||
watch_for(
|
watch_for(
|
||||||
|
|
|
@ -12,7 +12,7 @@ class AdminObjectManagerTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# already existing
|
# already existing
|
||||||
object_manager_attribute_create(
|
object_manager_attribute_create(
|
||||||
|
@ -165,7 +165,7 @@ class AdminObjectManagerTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
object_manager_attribute_create(
|
object_manager_attribute_create(
|
||||||
data: {
|
data: {
|
||||||
|
@ -389,7 +389,7 @@ class AdminObjectManagerTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# valid name
|
# valid name
|
||||||
object_manager_attribute_create(
|
object_manager_attribute_create(
|
||||||
|
@ -499,7 +499,7 @@ class AdminObjectManagerTest < TestCase
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
|
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# create two new attributes
|
# create two new attributes
|
||||||
object_manager_attribute_create(
|
object_manager_attribute_create(
|
||||||
|
@ -595,7 +595,7 @@ class AdminObjectManagerTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# lexicographically ordered list of option strings
|
# lexicographically ordered list of option strings
|
||||||
options = %w[0 000.000 1 100.100 100.200 2 200.100 200.200 3 ä b n ö p sr ß st t ü v]
|
options = %w[0 000.000 1 100.100 100.200 2 200.100 200.200 3 ä b n ö p sr ß st t ü v]
|
||||||
|
@ -684,7 +684,7 @@ class AdminObjectManagerTest < TestCase
|
||||||
options_no_dog = options.except('dog')
|
options_no_dog = options.except('dog')
|
||||||
options_no_dog_no_delete = options_no_dog.except('delete')
|
options_no_dog_no_delete = options_no_dog.except('delete')
|
||||||
|
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
object_manager_attribute_create(
|
object_manager_attribute_create(
|
||||||
data: {
|
data: {
|
||||||
|
@ -788,7 +788,7 @@ class AdminObjectManagerTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
object_manager_attribute_create(
|
object_manager_attribute_create(
|
||||||
data: {
|
data: {
|
||||||
|
@ -864,7 +864,7 @@ class AdminObjectManagerTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
object_manager_attribute_create(
|
object_manager_attribute_create(
|
||||||
data: {
|
data: {
|
||||||
|
|
|
@ -12,7 +12,7 @@ class AdminObjectManagerTreeSelectTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
object_manager_attribute_create(
|
object_manager_attribute_create(
|
||||||
data: {
|
data: {
|
||||||
|
@ -126,7 +126,7 @@ class AdminObjectManagerTreeSelectTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
object_manager_attribute_create(
|
object_manager_attribute_create(
|
||||||
data: {
|
data: {
|
||||||
|
|
|
@ -12,7 +12,7 @@ class AdminOverviewTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# add new overview
|
# add new overview
|
||||||
overview_create(
|
overview_create(
|
||||||
|
@ -49,7 +49,7 @@ class AdminOverviewTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
ticket_create(
|
ticket_create(
|
||||||
data: {
|
data: {
|
||||||
|
@ -135,7 +135,7 @@ class AdminOverviewTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
out_of_office_css = '.content.active .modal select[name="out_of_office"]'
|
out_of_office_css = '.content.active .modal select[name="out_of_office"]'
|
||||||
first_overview_css = '.content.active tr[data-id="1"] td'
|
first_overview_css = '.content.active tr[data-id="1"] td'
|
||||||
|
|
|
@ -11,7 +11,7 @@ class AdminPermissionsGranularVsFullTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
click(css: 'a[href="#manage"]')
|
click(css: 'a[href="#manage"]')
|
||||||
click(css: '.content.active a[href="#manage/groups"]')
|
click(css: '.content.active a[href="#manage/groups"]')
|
||||||
|
|
|
@ -10,7 +10,7 @@ class AdminRoleTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
rand = rand(99_999_999).to_s
|
rand = rand(99_999_999).to_s
|
||||||
login = "agent-role-#{rand}"
|
login = "agent-role-#{rand}"
|
||||||
|
@ -42,14 +42,14 @@ class AdminRoleTest < TestCase
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
logout()
|
logout
|
||||||
# flanky
|
# flanky
|
||||||
login(
|
login(
|
||||||
username: email,
|
username: email,
|
||||||
password: password,
|
password: password,
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
click(css: 'a[href="#current_user"]')
|
click(css: 'a[href="#current_user"]')
|
||||||
click(css: 'a[href="#profile"]')
|
click(css: 'a[href="#profile"]')
|
||||||
match(
|
match(
|
||||||
|
@ -77,7 +77,7 @@ class AdminRoleTest < TestCase
|
||||||
value: 'Devices',
|
value: 'Devices',
|
||||||
)
|
)
|
||||||
|
|
||||||
logout()
|
logout
|
||||||
login(
|
login(
|
||||||
username: 'master@example.com',
|
username: 'master@example.com',
|
||||||
password: 'test',
|
password: 'test',
|
||||||
|
@ -90,13 +90,13 @@ class AdminRoleTest < TestCase
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
logout()
|
logout
|
||||||
login(
|
login(
|
||||||
username: email,
|
username: email,
|
||||||
password: password,
|
password: password,
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
click(css: 'a[href="#current_user"]')
|
click(css: 'a[href="#current_user"]')
|
||||||
click(css: 'a[href="#profile"]')
|
click(css: 'a[href="#profile"]')
|
||||||
match(
|
match(
|
||||||
|
@ -137,7 +137,7 @@ class AdminRoleTest < TestCase
|
||||||
|
|
||||||
# check if admin exists
|
# check if admin exists
|
||||||
exists_not(css: '[href="#manage"]')
|
exists_not(css: '[href="#manage"]')
|
||||||
logout()
|
logout
|
||||||
|
|
||||||
# add admin.user to agent role
|
# add admin.user to agent role
|
||||||
login(
|
login(
|
||||||
|
@ -145,7 +145,7 @@ class AdminRoleTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
role_edit(
|
role_edit(
|
||||||
data: {
|
data: {
|
||||||
|
@ -160,7 +160,7 @@ class AdminRoleTest < TestCase
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
logout()
|
logout
|
||||||
|
|
||||||
# check if admin exists
|
# check if admin exists
|
||||||
login(
|
login(
|
||||||
|
@ -168,7 +168,7 @@ class AdminRoleTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# create user
|
# create user
|
||||||
random = rand(999_999_999)
|
random = rand(999_999_999)
|
||||||
|
@ -194,13 +194,13 @@ class AdminRoleTest < TestCase
|
||||||
)
|
)
|
||||||
|
|
||||||
# revoke admin.user
|
# revoke admin.user
|
||||||
logout()
|
logout
|
||||||
login(
|
login(
|
||||||
username: 'master@example.com',
|
username: 'master@example.com',
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
role_edit(
|
role_edit(
|
||||||
data: {
|
data: {
|
||||||
|
@ -215,7 +215,7 @@ class AdminRoleTest < TestCase
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
logout()
|
logout
|
||||||
|
|
||||||
login(
|
login(
|
||||||
username: 'agent1@example.com',
|
username: 'agent1@example.com',
|
||||||
|
@ -238,7 +238,7 @@ class AdminRoleTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
role_create(
|
role_create(
|
||||||
data: {
|
data: {
|
||||||
|
|
|
@ -10,7 +10,7 @@ class AgentNavigationAndTitleTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# since we run the basic functionality tests via Capybara now the clues are shown
|
# since we run the basic functionality tests via Capybara now the clues are shown
|
||||||
# and closed after the login. This unfortunately removes the 'is-active' class from the
|
# and closed after the login. This unfortunately removes the 'is-active' class from the
|
||||||
|
@ -18,7 +18,7 @@ class AgentNavigationAndTitleTest < TestCase
|
||||||
# Because the browser tests are deprecated and there is no easy fix to change the
|
# Because the browser tests are deprecated and there is no easy fix to change the
|
||||||
# behavior we refresh the page and wait for it to finish loading the app as a workaround.
|
# behavior we refresh the page and wait for it to finish loading the app as a workaround.
|
||||||
# This will cause the 'is-active' class to be set on the menu item again
|
# This will cause the 'is-active' class to be set on the menu item again
|
||||||
reload()
|
reload
|
||||||
sleep 4
|
sleep 4
|
||||||
|
|
||||||
# dashboard after login
|
# dashboard after login
|
||||||
|
@ -32,7 +32,7 @@ class AgentNavigationAndTitleTest < TestCase
|
||||||
exists(css: '#navigation .js-menu .js-dashboardMenuItem.is-active')
|
exists(css: '#navigation .js-menu .js-dashboardMenuItem.is-active')
|
||||||
exists_not(css: '#navigation .tasks .js-item.is-active')
|
exists_not(css: '#navigation .tasks .js-item.is-active')
|
||||||
|
|
||||||
reload()
|
reload
|
||||||
sleep 2
|
sleep 2
|
||||||
verify_title(value: 'dashboard')
|
verify_title(value: 'dashboard')
|
||||||
exists(css: '#navigation .js-menu .js-dashboardMenuItem.is-active')
|
exists(css: '#navigation .js-menu .js-dashboardMenuItem.is-active')
|
||||||
|
@ -67,7 +67,7 @@ class AgentNavigationAndTitleTest < TestCase
|
||||||
)
|
)
|
||||||
exists_not(css: '#navigation .js-menu .is-active')
|
exists_not(css: '#navigation .js-menu .is-active')
|
||||||
|
|
||||||
reload()
|
reload
|
||||||
sleep 2
|
sleep 2
|
||||||
verify_title(value: 'Call Inbound')
|
verify_title(value: 'Call Inbound')
|
||||||
verify_task(
|
verify_task(
|
||||||
|
@ -105,7 +105,7 @@ class AgentNavigationAndTitleTest < TestCase
|
||||||
)
|
)
|
||||||
exists_not(css: '#navigation .js-menu .is-active')
|
exists_not(css: '#navigation .js-menu .is-active')
|
||||||
|
|
||||||
reload()
|
reload
|
||||||
sleep 2
|
sleep 2
|
||||||
verify_title(value: 'ticket create #2')
|
verify_title(value: 'ticket create #2')
|
||||||
verify_task(
|
verify_task(
|
||||||
|
@ -127,7 +127,7 @@ class AgentNavigationAndTitleTest < TestCase
|
||||||
exists(css: '#navigation .js-menu .js-dashboardMenuItem.is-active')
|
exists(css: '#navigation .js-menu .js-dashboardMenuItem.is-active')
|
||||||
exists_not(css: '#navigation .tasks .js-item.is-active')
|
exists_not(css: '#navigation .tasks .js-item.is-active')
|
||||||
|
|
||||||
reload()
|
reload
|
||||||
sleep 2
|
sleep 2
|
||||||
verify_title(value: 'dashboard')
|
verify_title(value: 'dashboard')
|
||||||
exists(css: '#navigation .js-menu .js-dashboardMenuItem.is-active')
|
exists(css: '#navigation .js-menu .js-dashboardMenuItem.is-active')
|
||||||
|
@ -151,7 +151,7 @@ class AgentNavigationAndTitleTest < TestCase
|
||||||
exists_not(css: '#navigation .js-menu .is-active')
|
exists_not(css: '#navigation .js-menu .is-active')
|
||||||
exists_not(css: '#navigation .tasks .js-item.is-active')
|
exists_not(css: '#navigation .tasks .js-item.is-active')
|
||||||
|
|
||||||
reload()
|
reload
|
||||||
sleep 2
|
sleep 2
|
||||||
verify_title(value: 'Users')
|
verify_title(value: 'Users')
|
||||||
exists_not(css: '#navigation .js-menu .is-active')
|
exists_not(css: '#navigation .js-menu .is-active')
|
||||||
|
|
|
@ -14,7 +14,7 @@ class AgentOrganizationProfileTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# search and open org
|
# search and open org
|
||||||
organization_open_by_search(
|
organization_open_by_search(
|
||||||
|
@ -41,14 +41,14 @@ class AgentOrganizationProfileTest < TestCase
|
||||||
css: '.active .profile [data-name="note"]',
|
css: '.active .profile [data-name="note"]',
|
||||||
value: note,
|
value: note,
|
||||||
)
|
)
|
||||||
empty_search()
|
empty_search
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
# check and change note again in edit screen
|
# check and change note again in edit screen
|
||||||
click(css: '.active .js-action .icon-arrow-down', fast: true)
|
click(css: '.active .js-action .icon-arrow-down', fast: true)
|
||||||
click(css: '.active .js-action [data-type="edit"]')
|
click(css: '.active .js-action [data-type="edit"]')
|
||||||
|
|
||||||
modal_ready()
|
modal_ready
|
||||||
watch_for(
|
watch_for(
|
||||||
css: '.active .modal',
|
css: '.active .modal',
|
||||||
value: note,
|
value: note,
|
||||||
|
@ -63,7 +63,7 @@ class AgentOrganizationProfileTest < TestCase
|
||||||
value: 'some note abc',
|
value: 'some note abc',
|
||||||
)
|
)
|
||||||
click(css: '.active .modal button.js-submit')
|
click(css: '.active .modal button.js-submit')
|
||||||
modal_disappear()
|
modal_disappear
|
||||||
|
|
||||||
watch_for(
|
watch_for(
|
||||||
css: '.active .profile-window',
|
css: '.active .profile-window',
|
||||||
|
@ -80,13 +80,13 @@ class AgentOrganizationProfileTest < TestCase
|
||||||
click(css: '.active .js-action .icon-arrow-down', fast: true)
|
click(css: '.active .js-action .icon-arrow-down', fast: true)
|
||||||
click(css: '.active .js-action [data-type="edit"]')
|
click(css: '.active .js-action [data-type="edit"]')
|
||||||
|
|
||||||
modal_ready()
|
modal_ready
|
||||||
set(
|
set(
|
||||||
css: '.modal [name="name"]',
|
css: '.modal [name="name"]',
|
||||||
value: 'Zammad Foundation',
|
value: 'Zammad Foundation',
|
||||||
)
|
)
|
||||||
click(css: '.active .modal button.js-submit')
|
click(css: '.active .modal button.js-submit')
|
||||||
modal_disappear()
|
modal_disappear
|
||||||
|
|
||||||
verify_task(
|
verify_task(
|
||||||
data: {
|
data: {
|
||||||
|
@ -112,7 +112,7 @@ class AgentOrganizationProfileTest < TestCase
|
||||||
css: '.active .profile-window',
|
css: '.active .profile-window',
|
||||||
value: "org profile check #{message}",
|
value: "org profile check #{message}",
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# work with two browser windows
|
# work with two browser windows
|
||||||
message = "comment 1 #{rand(99_999_999_999_999_999)}"
|
message = "comment 1 #{rand(99_999_999_999_999_999)}"
|
||||||
|
@ -166,7 +166,7 @@ class AgentOrganizationProfileTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# search and open org
|
# search and open org
|
||||||
organization_open_by_search(
|
organization_open_by_search(
|
||||||
|
@ -192,7 +192,7 @@ class AgentOrganizationProfileTest < TestCase
|
||||||
click(
|
click(
|
||||||
css: '.active .profile-window .dropdown li[data-type="edit"]',
|
css: '.active .profile-window .dropdown li[data-type="edit"]',
|
||||||
)
|
)
|
||||||
modal_ready()
|
modal_ready
|
||||||
|
|
||||||
select(
|
select(
|
||||||
css: '.active .modal select[name="active"]',
|
css: '.active .modal select[name="active"]',
|
||||||
|
@ -203,7 +203,7 @@ class AgentOrganizationProfileTest < TestCase
|
||||||
css: '.modal .js-submit',
|
css: '.modal .js-submit',
|
||||||
)
|
)
|
||||||
|
|
||||||
modal_disappear()
|
modal_disappear
|
||||||
|
|
||||||
# go back to the org and check for inactive status update
|
# go back to the org and check for inactive status update
|
||||||
click(
|
click(
|
||||||
|
@ -224,7 +224,7 @@ class AgentOrganizationProfileTest < TestCase
|
||||||
click(
|
click(
|
||||||
css: '.active .profile-window .dropdown li[data-type="edit"]',
|
css: '.active .profile-window .dropdown li[data-type="edit"]',
|
||||||
)
|
)
|
||||||
modal_ready()
|
modal_ready
|
||||||
|
|
||||||
select(
|
select(
|
||||||
css: '.active .modal select[name="active"]',
|
css: '.active .modal select[name="active"]',
|
||||||
|
@ -235,7 +235,7 @@ class AgentOrganizationProfileTest < TestCase
|
||||||
css: '.modal .js-submit',
|
css: '.modal .js-submit',
|
||||||
)
|
)
|
||||||
|
|
||||||
modal_disappear()
|
modal_disappear
|
||||||
|
|
||||||
# go back to the org and check for active status update
|
# go back to the org and check for active status update
|
||||||
click(
|
click(
|
||||||
|
|
|
@ -11,7 +11,7 @@ class AgentTicketAttachmentTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
#
|
#
|
||||||
# attachment checks - new ticket
|
# attachment checks - new ticket
|
||||||
|
@ -147,13 +147,13 @@ class AgentTicketAttachmentTest < TestCase
|
||||||
click(css: '.content.active .js-submit')
|
click(css: '.content.active .js-submit')
|
||||||
|
|
||||||
# check warning
|
# check warning
|
||||||
modal_ready()
|
modal_ready
|
||||||
match(
|
match(
|
||||||
css: '.content.active .modal',
|
css: '.content.active .modal',
|
||||||
value: 'missing',
|
value: 'missing',
|
||||||
)
|
)
|
||||||
click(css: '.content.active .modal .js-cancel')
|
click(css: '.content.active .modal .js-cancel')
|
||||||
modal_disappear()
|
modal_disappear
|
||||||
|
|
||||||
ticket_update(
|
ticket_update(
|
||||||
data: {
|
data: {
|
||||||
|
@ -298,7 +298,7 @@ class AgentTicketAttachmentTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
ticket_create(
|
ticket_create(
|
||||||
data: {
|
data: {
|
||||||
|
|
|
@ -13,7 +13,7 @@ class AgentticketCreateAttachmentMissingAfterReloadTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
#
|
#
|
||||||
# attachment checks - new ticket
|
# attachment checks - new ticket
|
||||||
|
|
|
@ -13,7 +13,7 @@ class AgentTicketCreateAvailableTypesTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
click(
|
click(
|
||||||
css: 'a[href="#ticket/create"]'
|
css: 'a[href="#ticket/create"]'
|
||||||
|
@ -31,7 +31,7 @@ class AgentTicketCreateAvailableTypesTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
@browser.execute_script("App.Config.set('ui_ticket_create_default_type', 'email-out')")
|
@browser.execute_script("App.Config.set('ui_ticket_create_default_type', 'email-out')")
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ class AgentTicketCreateCcTokenizerTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
click(
|
click(
|
||||||
css: 'a[href="#ticket/create"]'
|
css: 'a[href="#ticket/create"]'
|
||||||
|
|
|
@ -13,7 +13,7 @@ class AgentTicketCreateDefaultTypeTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
click(
|
click(
|
||||||
css: 'a[href="#ticket/create"]'
|
css: 'a[href="#ticket/create"]'
|
||||||
|
@ -39,7 +39,7 @@ class AgentTicketCreateDefaultTypeTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
@browser.execute_script("App.Config.set('ui_ticket_create_available_types', ['email-out', 'phone-out'])")
|
@browser.execute_script("App.Config.set('ui_ticket_create_available_types', ['email-out', 'phone-out'])")
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ class AgentTicketCreateDefaultTypeTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
@browser.execute_script("App.Config.set('ui_ticket_create_available_types', ['email-out'])")
|
@browser.execute_script("App.Config.set('ui_ticket_create_available_types', ['email-out'])")
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ class AgentTicketCreateResetCustomerSelectionTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
click(css: 'a[href="#new"]', only_if_exists: true)
|
click(css: 'a[href="#new"]', only_if_exists: true)
|
||||||
click(css: 'a[href="#ticket/create"]')
|
click(css: 'a[href="#ticket/create"]')
|
||||||
|
@ -84,7 +84,7 @@ class AgentTicketCreateResetCustomerSelectionTest < TestCase
|
||||||
)
|
)
|
||||||
|
|
||||||
# cleanup
|
# cleanup
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_clear_customer_use_email
|
def test_clear_customer_use_email
|
||||||
|
@ -94,7 +94,7 @@ class AgentTicketCreateResetCustomerSelectionTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
click(css: 'a[href="#new"]', only_if_exists: true)
|
click(css: 'a[href="#new"]', only_if_exists: true)
|
||||||
click(css: 'a[href="#ticket/create"]')
|
click(css: 'a[href="#ticket/create"]')
|
||||||
|
@ -178,7 +178,7 @@ class AgentTicketCreateResetCustomerSelectionTest < TestCase
|
||||||
click(css: '.content.active .tabsSidebar .sidebar[data-tab="customer"] .js-actions')
|
click(css: '.content.active .tabsSidebar .sidebar[data-tab="customer"] .js-actions')
|
||||||
click(css: '.content.active .tabsSidebar .sidebar[data-tab="customer"] .js-actions li[data-type="customer-change"]')
|
click(css: '.content.active .tabsSidebar .sidebar[data-tab="customer"] .js-actions li[data-type="customer-change"]')
|
||||||
|
|
||||||
modal_ready()
|
modal_ready
|
||||||
|
|
||||||
exists_not(
|
exists_not(
|
||||||
css: '.content.active .modal .user_autocompletion.form-group.has-error',
|
css: '.content.active .modal .user_autocompletion.form-group.has-error',
|
||||||
|
@ -246,6 +246,6 @@ class AgentTicketCreateResetCustomerSelectionTest < TestCase
|
||||||
)
|
)
|
||||||
|
|
||||||
# cleanup
|
# cleanup
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -15,7 +15,7 @@ class AgentTicketCreateTemplateTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
click(
|
click(
|
||||||
css: 'a[href="#ticket/create"]'
|
css: 'a[href="#ticket/create"]'
|
||||||
|
@ -74,7 +74,7 @@ class AgentTicketCreateTemplateTest < TestCase
|
||||||
)
|
)
|
||||||
|
|
||||||
# apply new tempalte
|
# apply new tempalte
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
click(
|
click(
|
||||||
css: 'a[href="#ticket/create"]'
|
css: 'a[href="#ticket/create"]'
|
||||||
)
|
)
|
||||||
|
|
|
@ -12,7 +12,7 @@ class AgentTicketEmailReplyKeepBodyTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# create new ticket
|
# create new ticket
|
||||||
ticket_create(
|
ticket_create(
|
||||||
|
@ -87,7 +87,7 @@ class AgentTicketEmailReplyKeepBodyTest < TestCase
|
||||||
css: '.content.active .js-settingContainer .js-setting',
|
css: '.content.active .js-settingContainer .js-setting',
|
||||||
)
|
)
|
||||||
click(css: '.content.active .js-settingContainer .js-setting')
|
click(css: '.content.active .js-settingContainer .js-setting')
|
||||||
modal_ready()
|
modal_ready
|
||||||
select(
|
select(
|
||||||
css: params[:css],
|
css: params[:css],
|
||||||
value: params[:value]
|
value: params[:value]
|
||||||
|
@ -95,8 +95,8 @@ class AgentTicketEmailReplyKeepBodyTest < TestCase
|
||||||
click(
|
click(
|
||||||
css: params[:submit_css],
|
css: params[:submit_css],
|
||||||
)
|
)
|
||||||
modal_close()
|
modal_close
|
||||||
modal_disappear()
|
modal_disappear
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_full_quote
|
def test_full_quote
|
||||||
|
@ -106,7 +106,7 @@ class AgentTicketEmailReplyKeepBodyTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
ticket_open_by_title(
|
ticket_open_by_title(
|
||||||
title: 'Welcome to Zammad',
|
title: 'Welcome to Zammad',
|
||||||
|
@ -141,7 +141,7 @@ class AgentTicketEmailReplyKeepBodyTest < TestCase
|
||||||
assert Time.zone.parse(match[1])
|
assert Time.zone.parse(match[1])
|
||||||
|
|
||||||
# try again, but with the full quote header disabled
|
# try again, but with the full quote header disabled
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
ticket_open_by_title(
|
ticket_open_by_title(
|
||||||
title: 'Welcome to Zammad',
|
title: 'Welcome to Zammad',
|
||||||
)
|
)
|
||||||
|
@ -163,7 +163,7 @@ class AgentTicketEmailReplyKeepBodyTest < TestCase
|
||||||
assert_nil match
|
assert_nil match
|
||||||
|
|
||||||
# after test, turn full quote header back on again
|
# after test, turn full quote header back on again
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
ticket_open_by_title(
|
ticket_open_by_title(
|
||||||
title: 'Welcome to Zammad',
|
title: 'Welcome to Zammad',
|
||||||
)
|
)
|
||||||
|
@ -182,7 +182,7 @@ class AgentTicketEmailReplyKeepBodyTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
ticket_open_by_title(
|
ticket_open_by_title(
|
||||||
title: 'Welcome to Zammad',
|
title: 'Welcome to Zammad',
|
||||||
|
|
|
@ -20,7 +20,7 @@ class AgentTicketEmailSignatureTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
#
|
#
|
||||||
# create groups and signatures
|
# create groups and signatures
|
||||||
|
@ -83,7 +83,7 @@ class AgentTicketEmailSignatureTest < TestCase
|
||||||
#
|
#
|
||||||
|
|
||||||
# reload instances to get new group permissions
|
# reload instances to get new group permissions
|
||||||
reload()
|
reload
|
||||||
|
|
||||||
# create ticket
|
# create ticket
|
||||||
ticket_create(
|
ticket_create(
|
||||||
|
|
|
@ -11,7 +11,7 @@ class AgentTicketLinkTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
ticket1 = ticket_create(
|
ticket1 = ticket_create(
|
||||||
data: {
|
data: {
|
||||||
|
@ -48,7 +48,7 @@ class AgentTicketLinkTest < TestCase
|
||||||
css: '.content.active .js-links .js-add',
|
css: '.content.active .js-links .js-add',
|
||||||
)
|
)
|
||||||
|
|
||||||
modal_ready()
|
modal_ready
|
||||||
|
|
||||||
set(
|
set(
|
||||||
css: '.content.active .modal-body [name="ticket_number"]',
|
css: '.content.active .modal-body [name="ticket_number"]',
|
||||||
|
@ -73,7 +73,7 @@ class AgentTicketLinkTest < TestCase
|
||||||
value: ticket2[:title],
|
value: ticket2[:title],
|
||||||
)
|
)
|
||||||
|
|
||||||
reload()
|
reload
|
||||||
|
|
||||||
watch_for(
|
watch_for(
|
||||||
css: '.content.active .ticketLinks',
|
css: '.content.active .ticketLinks',
|
||||||
|
@ -92,7 +92,7 @@ class AgentTicketLinkTest < TestCase
|
||||||
value: ticket2[:title],
|
value: ticket2[:title],
|
||||||
)
|
)
|
||||||
|
|
||||||
reload()
|
reload
|
||||||
|
|
||||||
watch_for_disappear(
|
watch_for_disappear(
|
||||||
css: '.content.active .ticketLinks',
|
css: '.content.active .ticketLinks',
|
||||||
|
@ -118,7 +118,7 @@ class AgentTicketLinkTest < TestCase
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
ticket_open_by_search(
|
ticket_open_by_search(
|
||||||
browser: browser2,
|
browser: browser2,
|
||||||
|
|
|
@ -11,7 +11,7 @@ class AgentTicketMacroTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
ticket = ticket_create(
|
ticket = ticket_create(
|
||||||
data: {
|
data: {
|
||||||
|
@ -49,7 +49,7 @@ class AgentTicketMacroTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
ux_flow_next_up = 'Stay on tab'
|
ux_flow_next_up = 'Stay on tab'
|
||||||
macro_name = "Test #{ux_flow_next_up}"
|
macro_name = "Test #{ux_flow_next_up}"
|
||||||
|
@ -94,7 +94,7 @@ class AgentTicketMacroTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
ux_flow_next_up = 'Close tab'
|
ux_flow_next_up = 'Close tab'
|
||||||
macro_name = "Test #{ux_flow_next_up}"
|
macro_name = "Test #{ux_flow_next_up}"
|
||||||
|
@ -127,7 +127,7 @@ class AgentTicketMacroTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
ux_flow_next_up = 'Advance to next ticket from overview'
|
ux_flow_next_up = 'Advance to next ticket from overview'
|
||||||
macro_name = "Test #{ux_flow_next_up}"
|
macro_name = "Test #{ux_flow_next_up}"
|
||||||
|
@ -158,7 +158,7 @@ class AgentTicketMacroTest < TestCase
|
||||||
# we need to close all open ticket tasks because
|
# we need to close all open ticket tasks because
|
||||||
# otherwise the Zoom view won't change in "Overview"-mode
|
# otherwise the Zoom view won't change in "Overview"-mode
|
||||||
# when we re-enter the Zoom view for a ticket via the overview
|
# when we re-enter the Zoom view for a ticket via the overview
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
overview_open(
|
overview_open(
|
||||||
link: '#ticket/view/all_unassigned',
|
link: '#ticket/view/all_unassigned',
|
||||||
|
|
|
@ -12,7 +12,7 @@ class AgentTicketMergeTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# create new ticket
|
# create new ticket
|
||||||
ticket1 = ticket_create(
|
ticket1 = ticket_create(
|
||||||
|
@ -32,7 +32,7 @@ class AgentTicketMergeTest < TestCase
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# create second ticket to merge
|
# create second ticket to merge
|
||||||
ticket_create(
|
ticket_create(
|
||||||
|
@ -60,7 +60,7 @@ class AgentTicketMergeTest < TestCase
|
||||||
click( css: '.active div[data-tab="ticket"] .js-actions .icon-arrow-down' )
|
click( css: '.active div[data-tab="ticket"] .js-actions .icon-arrow-down' )
|
||||||
click( css: '.active div[data-tab="ticket"] .js-actions [data-type="ticket-merge"]' )
|
click( css: '.active div[data-tab="ticket"] .js-actions [data-type="ticket-merge"]' )
|
||||||
|
|
||||||
modal_ready()
|
modal_ready
|
||||||
set(
|
set(
|
||||||
css: '.modal input[name="target_ticket_number"]',
|
css: '.modal input[name="target_ticket_number"]',
|
||||||
value: ticket1[:number],
|
value: ticket1[:number],
|
||||||
|
@ -89,7 +89,7 @@ class AgentTicketMergeTest < TestCase
|
||||||
)
|
)
|
||||||
|
|
||||||
# close task/cleanup
|
# close task/cleanup
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# merge ticket with open tabs
|
# merge ticket with open tabs
|
||||||
ticket3 = ticket_create(
|
ticket3 = ticket_create(
|
||||||
|
@ -114,7 +114,7 @@ class AgentTicketMergeTest < TestCase
|
||||||
click( css: '.active div[data-tab="ticket"] .js-actions .icon-arrow-down' )
|
click( css: '.active div[data-tab="ticket"] .js-actions .icon-arrow-down' )
|
||||||
click( css: '.active div[data-tab="ticket"] .js-actions [data-type="ticket-merge"]' )
|
click( css: '.active div[data-tab="ticket"] .js-actions [data-type="ticket-merge"]' )
|
||||||
|
|
||||||
modal_ready()
|
modal_ready
|
||||||
set(
|
set(
|
||||||
css: '.modal input[name="target_ticket_number"]',
|
css: '.modal input[name="target_ticket_number"]',
|
||||||
value: ticket3[:number],
|
value: ticket3[:number],
|
||||||
|
|
|
@ -12,7 +12,7 @@ class AgentTicketOnlineNotificationTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# create new ticket
|
# create new ticket
|
||||||
ticket_create(
|
ticket_create(
|
||||||
|
@ -246,7 +246,7 @@ class AgentTicketOnlineNotificationTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
browser2 = browser_instance
|
browser2 = browser_instance
|
||||||
login(
|
login(
|
||||||
|
|
|
@ -20,7 +20,7 @@ class AgentTicketOverviewGroupByOrganizationTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# 1. Create a new test organization with special characters in its name
|
# 1. Create a new test organization with special characters in its name
|
||||||
organization_create(
|
organization_create(
|
||||||
|
|
|
@ -10,7 +10,7 @@ class AgentTicketOverviewLevel0Test < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# test bulk action
|
# test bulk action
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ class AgentTicketOverviewLevel0Test < TestCase
|
||||||
)
|
)
|
||||||
|
|
||||||
# remember current overview count
|
# remember current overview count
|
||||||
overview_counter_before = overview_counter()
|
overview_counter_before = overview_counter
|
||||||
|
|
||||||
# select close state & submit
|
# select close state & submit
|
||||||
select(
|
select(
|
||||||
|
@ -96,12 +96,12 @@ class AgentTicketOverviewLevel0Test < TestCase
|
||||||
|
|
||||||
# remember current overview count
|
# remember current overview count
|
||||||
await_overview_counter(view: '#ticket/view/all_unassigned', count: overview_counter_before['#ticket/view/all_unassigned'] - 2)
|
await_overview_counter(view: '#ticket/view/all_unassigned', count: overview_counter_before['#ticket/view/all_unassigned'] - 2)
|
||||||
overview_counter_before = overview_counter()
|
overview_counter_before = overview_counter
|
||||||
|
|
||||||
# click options and enable number and article count
|
# click options and enable number and article count
|
||||||
click(css: '.content.active [data-type="settings"]')
|
click(css: '.content.active [data-type="settings"]')
|
||||||
|
|
||||||
modal_ready()
|
modal_ready
|
||||||
|
|
||||||
check(
|
check(
|
||||||
css: '.modal input[value="number"]',
|
css: '.modal input[value="number"]',
|
||||||
|
@ -139,7 +139,7 @@ class AgentTicketOverviewLevel0Test < TestCase
|
||||||
)
|
)
|
||||||
|
|
||||||
# reload browser
|
# reload browser
|
||||||
reload()
|
reload
|
||||||
sleep 4
|
sleep 4
|
||||||
|
|
||||||
# check if number and article count is shown
|
# check if number and article count is shown
|
||||||
|
@ -159,7 +159,7 @@ class AgentTicketOverviewLevel0Test < TestCase
|
||||||
# disable number and article count
|
# disable number and article count
|
||||||
click(css: '.content.active [data-type="settings"]')
|
click(css: '.content.active [data-type="settings"]')
|
||||||
|
|
||||||
modal_ready()
|
modal_ready
|
||||||
|
|
||||||
uncheck(
|
uncheck(
|
||||||
css: '.modal input[value="number"]',
|
css: '.modal input[value="number"]',
|
||||||
|
@ -213,7 +213,7 @@ class AgentTicketOverviewLevel0Test < TestCase
|
||||||
await_overview_counter(view: '#ticket/view/all_unassigned', count: overview_counter_before['#ticket/view/all_unassigned'])
|
await_overview_counter(view: '#ticket/view/all_unassigned', count: overview_counter_before['#ticket/view/all_unassigned'])
|
||||||
|
|
||||||
# cleanup
|
# cleanup
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_bulk_pending
|
def test_bulk_pending
|
||||||
|
@ -223,7 +223,7 @@ class AgentTicketOverviewLevel0Test < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# test bulk action
|
# test bulk action
|
||||||
|
|
||||||
|
@ -259,7 +259,7 @@ class AgentTicketOverviewLevel0Test < TestCase
|
||||||
)
|
)
|
||||||
|
|
||||||
# remember current overview count
|
# remember current overview count
|
||||||
overview_counter_before = overview_counter()
|
overview_counter_before = overview_counter
|
||||||
|
|
||||||
# select both via bulk action
|
# select both via bulk action
|
||||||
click(
|
click(
|
||||||
|
@ -363,7 +363,7 @@ class AgentTicketOverviewLevel0Test < TestCase
|
||||||
)
|
)
|
||||||
|
|
||||||
# cleanup
|
# cleanup
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
end
|
end
|
||||||
|
|
||||||
# verify correct behaviour for issue #1864 - Bulk-Action: Not possible to change owner
|
# verify correct behaviour for issue #1864 - Bulk-Action: Not possible to change owner
|
||||||
|
@ -374,7 +374,7 @@ class AgentTicketOverviewLevel0Test < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# test bulk action
|
# test bulk action
|
||||||
|
|
||||||
|
@ -407,7 +407,7 @@ class AgentTicketOverviewLevel0Test < TestCase
|
||||||
)
|
)
|
||||||
|
|
||||||
# remember current overview count
|
# remember current overview count
|
||||||
overview_counter_before = overview_counter()
|
overview_counter_before = overview_counter
|
||||||
|
|
||||||
# select both via bulk action
|
# select both via bulk action
|
||||||
click(
|
click(
|
||||||
|
@ -465,7 +465,7 @@ class AgentTicketOverviewLevel0Test < TestCase
|
||||||
await_overview_counter(view: '#ticket/view/all_unassigned', count: overview_counter_before['#ticket/view/all_unassigned'] - 2)
|
await_overview_counter(view: '#ticket/view/all_unassigned', count: overview_counter_before['#ticket/view/all_unassigned'] - 2)
|
||||||
|
|
||||||
# cleanup
|
# cleanup
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
end
|
end
|
||||||
|
|
||||||
# verify fix for issue #2026 - Bulk action should not be shown if user has no change permissions
|
# verify fix for issue #2026 - Bulk action should not be shown if user has no change permissions
|
||||||
|
@ -476,7 +476,7 @@ class AgentTicketOverviewLevel0Test < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# create new group
|
# create new group
|
||||||
group_create(
|
group_create(
|
||||||
|
@ -531,13 +531,13 @@ class AgentTicketOverviewLevel0Test < TestCase
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
logout() # logout as master@example.com then login as agent2@example.com
|
logout # logout as master@example.com then login as agent2@example.com
|
||||||
login(
|
login(
|
||||||
username: 'agent2@example.com',
|
username: 'agent2@example.com',
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# open Overview menu tab
|
# open Overview menu tab
|
||||||
click(
|
click(
|
||||||
|
@ -611,14 +611,14 @@ class AgentTicketOverviewLevel0Test < TestCase
|
||||||
)
|
)
|
||||||
|
|
||||||
# cleanup
|
# cleanup
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
logout() # logout as agent2@example.com and then login as master@example.com to clean up tickets
|
logout # logout as agent2@example.com and then login as master@example.com to clean up tickets
|
||||||
login(
|
login(
|
||||||
username: 'master@example.com',
|
username: 'master@example.com',
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# open ticket by search
|
# open ticket by search
|
||||||
ticket_open_by_search(
|
ticket_open_by_search(
|
||||||
|
|
|
@ -14,7 +14,7 @@ class AgentTicketOverviewPendingTil < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# create 4 tickets, 2 with pending til data and 2 without
|
# create 4 tickets, 2 with pending til data and 2 without
|
||||||
tickets = []
|
tickets = []
|
||||||
|
|
|
@ -24,7 +24,7 @@ class AgentTicketOverviewTabTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
title = "test #{rand(9_999_999)}"
|
title = "test #{rand(9_999_999)}"
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ class AgentTicketOverviewTabTest < TestCase
|
||||||
body: "overview tab test #3 - #{title}",
|
body: "overview tab test #3 - #{title}",
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
#click(text: 'Overviews')
|
#click(text: 'Overviews')
|
||||||
# enable full overviews
|
# enable full overviews
|
||||||
|
@ -97,6 +97,6 @@ class AgentTicketOverviewTabTest < TestCase
|
||||||
task_count_equals(0)
|
task_count_equals(0)
|
||||||
|
|
||||||
# cleanup
|
# cleanup
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -10,7 +10,7 @@ class AgentTicketTagTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# set tag (by tab)
|
# set tag (by tab)
|
||||||
ticket_create(
|
ticket_create(
|
||||||
|
@ -31,7 +31,7 @@ class AgentTicketTagTest < TestCase
|
||||||
|
|
||||||
# reload browser
|
# reload browser
|
||||||
sleep 6
|
sleep 6
|
||||||
reload()
|
reload
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
click(
|
click(
|
||||||
|
@ -188,7 +188,7 @@ class AgentTicketTagTest < TestCase
|
||||||
)
|
)
|
||||||
|
|
||||||
# reload browser
|
# reload browser
|
||||||
reload()
|
reload
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
# verify tags
|
# verify tags
|
||||||
|
@ -369,7 +369,7 @@ class AgentTicketTagTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
click(css: 'a[href="#manage"]')
|
click(css: 'a[href="#manage"]')
|
||||||
click(css: '.content.active a[href="#manage/tags"]')
|
click(css: '.content.active a[href="#manage/tags"]')
|
||||||
|
@ -510,7 +510,7 @@ class AgentTicketTagTest < TestCase
|
||||||
'NOT EXISTING' => false,
|
'NOT EXISTING' => false,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
reload()
|
reload
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
# verify tags
|
# verify tags
|
||||||
|
|
|
@ -12,7 +12,7 @@ class AgentTicketTaskChangedTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
ticket_create(
|
ticket_create(
|
||||||
data: {
|
data: {
|
||||||
|
@ -37,7 +37,7 @@ class AgentTicketTaskChangedTest < TestCase
|
||||||
# verify the 'Discard your changes' message does not appear (since there are no changes)
|
# verify the 'Discard your changes' message does not appear (since there are no changes)
|
||||||
assert_nil execute(js: "return $('.content.active .js-attributeBar .js-reset:not(\".hide\")').get(0)")
|
assert_nil execute(js: "return $('.content.active .js-attributeBar .js-reset:not(\".hide\")').get(0)")
|
||||||
|
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
exists_not( css: '.modal')
|
exists_not( css: '.modal')
|
||||||
|
|
|
@ -13,7 +13,7 @@ class AgentTicketTextModuleTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# create new text modules
|
# create new text modules
|
||||||
text_module_create(
|
text_module_create(
|
||||||
|
@ -54,7 +54,7 @@ class AgentTicketTextModuleTest < TestCase
|
||||||
css: '.active div[data-name=body]',
|
css: '.active div[data-name=body]',
|
||||||
value: "some content#{random}",
|
value: "some content#{random}",
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# test with two browser windows
|
# test with two browser windows
|
||||||
random = "text_II_module_test_#{rand(99_999_999)}"
|
random = "text_II_module_test_#{rand(99_999_999)}"
|
||||||
|
|
|
@ -10,7 +10,7 @@ class AgentTicketTimeAccountingTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# enable time accounting
|
# enable time accounting
|
||||||
click(
|
click(
|
||||||
|
@ -42,7 +42,7 @@ class AgentTicketTimeAccountingTest < TestCase
|
||||||
click(
|
click(
|
||||||
css: '.active .js-submit',
|
css: '.active .js-submit',
|
||||||
)
|
)
|
||||||
modal_ready()
|
modal_ready
|
||||||
set(
|
set(
|
||||||
css: '.content.active .modal [name=time_unit]',
|
css: '.content.active .modal [name=time_unit]',
|
||||||
value: '4',
|
value: '4',
|
||||||
|
@ -50,7 +50,7 @@ class AgentTicketTimeAccountingTest < TestCase
|
||||||
click(
|
click(
|
||||||
css: '.content.active .modal .js-submit',
|
css: '.content.active .modal .js-submit',
|
||||||
)
|
)
|
||||||
modal_disappear()
|
modal_disappear
|
||||||
|
|
||||||
watch_for(
|
watch_for(
|
||||||
css: '.content.active .js-timeUnit',
|
css: '.content.active .js-timeUnit',
|
||||||
|
@ -75,7 +75,7 @@ class AgentTicketTimeAccountingTest < TestCase
|
||||||
click(
|
click(
|
||||||
css: '.active .js-submit',
|
css: '.active .js-submit',
|
||||||
)
|
)
|
||||||
modal_ready()
|
modal_ready
|
||||||
set(
|
set(
|
||||||
css: '.content.active .modal [name=time_unit]',
|
css: '.content.active .modal [name=time_unit]',
|
||||||
value: '4,6',
|
value: '4,6',
|
||||||
|
@ -83,7 +83,7 @@ class AgentTicketTimeAccountingTest < TestCase
|
||||||
click(
|
click(
|
||||||
css: '.content.active .modal .js-submit',
|
css: '.content.active .modal .js-submit',
|
||||||
)
|
)
|
||||||
modal_disappear()
|
modal_disappear
|
||||||
|
|
||||||
watch_for(
|
watch_for(
|
||||||
css: '.content.active .js-timeUnit',
|
css: '.content.active .js-timeUnit',
|
||||||
|
@ -100,7 +100,7 @@ class AgentTicketTimeAccountingTest < TestCase
|
||||||
css: '.active .js-submit',
|
css: '.active .js-submit',
|
||||||
)
|
)
|
||||||
|
|
||||||
modal_ready()
|
modal_ready
|
||||||
set(
|
set(
|
||||||
css: '.content.active .modal [name=time_unit]',
|
css: '.content.active .modal [name=time_unit]',
|
||||||
value: '4abc',
|
value: '4abc',
|
||||||
|
@ -118,7 +118,7 @@ class AgentTicketTimeAccountingTest < TestCase
|
||||||
click(
|
click(
|
||||||
css: '.content.active .modal .js-submit',
|
css: '.content.active .modal .js-submit',
|
||||||
)
|
)
|
||||||
modal_disappear()
|
modal_disappear
|
||||||
watch_for(
|
watch_for(
|
||||||
css: '.content.active .js-timeUnit',
|
css: '.content.active .js-timeUnit',
|
||||||
value: '8.6',
|
value: '8.6',
|
||||||
|
@ -139,7 +139,7 @@ class AgentTicketTimeAccountingTest < TestCase
|
||||||
# make sure "off" AJAX request gets completed
|
# make sure "off" AJAX request gets completed
|
||||||
# otherwise following tests might fail because
|
# otherwise following tests might fail because
|
||||||
# off still active timeaccounting
|
# off still active timeaccounting
|
||||||
logout()
|
logout
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_closing_time_accounting_modal_by_clicking_background
|
def test_closing_time_accounting_modal_by_clicking_background
|
||||||
|
@ -149,7 +149,7 @@ class AgentTicketTimeAccountingTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# enable time accounting
|
# enable time accounting
|
||||||
click(
|
click(
|
||||||
|
@ -181,18 +181,18 @@ class AgentTicketTimeAccountingTest < TestCase
|
||||||
click(
|
click(
|
||||||
css: '.active .js-submit',
|
css: '.active .js-submit',
|
||||||
)
|
)
|
||||||
modal_ready()
|
modal_ready
|
||||||
|
|
||||||
# Click outside the modal to make it disappear
|
# Click outside the modal to make it disappear
|
||||||
execute(
|
execute(
|
||||||
js: 'document.elementFromPoint(300, 100).click();',
|
js: 'document.elementFromPoint(300, 100).click();',
|
||||||
)
|
)
|
||||||
modal_disappear()
|
modal_disappear
|
||||||
|
|
||||||
click(
|
click(
|
||||||
css: '.active .js-submit',
|
css: '.active .js-submit',
|
||||||
)
|
)
|
||||||
modal_ready()
|
modal_ready
|
||||||
set(
|
set(
|
||||||
css: '.content.active .modal [name=time_unit]',
|
css: '.content.active .modal [name=time_unit]',
|
||||||
value: '4',
|
value: '4',
|
||||||
|
@ -200,7 +200,7 @@ class AgentTicketTimeAccountingTest < TestCase
|
||||||
click(
|
click(
|
||||||
css: '.content.active .modal .js-submit',
|
css: '.content.active .modal .js-submit',
|
||||||
)
|
)
|
||||||
modal_disappear()
|
modal_disappear
|
||||||
|
|
||||||
# disable time accounting
|
# disable time accounting
|
||||||
click(
|
click(
|
||||||
|
@ -217,6 +217,6 @@ class AgentTicketTimeAccountingTest < TestCase
|
||||||
# make sure "off" AJAX request gets completed
|
# make sure "off" AJAX request gets completed
|
||||||
# otherwise following tests might fail because
|
# otherwise following tests might fail because
|
||||||
# off still active timeaccounting
|
# off still active timeaccounting
|
||||||
logout()
|
logout
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -10,7 +10,7 @@ class AgentTicketUpdate1Test < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# confirm on create
|
# confirm on create
|
||||||
ticket_create(
|
ticket_create(
|
||||||
|
|
|
@ -12,7 +12,7 @@ class AgentTicketUpdate4Test < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# date object
|
# date object
|
||||||
object_manager_attribute_create(
|
object_manager_attribute_create(
|
||||||
|
|
|
@ -11,7 +11,7 @@ class AgentTicketUpdateAndReloadTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# create ticket
|
# create ticket
|
||||||
ticket_create(
|
ticket_create(
|
||||||
|
@ -45,7 +45,7 @@ class AgentTicketUpdateAndReloadTest < TestCase
|
||||||
)
|
)
|
||||||
|
|
||||||
# reload instances, verify autosave
|
# reload instances, verify autosave
|
||||||
reload()
|
reload
|
||||||
|
|
||||||
# check if customer is still shown in sidebar
|
# check if customer is still shown in sidebar
|
||||||
click(css: '.active .tabsSidebar-tab[data-tab="customer"]')
|
click(css: '.active .tabsSidebar-tab[data-tab="customer"]')
|
||||||
|
@ -95,7 +95,7 @@ class AgentTicketUpdateAndReloadTest < TestCase
|
||||||
)
|
)
|
||||||
|
|
||||||
# reload
|
# reload
|
||||||
reload()
|
reload
|
||||||
sleep 4
|
sleep 4
|
||||||
|
|
||||||
# check task title
|
# check task title
|
||||||
|
@ -122,7 +122,7 @@ class AgentTicketUpdateAndReloadTest < TestCase
|
||||||
)
|
)
|
||||||
|
|
||||||
# reload
|
# reload
|
||||||
reload()
|
reload
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
# check page title
|
# check page title
|
||||||
|
@ -131,6 +131,6 @@ class AgentTicketUpdateAndReloadTest < TestCase
|
||||||
)
|
)
|
||||||
|
|
||||||
# cleanup
|
# cleanup
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -54,14 +54,14 @@ class AgentTicketZoomHideTest < TestCase
|
||||||
css: '.attachment-icon img',
|
css: '.attachment-icon img',
|
||||||
)
|
)
|
||||||
|
|
||||||
modal_ready()
|
modal_ready
|
||||||
|
|
||||||
# Now go to a previous ticket and confirm that the modal disappears
|
# Now go to a previous ticket and confirm that the modal disappears
|
||||||
location(
|
location(
|
||||||
url: "#{browser_url}/#ticket/zoom/1",
|
url: "#{browser_url}/#ticket/zoom/1",
|
||||||
)
|
)
|
||||||
sleep 2
|
sleep 2
|
||||||
modal_disappear()
|
modal_disappear
|
||||||
end
|
end
|
||||||
|
|
||||||
def teardown
|
def teardown
|
||||||
|
|
|
@ -16,7 +16,7 @@ class AgentUserManageTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# create customer
|
# create customer
|
||||||
click(css: 'a[href="#new"]', only_if_exists: true)
|
click(css: 'a[href="#new"]', only_if_exists: true)
|
||||||
|
@ -37,7 +37,7 @@ class AgentUserManageTest < TestCase
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
click(css: '.content.active .newTicket .recipientList-entry.js-objectNew')
|
click(css: '.content.active .newTicket .recipientList-entry.js-objectNew')
|
||||||
|
|
||||||
modal_ready()
|
modal_ready
|
||||||
set(
|
set(
|
||||||
css: '.content.active .modal input[name="firstname"]',
|
css: '.content.active .modal input[name="firstname"]',
|
||||||
value: firstname,
|
value: firstname,
|
||||||
|
@ -52,7 +52,7 @@ class AgentUserManageTest < TestCase
|
||||||
)
|
)
|
||||||
|
|
||||||
click(css: '.content.active .modal button.js-submit')
|
click(css: '.content.active .modal button.js-submit')
|
||||||
modal_disappear()
|
modal_disappear
|
||||||
|
|
||||||
sleep 4
|
sleep 4
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ class AgentUserManageTest < TestCase
|
||||||
)
|
)
|
||||||
|
|
||||||
# call new ticket screen again
|
# call new ticket screen again
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# wait for user get indexed in elastic search
|
# wait for user get indexed in elastic search
|
||||||
await_global_search(query: random_number)
|
await_global_search(query: random_number)
|
||||||
|
@ -146,7 +146,7 @@ class AgentUserManageTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
ticket_create(
|
ticket_create(
|
||||||
data: {
|
data: {
|
||||||
|
@ -172,7 +172,7 @@ class AgentUserManageTest < TestCase
|
||||||
click(css: '.content.active .tabsSidebar .sidebar[data-tab="customer"] .js-actions')
|
click(css: '.content.active .tabsSidebar .sidebar[data-tab="customer"] .js-actions')
|
||||||
click(css: '.content.active .tabsSidebar .sidebar[data-tab="customer"] .js-actions li[data-type="customer-change"]')
|
click(css: '.content.active .tabsSidebar .sidebar[data-tab="customer"] .js-actions li[data-type="customer-change"]')
|
||||||
|
|
||||||
modal_ready()
|
modal_ready
|
||||||
click(css: '.content.active .modal [name="customer_id_completion"]')
|
click(css: '.content.active .modal [name="customer_id_completion"]')
|
||||||
|
|
||||||
# check if pulldown is open, it's not working stable via selenium
|
# check if pulldown is open, it's not working stable via selenium
|
||||||
|
@ -229,7 +229,7 @@ class AgentUserManageTest < TestCase
|
||||||
)
|
)
|
||||||
|
|
||||||
click(css: '.content.active .modal button.js-submit')
|
click(css: '.content.active .modal button.js-submit')
|
||||||
modal_disappear()
|
modal_disappear
|
||||||
|
|
||||||
watch_for(
|
watch_for(
|
||||||
css: '.content.active .tabsSidebar .sidebar[data-tab="customer"]',
|
css: '.content.active .tabsSidebar .sidebar[data-tab="customer"]',
|
||||||
|
|
|
@ -12,7 +12,7 @@ class AgentUserProfileTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# search and open user
|
# search and open user
|
||||||
user_open_by_search(value: 'Braun')
|
user_open_by_search(value: 'Braun')
|
||||||
|
@ -37,14 +37,14 @@ class AgentUserProfileTest < TestCase
|
||||||
css: '.active [data-name="note"]',
|
css: '.active [data-name="note"]',
|
||||||
value: 'some note 123',
|
value: 'some note 123',
|
||||||
)
|
)
|
||||||
empty_search()
|
empty_search
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
# check and change note again in edit screen
|
# check and change note again in edit screen
|
||||||
click(css: '.active .js-action .icon-arrow-down', fast: true)
|
click(css: '.active .js-action .icon-arrow-down', fast: true)
|
||||||
click(css: '.active .js-action [data-type="edit"]')
|
click(css: '.active .js-action [data-type="edit"]')
|
||||||
|
|
||||||
modal_ready()
|
modal_ready
|
||||||
watch_for(
|
watch_for(
|
||||||
css: '.active .modal',
|
css: '.active .modal',
|
||||||
value: 'some note 123',
|
value: 'some note 123',
|
||||||
|
@ -59,7 +59,7 @@ class AgentUserProfileTest < TestCase
|
||||||
value: 'some note abc',
|
value: 'some note abc',
|
||||||
)
|
)
|
||||||
click(css: '.active .modal button.js-submit')
|
click(css: '.active .modal button.js-submit')
|
||||||
modal_disappear()
|
modal_disappear
|
||||||
|
|
||||||
watch_for(
|
watch_for(
|
||||||
css: '.active .profile-window',
|
css: '.active .profile-window',
|
||||||
|
@ -76,13 +76,13 @@ class AgentUserProfileTest < TestCase
|
||||||
click(css: '.active .js-action .icon-arrow-down', fast: true)
|
click(css: '.active .js-action .icon-arrow-down', fast: true)
|
||||||
click(css: '.active .js-action [data-type="edit"]')
|
click(css: '.active .js-action [data-type="edit"]')
|
||||||
|
|
||||||
modal_ready()
|
modal_ready
|
||||||
set(
|
set(
|
||||||
css: '.modal [name="lastname"]',
|
css: '.modal [name="lastname"]',
|
||||||
value: 'Braun',
|
value: 'Braun',
|
||||||
)
|
)
|
||||||
click(css: '.active .modal button.js-submit')
|
click(css: '.active .modal button.js-submit')
|
||||||
modal_disappear()
|
modal_disappear
|
||||||
|
|
||||||
verify_task(
|
verify_task(
|
||||||
data: {
|
data: {
|
||||||
|
@ -106,7 +106,7 @@ class AgentUserProfileTest < TestCase
|
||||||
css: '.active .profile-window',
|
css: '.active .profile-window',
|
||||||
value: "user profile check #{message}",
|
value: "user profile check #{message}",
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# work with two browser windows
|
# work with two browser windows
|
||||||
message = "comment 1 #{rand(99_999_999_999_999_999)}"
|
message = "comment 1 #{rand(99_999_999_999_999_999)}"
|
||||||
|
|
|
@ -23,10 +23,10 @@ class AuthTest < TestCase
|
||||||
username: 'nicole.braun@zammad.org',
|
username: 'nicole.braun@zammad.org',
|
||||||
password: 'test',
|
password: 'test',
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# reload page
|
# reload page
|
||||||
reload()
|
reload
|
||||||
|
|
||||||
# check if cookie is temporarily
|
# check if cookie is temporarily
|
||||||
watch_for(
|
watch_for(
|
||||||
|
@ -75,7 +75,7 @@ class AuthTest < TestCase
|
||||||
expires: '\d{4}-\d{1,2}-\d{1,2}.+?',
|
expires: '\d{4}-\d{1,2}-\d{1,2}.+?',
|
||||||
)
|
)
|
||||||
|
|
||||||
logout()
|
logout
|
||||||
|
|
||||||
# verify session cookie
|
# verify session cookie
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
|
@ -13,7 +13,7 @@ class CustomerTicketCreateFieldsTest < TestCase
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
# remove local object attributes bound to the session
|
# remove local object attributes bound to the session
|
||||||
logout()
|
logout
|
||||||
|
|
||||||
# re-create agent session and fetch object attributes
|
# re-create agent session and fetch object attributes
|
||||||
login(
|
login(
|
||||||
|
@ -24,7 +24,7 @@ class CustomerTicketCreateFieldsTest < TestCase
|
||||||
# re-remove local object attributes bound to the session
|
# re-remove local object attributes bound to the session
|
||||||
# there was an issue (#1856) where the old attribute values
|
# there was an issue (#1856) where the old attribute values
|
||||||
# persisted and were stored as the original attributes
|
# persisted and were stored as the original attributes
|
||||||
logout()
|
logout
|
||||||
|
|
||||||
# create customer session and fetch object attributes
|
# create customer session and fetch object attributes
|
||||||
login(
|
login(
|
||||||
|
|
|
@ -205,7 +205,7 @@ class CustomerTicketCreateTest < TestCase
|
||||||
no_quote: true,
|
no_quote: true,
|
||||||
)
|
)
|
||||||
|
|
||||||
logout()
|
logout
|
||||||
|
|
||||||
# verify if we still can create new tickets as agent
|
# verify if we still can create new tickets as agent
|
||||||
login(
|
login(
|
||||||
|
@ -213,7 +213,7 @@ class CustomerTicketCreateTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
ticket_create(
|
ticket_create(
|
||||||
data: {
|
data: {
|
||||||
|
@ -244,7 +244,7 @@ class CustomerTicketCreateTest < TestCase
|
||||||
|
|
||||||
sleep(1)
|
sleep(1)
|
||||||
|
|
||||||
logout()
|
logout
|
||||||
|
|
||||||
# check if new ticket button is not visible
|
# check if new ticket button is not visible
|
||||||
|
|
||||||
|
@ -256,7 +256,7 @@ class CustomerTicketCreateTest < TestCase
|
||||||
|
|
||||||
assert(exists_not(css: 'a[href="#customer_ticket_new"]'))
|
assert(exists_not(css: 'a[href="#customer_ticket_new"]'))
|
||||||
|
|
||||||
logout()
|
logout
|
||||||
|
|
||||||
# enable ticket creation
|
# enable ticket creation
|
||||||
|
|
||||||
|
@ -274,7 +274,7 @@ class CustomerTicketCreateTest < TestCase
|
||||||
|
|
||||||
sleep(1)
|
sleep(1)
|
||||||
|
|
||||||
logout()
|
logout
|
||||||
|
|
||||||
# check if new ticket button is visible
|
# check if new ticket button is visible
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ class FirstStepsTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
click(css: '.active.content .tab[data-area="first-steps-widgets"]')
|
click(css: '.active.content .tab[data-area="first-steps-widgets"]')
|
||||||
watch_for(
|
watch_for(
|
||||||
|
@ -25,7 +25,7 @@ class FirstStepsTest < TestCase
|
||||||
# invite agent (with more then one group)
|
# invite agent (with more then one group)
|
||||||
click(css: '.active.content .js-inviteAgent')
|
click(css: '.active.content .js-inviteAgent')
|
||||||
|
|
||||||
modal_ready()
|
modal_ready
|
||||||
|
|
||||||
set(
|
set(
|
||||||
css: '.modal [name="firstname"]',
|
css: '.modal [name="firstname"]',
|
||||||
|
@ -52,11 +52,11 @@ class FirstStepsTest < TestCase
|
||||||
css: 'body div.modal',
|
css: 'body div.modal',
|
||||||
value: 'Sending',
|
value: 'Sending',
|
||||||
)
|
)
|
||||||
modal_disappear()
|
modal_disappear
|
||||||
|
|
||||||
# invite customer
|
# invite customer
|
||||||
click(css: '.active.content .js-inviteCustomer')
|
click(css: '.active.content .js-inviteCustomer')
|
||||||
modal_ready()
|
modal_ready
|
||||||
set(
|
set(
|
||||||
css: '.modal [name="firstname"]',
|
css: '.modal [name="firstname"]',
|
||||||
value: 'Client',
|
value: 'Client',
|
||||||
|
@ -85,14 +85,14 @@ class FirstStepsTest < TestCase
|
||||||
css: 'body div.modal',
|
css: 'body div.modal',
|
||||||
value: 'Sending',
|
value: 'Sending',
|
||||||
)
|
)
|
||||||
modal_disappear()
|
modal_disappear
|
||||||
|
|
||||||
# test ticket
|
# test ticket
|
||||||
click(
|
click(
|
||||||
css: '.active.content .js-testTicket',
|
css: '.active.content .js-testTicket',
|
||||||
fast: true,
|
fast: true,
|
||||||
)
|
)
|
||||||
modal_ready()
|
modal_ready
|
||||||
watch_for(
|
watch_for(
|
||||||
css: 'body div.modal',
|
css: 'body div.modal',
|
||||||
value: 'A Test Ticket has been created',
|
value: 'A Test Ticket has been created',
|
||||||
|
@ -105,7 +105,7 @@ class FirstStepsTest < TestCase
|
||||||
css: 'body div.modal',
|
css: 'body div.modal',
|
||||||
value: 'Test Ticket',
|
value: 'Test Ticket',
|
||||||
)
|
)
|
||||||
modal_disappear()
|
modal_disappear
|
||||||
|
|
||||||
execute(
|
execute(
|
||||||
js: '$(".active.content .sidebar").show()',
|
js: '$(".active.content .sidebar").show()',
|
||||||
|
|
|
@ -11,7 +11,7 @@ class IntegrationTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# change settings
|
# change settings
|
||||||
click(css: 'a[href="#manage"]')
|
click(css: 'a[href="#manage"]')
|
||||||
|
@ -52,7 +52,7 @@ class IntegrationTest < TestCase
|
||||||
css: '.content.active .main .js-inboundBlockCallerId [value="block spam caller id"]',
|
css: '.content.active .main .js-inboundBlockCallerId [value="block spam caller id"]',
|
||||||
)
|
)
|
||||||
|
|
||||||
reload()
|
reload
|
||||||
exists(
|
exists(
|
||||||
css: '.content.active .main .js-inboundBlockCallerId [value="0411234567"]',
|
css: '.content.active .main .js-inboundBlockCallerId [value="0411234567"]',
|
||||||
)
|
)
|
||||||
|
@ -67,7 +67,7 @@ class IntegrationTest < TestCase
|
||||||
type: 'off',
|
type: 'off',
|
||||||
)
|
)
|
||||||
|
|
||||||
reload()
|
reload
|
||||||
exists_not(
|
exists_not(
|
||||||
css: '.content.active .main .js-inboundBlockCallerId [value="0411234567"]',
|
css: '.content.active .main .js-inboundBlockCallerId [value="0411234567"]',
|
||||||
)
|
)
|
||||||
|
@ -83,7 +83,7 @@ class IntegrationTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# change settings
|
# change settings
|
||||||
click(css: 'a[href="#manage"]')
|
click(css: 'a[href="#manage"]')
|
||||||
|
@ -141,7 +141,7 @@ class IntegrationTest < TestCase
|
||||||
value: 'someuser',
|
value: 'someuser',
|
||||||
)
|
)
|
||||||
|
|
||||||
reload()
|
reload
|
||||||
|
|
||||||
match(
|
match(
|
||||||
css: '.content.active .main select[name="group_ids"]',
|
css: '.content.active .main select[name="group_ids"]',
|
||||||
|
@ -169,7 +169,7 @@ class IntegrationTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# change settings
|
# change settings
|
||||||
click(css: 'a[href="#manage"]')
|
click(css: 'a[href="#manage"]')
|
||||||
|
@ -211,7 +211,7 @@ class IntegrationTest < TestCase
|
||||||
css: '.content.active .main .js-userSync [value="destination1"]',
|
css: '.content.active .main .js-userSync [value="destination1"]',
|
||||||
)
|
)
|
||||||
|
|
||||||
reload()
|
reload
|
||||||
|
|
||||||
match(
|
match(
|
||||||
css: '.content.active .main input[name="api_key"]',
|
css: '.content.active .main input[name="api_key"]',
|
||||||
|
@ -235,7 +235,7 @@ class IntegrationTest < TestCase
|
||||||
)
|
)
|
||||||
click(css: '.content.active .main .js-submit')
|
click(css: '.content.active .main .js-submit')
|
||||||
|
|
||||||
reload()
|
reload
|
||||||
match_not(
|
match_not(
|
||||||
css: '.content.active .main input[name="api_key"]',
|
css: '.content.active .main input[name="api_key"]',
|
||||||
value: 'some_api_key',
|
value: 'some_api_key',
|
||||||
|
@ -259,7 +259,7 @@ class IntegrationTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# change settings
|
# change settings
|
||||||
click(css: 'a[href="#manage"]')
|
click(css: 'a[href="#manage"]')
|
||||||
|
@ -303,7 +303,7 @@ class IntegrationTest < TestCase
|
||||||
value: 'no',
|
value: 'no',
|
||||||
)
|
)
|
||||||
|
|
||||||
reload()
|
reload
|
||||||
|
|
||||||
match(
|
match(
|
||||||
css: '.content.active .main input[name="icinga_sender"]',
|
css: '.content.active .main input[name="icinga_sender"]',
|
||||||
|
|
|
@ -10,7 +10,7 @@ class KeyboardShortcutsTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
# show shortkeys
|
# show shortkeys
|
||||||
|
@ -41,14 +41,14 @@ class KeyboardShortcutsTest < TestCase
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
modal_ready()
|
modal_ready
|
||||||
# hide shortkeys
|
# hide shortkeys
|
||||||
shortcut(key: 'h')
|
shortcut(key: 'h')
|
||||||
modal_disappear()
|
modal_disappear
|
||||||
|
|
||||||
# show shortkeys
|
# show shortkeys
|
||||||
shortcut(key: 'h')
|
shortcut(key: 'h')
|
||||||
modal_ready()
|
modal_ready
|
||||||
|
|
||||||
# show notifications
|
# show notifications
|
||||||
shortcut(key: 'a')
|
shortcut(key: 'a')
|
||||||
|
|
|
@ -30,13 +30,13 @@ class ManageTest < TestCase
|
||||||
|
|
||||||
click(css: '.table-overview tr:last-child td')
|
click(css: '.table-overview tr:last-child td')
|
||||||
|
|
||||||
modal_ready()
|
modal_ready
|
||||||
set(
|
set(
|
||||||
css: '.modal input[name="lastname"]',
|
css: '.modal input[name="lastname"]',
|
||||||
value: "2Manage Lastname#{random}",
|
value: "2Manage Lastname#{random}",
|
||||||
)
|
)
|
||||||
click(css: '.modal button.js-submit')
|
click(css: '.modal button.js-submit')
|
||||||
modal_disappear()
|
modal_disappear
|
||||||
|
|
||||||
watch_for(
|
watch_for(
|
||||||
css: 'body',
|
css: 'body',
|
||||||
|
@ -58,7 +58,7 @@ class ManageTest < TestCase
|
||||||
|
|
||||||
click(css: '.content:not(.hide) .action:last-child .js-edit')
|
click(css: '.content:not(.hide) .action:last-child .js-edit')
|
||||||
|
|
||||||
modal_ready()
|
modal_ready
|
||||||
set(
|
set(
|
||||||
css: '.modal input[name=name]',
|
css: '.modal input[name=name]',
|
||||||
value: "some sla update #{random}",
|
value: "some sla update #{random}",
|
||||||
|
@ -68,7 +68,7 @@ class ManageTest < TestCase
|
||||||
value: '2:01',
|
value: '2:01',
|
||||||
)
|
)
|
||||||
click(css: '.modal button.js-submit')
|
click(css: '.modal button.js-submit')
|
||||||
modal_disappear()
|
modal_disappear
|
||||||
|
|
||||||
watch_for(
|
watch_for(
|
||||||
css: 'body',
|
css: 'body',
|
||||||
|
@ -94,7 +94,7 @@ class ManageTest < TestCase
|
||||||
value: "some sla update #{random}",
|
value: "some sla update #{random}",
|
||||||
)
|
)
|
||||||
|
|
||||||
reload()
|
reload
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
click(css: 'a[href="#manage"]')
|
click(css: 'a[href="#manage"]')
|
||||||
|
|
|
@ -11,7 +11,7 @@ class PreferencesLanguageTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# start ticket create
|
# start ticket create
|
||||||
ticket_create(
|
ticket_create(
|
||||||
|
@ -289,7 +289,7 @@ class PreferencesLanguageTest < TestCase
|
||||||
sleep 6
|
sleep 6
|
||||||
|
|
||||||
# check if language is still used after reload
|
# check if language is still used after reload
|
||||||
reload()
|
reload
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
watch_for(
|
watch_for(
|
||||||
|
|
|
@ -11,14 +11,14 @@ class PreferencesTokenAccessTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
click(css: 'a[href="#current_user"]')
|
click(css: 'a[href="#current_user"]')
|
||||||
click(css: 'a[href="#profile"]')
|
click(css: 'a[href="#profile"]')
|
||||||
click(css: 'a[href="#profile/token_access"]')
|
click(css: 'a[href="#profile/token_access"]')
|
||||||
|
|
||||||
click(css: '.content.active .js-create')
|
click(css: '.content.active .js-create')
|
||||||
|
|
||||||
modal_ready()
|
modal_ready
|
||||||
set(
|
set(
|
||||||
css: '.content.active .modal .js-input',
|
css: '.content.active .modal .js-input',
|
||||||
value: 'Some App#1',
|
value: 'Some App#1',
|
||||||
|
@ -35,7 +35,7 @@ class PreferencesTokenAccessTest < TestCase
|
||||||
value: 'Your New Personal Access Token'
|
value: 'Your New Personal Access Token'
|
||||||
)
|
)
|
||||||
click(css: '.modal .js-submit')
|
click(css: '.modal .js-submit')
|
||||||
modal_disappear()
|
modal_disappear
|
||||||
|
|
||||||
watch_for(
|
watch_for(
|
||||||
css: '.content.active .js-tokenList',
|
css: '.content.active .js-tokenList',
|
||||||
|
@ -48,7 +48,7 @@ class PreferencesTokenAccessTest < TestCase
|
||||||
|
|
||||||
click(css: '.content.active .js-create')
|
click(css: '.content.active .js-create')
|
||||||
|
|
||||||
modal_ready()
|
modal_ready
|
||||||
set(
|
set(
|
||||||
css: '.content.active .modal .js-input',
|
css: '.content.active .modal .js-input',
|
||||||
value: 'Some App#2',
|
value: 'Some App#2',
|
||||||
|
@ -61,7 +61,7 @@ class PreferencesTokenAccessTest < TestCase
|
||||||
value: 'Your New Personal Access Token'
|
value: 'Your New Personal Access Token'
|
||||||
)
|
)
|
||||||
click(css: '.modal .js-submit')
|
click(css: '.modal .js-submit')
|
||||||
modal_disappear()
|
modal_disappear
|
||||||
|
|
||||||
watch_for(
|
watch_for(
|
||||||
css: '.content.active .js-tokenList',
|
css: '.content.active .js-tokenList',
|
||||||
|
@ -70,7 +70,7 @@ class PreferencesTokenAccessTest < TestCase
|
||||||
|
|
||||||
click(css: '.content.active .js-tokenList .js-delete')
|
click(css: '.content.active .js-tokenList .js-delete')
|
||||||
|
|
||||||
modal_ready()
|
modal_ready
|
||||||
watch_for(
|
watch_for(
|
||||||
css: '.content.active .modal .modal-header',
|
css: '.content.active .modal .modal-header',
|
||||||
value: 'confirm',
|
value: 'confirm',
|
||||||
|
@ -78,7 +78,7 @@ class PreferencesTokenAccessTest < TestCase
|
||||||
click(
|
click(
|
||||||
css: '.content.active .modal .js-submit',
|
css: '.content.active .modal .js-submit',
|
||||||
)
|
)
|
||||||
modal_disappear()
|
modal_disappear
|
||||||
watch_for_disappear(
|
watch_for_disappear(
|
||||||
css: '.content.active .js-tokenList',
|
css: '.content.active .js-tokenList',
|
||||||
value: 'Some App#2'
|
value: 'Some App#2'
|
||||||
|
|
|
@ -11,7 +11,7 @@ class ReportingTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
report_profile_create(
|
report_profile_create(
|
||||||
data: {
|
data: {
|
||||||
|
|
|
@ -10,7 +10,7 @@ class SettingTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# make sure, that we have english frontend
|
# make sure, that we have english frontend
|
||||||
click(css: 'a[href="#current_user"]')
|
click(css: 'a[href="#current_user"]')
|
||||||
|
@ -111,7 +111,7 @@ class SettingTest < TestCase
|
||||||
value: '---',
|
value: '---',
|
||||||
)
|
)
|
||||||
|
|
||||||
reload()
|
reload
|
||||||
|
|
||||||
click(css: 'a[href="#settings/security"]')
|
click(css: 'a[href="#settings/security"]')
|
||||||
click(css: 'a[href="#third_party_auth"]')
|
click(css: 'a[href="#third_party_auth"]')
|
||||||
|
@ -149,7 +149,7 @@ class SettingTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
verify_title(value: 'Zammad Test System')
|
verify_title(value: 'Zammad Test System')
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ class SwitchToUserTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
click(css: 'a[href="#manage"]')
|
click(css: 'a[href="#manage"]')
|
||||||
click(css: '.content.active a[href="#manage/users"]')
|
click(css: '.content.active a[href="#manage/users"]')
|
||||||
|
|
|
@ -10,7 +10,7 @@ class TaskbarTaskTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# persistant task
|
# persistant task
|
||||||
click(css: 'a[href="#new"]', only_if_exists: true)
|
click(css: 'a[href="#new"]', only_if_exists: true)
|
||||||
|
@ -39,7 +39,7 @@ class TaskbarTaskTest < TestCase
|
||||||
value: 'some test AAA',
|
value: 'some test AAA',
|
||||||
)
|
)
|
||||||
|
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
exists_not(css: '.active .newTicket input[name="title"]')
|
exists_not(css: '.active .newTicket input[name="title"]')
|
||||||
end
|
end
|
||||||
|
@ -51,7 +51,7 @@ class TaskbarTaskTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
click(css: 'a[href="#new"]', only_if_exists: true)
|
click(css: 'a[href="#new"]', only_if_exists: true)
|
||||||
click(css: 'a[href="#ticket/create"]', wait: 0.8)
|
click(css: 'a[href="#ticket/create"]', wait: 0.8)
|
||||||
|
@ -77,7 +77,7 @@ class TaskbarTaskTest < TestCase
|
||||||
)
|
)
|
||||||
sleep 3
|
sleep 3
|
||||||
|
|
||||||
logout()
|
logout
|
||||||
sleep 4
|
sleep 4
|
||||||
|
|
||||||
# relogin with master - task are not viewable
|
# relogin with master - task are not viewable
|
||||||
|
@ -96,7 +96,7 @@ class TaskbarTaskTest < TestCase
|
||||||
css: 'body',
|
css: 'body',
|
||||||
value: 'OUTBOUND TEST#1',
|
value: 'OUTBOUND TEST#1',
|
||||||
)
|
)
|
||||||
logout()
|
logout
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
match_not(
|
match_not(
|
||||||
|
|
|
@ -11,7 +11,7 @@ class TranslationTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
click(css: 'a[href="#current_user"]')
|
click(css: 'a[href="#current_user"]')
|
||||||
click(css: 'a[href="#profile"]')
|
click(css: 'a[href="#profile"]')
|
||||||
|
@ -144,7 +144,7 @@ class TranslationTest < TestCase
|
||||||
value: 'Übersichten123',
|
value: 'Übersichten123',
|
||||||
)
|
)
|
||||||
|
|
||||||
reload()
|
reload
|
||||||
exists_not(
|
exists_not(
|
||||||
css: 'span.translation[title="Overviews"]',
|
css: 'span.translation[title="Overviews"]',
|
||||||
)
|
)
|
||||||
|
@ -260,7 +260,7 @@ class TranslationTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
click(css: 'a[href="#current_user"]')
|
click(css: 'a[href="#current_user"]')
|
||||||
click(css: 'a[href="#profile"]')
|
click(css: 'a[href="#profile"]')
|
||||||
|
@ -285,7 +285,7 @@ class TranslationTest < TestCase
|
||||||
|
|
||||||
click(css: '.content.active .js-syncChanges')
|
click(css: '.content.active .js-syncChanges')
|
||||||
|
|
||||||
modal_ready()
|
modal_ready
|
||||||
watch_for(
|
watch_for(
|
||||||
css: '.content.active .modal',
|
css: '.content.active .modal',
|
||||||
value: 'Letzte Übersetzung laden',
|
value: 'Letzte Übersetzung laden',
|
||||||
|
@ -327,7 +327,7 @@ class TranslationTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
click(css: 'a[href="#current_user"]')
|
click(css: 'a[href="#current_user"]')
|
||||||
click(css: 'a[href="#profile"]')
|
click(css: 'a[href="#profile"]')
|
||||||
|
|
|
@ -10,7 +10,7 @@ class AgentProfilePermissionsTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
user_open_by_search(value: 'Braun')
|
user_open_by_search(value: 'Braun')
|
||||||
|
|
||||||
|
@ -34,13 +34,13 @@ class AgentProfilePermissionsTest < TestCase
|
||||||
css: '.content.active [data-name="note"]',
|
css: '.content.active [data-name="note"]',
|
||||||
value: 'some note 123',
|
value: 'some note 123',
|
||||||
)
|
)
|
||||||
empty_search()
|
empty_search
|
||||||
|
|
||||||
# check and change note again in edit screen
|
# check and change note again in edit screen
|
||||||
click(css: '.content.active .js-action .icon-arrow-down', fast: true)
|
click(css: '.content.active .js-action .icon-arrow-down', fast: true)
|
||||||
click(css: '.content.active .js-action [data-type="edit"]')
|
click(css: '.content.active .js-action [data-type="edit"]')
|
||||||
|
|
||||||
modal_ready()
|
modal_ready
|
||||||
watch_for(
|
watch_for(
|
||||||
css: '.content.active .modal',
|
css: '.content.active .modal',
|
||||||
value: 'some note 123',
|
value: 'some note 123',
|
||||||
|
@ -55,7 +55,7 @@ class AgentProfilePermissionsTest < TestCase
|
||||||
value: 'some note abc',
|
value: 'some note abc',
|
||||||
)
|
)
|
||||||
click(css: '.content.active .modal button.js-submit')
|
click(css: '.content.active .modal button.js-submit')
|
||||||
modal_disappear()
|
modal_disappear
|
||||||
|
|
||||||
watch_for(
|
watch_for(
|
||||||
css: '.content.active .profile-window',
|
css: '.content.active .profile-window',
|
||||||
|
@ -72,13 +72,13 @@ class AgentProfilePermissionsTest < TestCase
|
||||||
click(css: '.content.active .js-action .icon-arrow-down', fast: true)
|
click(css: '.content.active .js-action .icon-arrow-down', fast: true)
|
||||||
click(css: '.content.active .js-action [data-type="edit"]')
|
click(css: '.content.active .js-action [data-type="edit"]')
|
||||||
|
|
||||||
modal_ready()
|
modal_ready
|
||||||
set(
|
set(
|
||||||
css: '.modal [name="lastname"]',
|
css: '.modal [name="lastname"]',
|
||||||
value: 'Braun',
|
value: 'Braun',
|
||||||
)
|
)
|
||||||
click(css: '.content.active .modal button.js-submit')
|
click(css: '.content.active .modal button.js-submit')
|
||||||
modal_disappear()
|
modal_disappear
|
||||||
|
|
||||||
verify_task(
|
verify_task(
|
||||||
data: {
|
data: {
|
||||||
|
@ -94,7 +94,7 @@ class AgentProfilePermissionsTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
user_open_by_search(value: 'Test Master')
|
user_open_by_search(value: 'Test Master')
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@ class AgentProfilePermissionsTest < TestCase
|
||||||
value: 'email',
|
value: 'email',
|
||||||
)
|
)
|
||||||
|
|
||||||
empty_search()
|
empty_search
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
click(css: '.content.active .js-action .icon-arrow-down', fast: true)
|
click(css: '.content.active .js-action .icon-arrow-down', fast: true)
|
||||||
|
@ -127,7 +127,7 @@ class AgentProfilePermissionsTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
ticket1 = ticket_create(
|
ticket1 = ticket_create(
|
||||||
data: {
|
data: {
|
||||||
|
@ -138,16 +138,16 @@ class AgentProfilePermissionsTest < TestCase
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
logout()
|
logout
|
||||||
|
|
||||||
login(
|
login(
|
||||||
username: 'agent1@example.com',
|
username: 'agent1@example.com',
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
ticket_open_by_search(
|
ticket_open_by_search(
|
||||||
number: ticket1[:number],
|
number: ticket1[:number],
|
||||||
|
@ -171,7 +171,7 @@ class AgentProfilePermissionsTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
ticket1 = ticket_create(
|
ticket1 = ticket_create(
|
||||||
data: {
|
data: {
|
||||||
|
@ -189,7 +189,7 @@ class AgentProfilePermissionsTest < TestCase
|
||||||
click(css: '.content.active .sidebar[data-tab="customer"] .js-actions .dropdown-toggle')
|
click(css: '.content.active .sidebar[data-tab="customer"] .js-actions .dropdown-toggle')
|
||||||
click(css: '.content.active .sidebar[data-tab="customer"] .js-actions [data-type="customer-edit"]')
|
click(css: '.content.active .sidebar[data-tab="customer"] .js-actions [data-type="customer-edit"]')
|
||||||
|
|
||||||
modal_ready()
|
modal_ready
|
||||||
set(
|
set(
|
||||||
css: '.modal [name="lastname"]',
|
css: '.modal [name="lastname"]',
|
||||||
value: 'B2',
|
value: 'B2',
|
||||||
|
@ -199,7 +199,7 @@ class AgentProfilePermissionsTest < TestCase
|
||||||
value: 'some note abc',
|
value: 'some note abc',
|
||||||
)
|
)
|
||||||
click(css: '.content.active .modal button.js-submit')
|
click(css: '.content.active .modal button.js-submit')
|
||||||
modal_disappear()
|
modal_disappear
|
||||||
|
|
||||||
watch_for(
|
watch_for(
|
||||||
css: '.content.active .sidebar[data-tab="customer"] .sidebar-block [data-name="note"]',
|
css: '.content.active .sidebar[data-tab="customer"] .sidebar-block [data-name="note"]',
|
||||||
|
@ -215,7 +215,7 @@ class AgentProfilePermissionsTest < TestCase
|
||||||
click(css: '.content.active .sidebar[data-tab="customer"] .js-actions')
|
click(css: '.content.active .sidebar[data-tab="customer"] .js-actions')
|
||||||
click(css: 'li[data-type="customer-edit"]')
|
click(css: 'li[data-type="customer-edit"]')
|
||||||
|
|
||||||
modal_ready()
|
modal_ready
|
||||||
set(
|
set(
|
||||||
css: '.modal [name="lastname"]',
|
css: '.modal [name="lastname"]',
|
||||||
value: 'Braun',
|
value: 'Braun',
|
||||||
|
@ -225,7 +225,7 @@ class AgentProfilePermissionsTest < TestCase
|
||||||
value: 'some note abc',
|
value: 'some note abc',
|
||||||
)
|
)
|
||||||
click(css: '.content.active .modal button.js-submit')
|
click(css: '.content.active .modal button.js-submit')
|
||||||
modal_disappear()
|
modal_disappear
|
||||||
|
|
||||||
watch_for(
|
watch_for(
|
||||||
css: '.content.active .sidebar[data-tab="customer"] .sidebar-block [data-name="note"]',
|
css: '.content.active .sidebar[data-tab="customer"] .sidebar-block [data-name="note"]',
|
||||||
|
@ -246,7 +246,7 @@ class AgentProfilePermissionsTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
ticket1 = ticket_create(
|
ticket1 = ticket_create(
|
||||||
data: {
|
data: {
|
||||||
|
@ -278,7 +278,7 @@ class AgentProfilePermissionsTest < TestCase
|
||||||
click(css: '.content.active .js-action .dropdown-toggle')
|
click(css: '.content.active .js-action .dropdown-toggle')
|
||||||
click(css: '.content.active .js-action [data-type="edit"]')
|
click(css: '.content.active .js-action [data-type="edit"]')
|
||||||
|
|
||||||
modal_ready()
|
modal_ready
|
||||||
set(
|
set(
|
||||||
css: '.modal [name="lastname"]',
|
css: '.modal [name="lastname"]',
|
||||||
value: 'B2',
|
value: 'B2',
|
||||||
|
@ -288,7 +288,7 @@ class AgentProfilePermissionsTest < TestCase
|
||||||
value: 'some note abc',
|
value: 'some note abc',
|
||||||
)
|
)
|
||||||
click(css: '.content.active .modal button.js-submit')
|
click(css: '.content.active .modal button.js-submit')
|
||||||
modal_disappear()
|
modal_disappear
|
||||||
|
|
||||||
watch_for(
|
watch_for(
|
||||||
css: '.content.active .profile-window',
|
css: '.content.active .profile-window',
|
||||||
|
@ -305,7 +305,7 @@ class AgentProfilePermissionsTest < TestCase
|
||||||
click(css: '.content.active .js-action .dropdown-toggle')
|
click(css: '.content.active .js-action .dropdown-toggle')
|
||||||
click(css: '.content.active .js-action [data-type="edit"]')
|
click(css: '.content.active .js-action [data-type="edit"]')
|
||||||
|
|
||||||
modal_ready()
|
modal_ready
|
||||||
set(
|
set(
|
||||||
css: '.modal [name="lastname"]',
|
css: '.modal [name="lastname"]',
|
||||||
value: 'Braun',
|
value: 'Braun',
|
||||||
|
@ -315,7 +315,7 @@ class AgentProfilePermissionsTest < TestCase
|
||||||
value: 'note',
|
value: 'note',
|
||||||
)
|
)
|
||||||
click(css: '.content.active .modal button.js-submit')
|
click(css: '.content.active .modal button.js-submit')
|
||||||
modal_disappear()
|
modal_disappear
|
||||||
|
|
||||||
verify_task(
|
verify_task(
|
||||||
data: {
|
data: {
|
||||||
|
@ -332,7 +332,7 @@ class AgentProfilePermissionsTest < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
ticket1 = ticket_create(
|
ticket1 = ticket_create(
|
||||||
data: {
|
data: {
|
||||||
|
|
|
@ -12,7 +12,7 @@ class UserSwitchCache < TestCase
|
||||||
password: 'test',
|
password: 'test',
|
||||||
url: browser_url,
|
url: browser_url,
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
ticket_create(
|
ticket_create(
|
||||||
data: {
|
data: {
|
||||||
customer: 'nico',
|
customer: 'nico',
|
||||||
|
@ -22,7 +22,7 @@ class UserSwitchCache < TestCase
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
logout()
|
logout
|
||||||
|
|
||||||
# login as customer and verify ticket create screen
|
# login as customer and verify ticket create screen
|
||||||
login(
|
login(
|
||||||
|
@ -51,7 +51,7 @@ class UserSwitchCache < TestCase
|
||||||
value: 'State',
|
value: 'State',
|
||||||
)
|
)
|
||||||
|
|
||||||
logout()
|
logout
|
||||||
|
|
||||||
# login again as customer and verify ticket create screen
|
# login again as customer and verify ticket create screen
|
||||||
login(
|
login(
|
||||||
|
|
|
@ -3095,7 +3095,7 @@ wait untill text in selector disabppears
|
||||||
end
|
end
|
||||||
raise "Can't find organization #{data[:organization]}" if target.blank?
|
raise "Can't find organization #{data[:organization]}" if target.blank?
|
||||||
|
|
||||||
target.click()
|
target.click
|
||||||
rescue Selenium::WebDriver::Error::StaleElementReferenceError
|
rescue Selenium::WebDriver::Error::StaleElementReferenceError
|
||||||
sleep retries
|
sleep retries
|
||||||
retries += 1
|
retries += 1
|
||||||
|
@ -3263,7 +3263,7 @@ wait untill text in selector disabppears
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
target = instance.find_elements(css: ".modal li[title='#{data[:organization]}']")[0]
|
target = instance.find_elements(css: ".modal li[title='#{data[:organization]}']")[0]
|
||||||
end
|
end
|
||||||
target.click()
|
target.click
|
||||||
rescue Selenium::WebDriver::Error::StaleElementReferenceError
|
rescue Selenium::WebDriver::Error::StaleElementReferenceError
|
||||||
sleep retries
|
sleep retries
|
||||||
retries += 1
|
retries += 1
|
||||||
|
@ -4860,7 +4860,7 @@ wait untill text in selector disabppears
|
||||||
tries = 5
|
tries = 5
|
||||||
begin
|
begin
|
||||||
alert = instance.switch_to.alert
|
alert = instance.switch_to.alert
|
||||||
alert.dismiss()
|
alert.dismiss
|
||||||
rescue e
|
rescue e
|
||||||
tries -= 1
|
tries -= 1
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
|
|
|
@ -134,7 +134,7 @@ Oversized Email Message Body #{'#' * 120_000}
|
||||||
msg = imap.fetch(imap_message_id, 'RFC822')[0].attr['RFC822']
|
msg = imap.fetch(imap_message_id, 'RFC822')[0].attr['RFC822']
|
||||||
assert(msg.present?, 'Must have received a reply from the postmaster')
|
assert(msg.present?, 'Must have received a reply from the postmaster')
|
||||||
imap.store(imap_message_id, '+FLAGS', [:Deleted])
|
imap.store(imap_message_id, '+FLAGS', [:Deleted])
|
||||||
imap.expunge()
|
imap.expunge
|
||||||
|
|
||||||
# parse the reply mail and verify the various headers
|
# parse the reply mail and verify the various headers
|
||||||
parser = Channel::EmailParser.new
|
parser = Channel::EmailParser.new
|
||||||
|
@ -209,7 +209,7 @@ Oversized Email Message Body #{'#' * 120_000}
|
||||||
imap_message_id = message_ids.last
|
imap_message_id = message_ids.last
|
||||||
msg = imap.fetch(imap_message_id, 'RFC822')[0].attr['RFC822']
|
msg = imap.fetch(imap_message_id, 'RFC822')[0].attr['RFC822']
|
||||||
imap.store(imap_message_id, '+FLAGS', [:Deleted])
|
imap.store(imap_message_id, '+FLAGS', [:Deleted])
|
||||||
imap.expunge()
|
imap.expunge
|
||||||
assert(msg.present?, 'Oversized Email Message')
|
assert(msg.present?, 'Oversized Email Message')
|
||||||
assert_equal(message_ids.count, 1, 'Original customer mail must be deleted.')
|
assert_equal(message_ids.count, 1, 'Original customer mail must be deleted.')
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ class IntegrationIdoitTest < TestCase
|
||||||
# click the check box from the first row and note its entry ID
|
# click the check box from the first row and note its entry ID
|
||||||
checkbox = @browser.find_elements(css: '.content.active .modal form.js-result tbody :first-child input')[0]
|
checkbox = @browser.find_elements(css: '.content.active .modal form.js-result tbody :first-child input')[0]
|
||||||
entry_id = checkbox.attribute('value')
|
entry_id = checkbox.attribute('value')
|
||||||
checkbox.click()
|
checkbox.click
|
||||||
|
|
||||||
# submit the i-doit object selections
|
# submit the i-doit object selections
|
||||||
click(css: '.content.active .modal form button.js-submit')
|
click(css: '.content.active .modal form button.js-submit')
|
||||||
|
@ -113,7 +113,7 @@ class IntegrationIdoitTest < TestCase
|
||||||
css: ".content.active .sidebar[data-tab='idoit'] a[href='#{api_endpoint}/?objID=#{entry_id}']",
|
css: ".content.active .sidebar[data-tab='idoit'] a[href='#{api_endpoint}/?objID=#{entry_id}']",
|
||||||
)
|
)
|
||||||
|
|
||||||
tasks_close_all()
|
tasks_close_all
|
||||||
|
|
||||||
# new create a new ticket with an i-doit object
|
# new create a new ticket with an i-doit object
|
||||||
ticket_create(
|
ticket_create(
|
||||||
|
@ -142,7 +142,7 @@ class IntegrationIdoitTest < TestCase
|
||||||
# click the check box from the first row and note its entry ID
|
# click the check box from the first row and note its entry ID
|
||||||
checkbox = @browser.find_elements(css: '.content.active .modal form.js-result tbody :first-child input')[0]
|
checkbox = @browser.find_elements(css: '.content.active .modal form.js-result tbody :first-child input')[0]
|
||||||
entry_id = checkbox.attribute('value')
|
entry_id = checkbox.attribute('value')
|
||||||
checkbox.click()
|
checkbox.click
|
||||||
|
|
||||||
# submit the i-doit object selections
|
# submit the i-doit object selections
|
||||||
click(css: '.content.active .modal form button.js-submit')
|
click(css: '.content.active .modal form button.js-submit')
|
||||||
|
@ -173,7 +173,7 @@ class IntegrationIdoitTest < TestCase
|
||||||
|
|
||||||
# reload browser and check if it's still removed
|
# reload browser and check if it's still removed
|
||||||
sleep 3
|
sleep 3
|
||||||
reload()
|
reload
|
||||||
watch_for(
|
watch_for(
|
||||||
css: '.content.active .ticketZoom-header .ticket-number',
|
css: '.content.active .ticketZoom-header .ticket-number',
|
||||||
)
|
)
|
||||||
|
@ -192,7 +192,7 @@ class IntegrationIdoitTest < TestCase
|
||||||
# add item again
|
# add item again
|
||||||
click(css: '.content.active .sidebar[data-tab="idoit"] .js-actions .dropdown-toggle')
|
click(css: '.content.active .sidebar[data-tab="idoit"] .js-actions .dropdown-toggle')
|
||||||
click(css: '.content.active .sidebar[data-tab="idoit"] .js-actions [data-type="objects-change"]')
|
click(css: '.content.active .sidebar[data-tab="idoit"] .js-actions [data-type="objects-change"]')
|
||||||
modal_ready()
|
modal_ready
|
||||||
|
|
||||||
# wait for the API call to populate the dropdown menu
|
# wait for the API call to populate the dropdown menu
|
||||||
watch_for(css: '.content.active .modal form input.js-input')
|
watch_for(css: '.content.active .modal form input.js-input')
|
||||||
|
@ -205,7 +205,7 @@ class IntegrationIdoitTest < TestCase
|
||||||
# click the check box from the first row and note its entry ID
|
# click the check box from the first row and note its entry ID
|
||||||
checkbox = @browser.find_elements(css: '.content.active .modal form.js-result tbody :first-child input')[0]
|
checkbox = @browser.find_elements(css: '.content.active .modal form.js-result tbody :first-child input')[0]
|
||||||
entry_id = checkbox.attribute('value')
|
entry_id = checkbox.attribute('value')
|
||||||
checkbox.click()
|
checkbox.click
|
||||||
|
|
||||||
# submit the i-doit object selections
|
# submit the i-doit object selections
|
||||||
click(css: '.content.active .modal form button.js-submit')
|
click(css: '.content.active .modal form button.js-submit')
|
||||||
|
@ -217,7 +217,7 @@ class IntegrationIdoitTest < TestCase
|
||||||
|
|
||||||
# reload browser and check if it's still removed
|
# reload browser and check if it's still removed
|
||||||
sleep 3
|
sleep 3
|
||||||
reload()
|
reload
|
||||||
watch_for(
|
watch_for(
|
||||||
css: '.content.active .ticketZoom-header .ticket-number',
|
css: '.content.active .ticketZoom-header .ticket-number',
|
||||||
)
|
)
|
||||||
|
|
|
@ -361,7 +361,7 @@ class PackageTest < ActiveSupport::TestCase
|
||||||
file.close
|
file.close
|
||||||
end
|
end
|
||||||
begin
|
begin
|
||||||
Package.auto_install()
|
Package.auto_install
|
||||||
rescue
|
rescue
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue