@@ -155,7 +155,7 @@ The zamm
- NB
+ NB
Ich wollte mir die Lyrics von Maria herunterladen, aber ich schaff es einfach nicht, da raufzukommen. Schick mir bitte mein Passwort.
diff --git a/app/assets/javascripts/app/views/layout_ref/merge_customer_view.jst.eco b/app/assets/javascripts/app/views/layout_ref/merge_customer_view.jst.eco
index fc20562db..76585001d 100644
--- a/app/assets/javascripts/app/views/layout_ref/merge_customer_view.jst.eco
+++ b/app/assets/javascripts/app/views/layout_ref/merge_customer_view.jst.eco
@@ -36,7 +36,7 @@
- NB
+ NB
@@ -71,7 +71,7 @@
- NB
+ NB
@@ -796,7 +796,7 @@
diff --git a/app/assets/javascripts/app/views/layout_ref/organization_profile.jst.eco b/app/assets/javascripts/app/views/layout_ref/organization_profile.jst.eco
index 64be90851..11de0a5b8 100644
--- a/app/assets/javascripts/app/views/layout_ref/organization_profile.jst.eco
+++ b/app/assets/javascripts/app/views/layout_ref/organization_profile.jst.eco
@@ -52,7 +52,7 @@
diff --git a/app/assets/javascripts/app/views/layout_ref/ticket_zoom.jst.eco b/app/assets/javascripts/app/views/layout_ref/ticket_zoom.jst.eco
index cc7c063e8..fc260ebf1 100644
--- a/app/assets/javascripts/app/views/layout_ref/ticket_zoom.jst.eco
+++ b/app/assets/javascripts/app/views/layout_ref/ticket_zoom.jst.eco
@@ -52,7 +52,7 @@
- NB
+ NB
@@ -862,7 +862,7 @@
Nicole Braun
@@ -60,11 +60,11 @@
Franz Xaver
- NB
+ NB
@@ -76,7 +76,7 @@
Welcome to Zammad! We want to entertain you and your whole family!
- NB
+ NB
@@ -182,7 +182,7 @@
- NB
+ NB
Ich wollte mir die Lyrics von Maria herunterladen, aber ich schaff es einfach nicht, da raufzukommen. Schick mir bitte mein Passwort.
@@ -547,7 +547,7 @@
diff --git a/app/assets/javascripts/app/views/ticket_zoom/attribute_bar.jst.eco b/app/assets/javascripts/app/views/ticket_zoom/attribute_bar.jst.eco
index d78859188..c95c7d837 100644
--- a/app/assets/javascripts/app/views/ticket_zoom/attribute_bar.jst.eco
+++ b/app/assets/javascripts/app/views/ticket_zoom/attribute_bar.jst.eco
@@ -1,3 +1,4 @@
+
<%- @T('Discard your unsaved changes.') %>
diff --git a/app/assets/stylesheets/zammad.scss b/app/assets/stylesheets/zammad.scss
index 1a3807e01..9ebd14508 100644
--- a/app/assets/stylesheets/zammad.scss
+++ b/app/assets/stylesheets/zammad.scss
@@ -3508,6 +3508,20 @@ footer {
fill: hsl(47,100%,59%);
}
+ &-status {
+ position: absolute;
+ right: -4px;
+ bottom: -4px;
+ border-radius: 999px;
+ background: hsl(234,10%,19%);
+ fill: white;
+ width: 21px;
+ height: 21px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+
&.size-50 {
width: 50px;
height: 50px;
@@ -3530,7 +3544,12 @@ footer {
}
}
- &.unique {
+ &--idle {
+ filter: grayscale(100%);
+ opacity: 0.5;
+ }
+
+ &--unique {
background-image: image_url("/assets/images/avatar-bg.png");
background-size: 300px 226px;
color: white;
@@ -5236,6 +5255,10 @@ footer {
margin: 20px 0;
}
+.tags {
+ margin-top: 10px;
+}
+
.userNotifications label + .btn {
margin-top: 1px;
}
@@ -8502,6 +8525,11 @@ body.fit {
margin-right: auto;
}
+.half-spacer {
+ width: 5px;
+ height: 5px;
+}
+
.spacer {
width: 10px;
height: 10px;
diff --git a/app/controllers/taskbar_controller.rb b/app/controllers/taskbar_controller.rb
index bbd6703db..527db4e15 100644
--- a/app/controllers/taskbar_controller.rb
+++ b/app/controllers/taskbar_controller.rb
@@ -4,16 +4,13 @@ class TaskbarController < ApplicationController
before_action :authentication_check
def index
-
current_user_tasks = Taskbar.where(user_id: current_user.id)
model_index_render_result(current_user_tasks)
-
end
def show
taskbar = Taskbar.find(params[:id])
access(taskbar)
-
model_show_render_item(taskbar)
end
@@ -24,7 +21,6 @@ class TaskbarController < ApplicationController
def update
taskbar = Taskbar.find(params[:id])
access(taskbar)
-
taskbar.update_attributes!(Taskbar.param_cleanup(params))
model_update_render_item(taskbar)
end
@@ -32,7 +28,6 @@ class TaskbarController < ApplicationController
def destroy
taskbar = Taskbar.find(params[:id])
access(taskbar)
-
taskbar.destroy
model_destroy_render_item()
end
diff --git a/app/models/taskbar.rb b/app/models/taskbar.rb
index 126ff6f3e..0138a7b29 100644
--- a/app/models/taskbar.rb
+++ b/app/models/taskbar.rb
@@ -3,16 +3,103 @@
class Taskbar < ApplicationModel
store :state
store :params
- before_create :update_last_contact, :set_user
- before_update :update_last_contact, :set_user
+ store :preferences
+ before_create :update_last_contact, :set_user, :update_preferences_infos
+ before_update :update_last_contact, :set_user, :update_preferences_infos
+
+ after_update :notify_clients
+ after_destroy :update_preferences_infos, :notify_clients
+
+ attr_accessor :local_update
+
+ def state_changed?
+ return false if !state
+ return false if state.empty?
+ state.each { |_key, value|
+ if value.class == Hash || value.class == ActiveSupport::HashWithIndifferentAccess
+ value.each { |_key1, value1|
+ next if value1 && value1.empty?
+ return true
+ }
+ else
+ next if value && value.empty?
+ return true
+ end
+ }
+ false
+ end
private
def update_last_contact
+ return true if local_update
self.last_contact = Time.zone.now
end
def set_user
+ return true if local_update
self.user_id = UserInfo.current_user_id
end
+
+ def update_preferences_infos
+ return true if local_update
+
+ # find other same open tasks
+ preferences[:tasks] = []
+ Taskbar.where(key: key).order(:created_at).each { |taskbar|
+ changed = if taskbar.id == id
+ state_changed?
+ else
+ taskbar.state_changed?
+ end
+ task = {
+ id: taskbar.id,
+ user_id: taskbar.user_id,
+ last_contact: taskbar.last_contact,
+ changed: changed,
+ }
+ preferences[:tasks].push task
+ }
+ if !id
+ changed = state_changed?
+ task = {
+ user_id: user_id,
+ last_contact: last_contact,
+ changed: changed,
+ }
+ preferences[:tasks].push task
+ end
+
+ # update other taskbars
+ Taskbar.where(key: key).order(:created_at).each { |taskbar|
+ next if taskbar.id == id
+ taskbar.preferences = preferences
+ taskbar.local_update = true
+ taskbar.save!
+ }
+
+ return true if destroyed?
+
+ # remember preferences for current taskbar
+ self.preferences = preferences
+
+ true
+ end
+
+ def notify_clients
+ return true if !changes['preferences']
+ data = {
+ event: 'taskbar:preferences',
+ data: {
+ id: id,
+ key: key,
+ preferences: preferences,
+ },
+ }
+ PushMessages.send_to(
+ user_id,
+ data,
+ )
+ end
+
end
diff --git a/db/migrate/20120101000001_create_base.rb b/db/migrate/20120101000001_create_base.rb
index 125a59af3..fe980e6f3 100644
--- a/db/migrate/20120101000001_create_base.rb
+++ b/db/migrate/20120101000001_create_base.rb
@@ -243,6 +243,7 @@ class CreateBase < ActiveRecord::Migration
t.string :key, limit: 100, null: false
t.string :callback, limit: 100, null: false
t.text :state, limit: 20.megabytes + 1, null: true
+ t.text :preferences, limit: 5.megabytes + 1, null: true
t.string :params, limit: 2000, null: true
t.integer :prio, null: false
t.boolean :notify, null: false, default: false
@@ -251,6 +252,7 @@ class CreateBase < ActiveRecord::Migration
end
add_index :taskbars, [:user_id]
add_index :taskbars, [:client_id]
+ add_index :taskbars, [:key]
create_table :tags do |t|
t.references :tag_item, null: false
diff --git a/db/migrate/20161228000001_add_taskbar_meta.rb b/db/migrate/20161228000001_add_taskbar_meta.rb
new file mode 100644
index 000000000..d67526c7f
--- /dev/null
+++ b/db/migrate/20161228000001_add_taskbar_meta.rb
@@ -0,0 +1,11 @@
+class AddTaskbarMeta < ActiveRecord::Migration
+ def up
+ # return if it's a new setup
+ return if !Setting.find_by(name: 'system_init_done')
+
+ add_column :taskbars, :preferences, :text, limit: 5.megabytes + 1, null: true
+ add_index :taskbars, [:key]
+
+ Cache.clear
+ end
+end
diff --git a/lib/push_messages.rb b/lib/push_messages.rb
index 96422053d..2edeeda4b 100644
--- a/lib/push_messages.rb
+++ b/lib/push_messages.rb
@@ -19,17 +19,31 @@ module PushMessages
)
return true
end
- Thread.current[:push_messages].push data
+ message = { type: 'broadcast', data: data }
+ Thread.current[:push_messages].push message
+ end
+
+ def self.send_to(user_id, data)
+ if !PushMessages.enabled?
+ Sessions.send_to(user_id, data)
+ return true
+ end
+ message = { type: 'send_to', user_id: user_id, data: data }
+ Thread.current[:push_messages].push message
end
def self.finish
return false if !enabled?
- Thread.current[:push_messages].each { |data|
- Sessions.broadcast(
- data[:message],
- data[:type],
- data[:current_user_id],
- )
+ Thread.current[:push_messages].each { |message|
+ if message[:type] == 'send_to'
+ Sessions.send_to(message[:user_id], message[:data])
+ else
+ Sessions.broadcast(
+ message[:data][:message],
+ message[:data][:type],
+ message[:data][:current_user_id],
+ )
+ end
}
Thread.current[:push_messages] = nil
true
diff --git a/spec/models/taskbar_spec.rb b/spec/models/taskbar_spec.rb
new file mode 100644
index 000000000..0b44f32b5
--- /dev/null
+++ b/spec/models/taskbar_spec.rb
@@ -0,0 +1,269 @@
+require 'rails_helper'
+
+RSpec.describe Taskbar do
+
+ context 'single creation' do
+ Taskbar.destroy_all
+ UserInfo.current_user_id = 1
+
+ taskbar = Taskbar.create(
+ client_id: 123,
+ key: 'Ticket-1234',
+ callback: 'TicketZoom',
+ params: {
+ id: 1234,
+ },
+ state: {},
+ prio: 1,
+ notify: false,
+ )
+
+ it 'existing key' do
+ expect(taskbar.key).to eq('Ticket-1234')
+ end
+
+ it 'params' do
+ expect(taskbar.params[:id]).to eq(1234)
+ end
+
+ it 'state' do
+ expect(taskbar.state.empty?).to eq(true)
+ end
+
+ UserInfo.current_user_id = nil
+ end
+
+ context 'multible creation' do
+
+ it 'create tasks' do
+
+ Taskbar.destroy_all
+ UserInfo.current_user_id = 1
+ taskbar1 = Taskbar.create(
+ client_id: 123,
+ key: 'Ticket-1234',
+ callback: 'TicketZoom',
+ params: {
+ id: 1234,
+ },
+ state: {},
+ prio: 1,
+ notify: false,
+ )
+
+ UserInfo.current_user_id = 2
+ taskbar2 = Taskbar.create(
+ client_id: 123,
+ key: 'Ticket-1234',
+ callback: 'TicketZoom',
+ params: {
+ id: 1234,
+ },
+ state: {},
+ prio: 2,
+ notify: false,
+ )
+
+ taskbar1.reload
+ expect(taskbar1.preferences[:tasks].count).to eq(2)
+ expect(taskbar1.preferences[:tasks][0][:user_id]).to eq(1)
+ expect(taskbar1.preferences[:tasks][0][:changed]).to eq(false)
+ expect(taskbar1.preferences[:tasks][1][:user_id]).to eq(2)
+ expect(taskbar1.preferences[:tasks][1][:changed]).to eq(false)
+
+ taskbar2.reload
+ expect(taskbar2.preferences[:tasks].count).to eq(2)
+ expect(taskbar2.preferences[:tasks][0][:user_id]).to eq(1)
+ expect(taskbar2.preferences[:tasks][0][:changed]).to eq(false)
+ expect(taskbar2.preferences[:tasks][1][:user_id]).to eq(2)
+ expect(taskbar2.preferences[:tasks][1][:changed]).to eq(false)
+
+ taskbar3 = Taskbar.create(
+ client_id: 123,
+ key: 'Ticket-4444',
+ callback: 'TicketZoom',
+ params: {
+ id: 4444,
+ },
+ state: {},
+ prio: 2,
+ notify: false,
+ )
+
+ taskbar1.reload
+ expect(taskbar1.preferences[:tasks].count).to eq(2)
+ expect(taskbar1.preferences[:tasks][0][:user_id]).to eq(1)
+ expect(taskbar1.preferences[:tasks][0][:changed]).to eq(false)
+ expect(taskbar1.preferences[:tasks][1][:user_id]).to eq(2)
+ expect(taskbar1.preferences[:tasks][1][:changed]).to eq(false)
+
+ taskbar2.reload
+ expect(taskbar2.preferences[:tasks].count).to eq(2)
+ expect(taskbar2.preferences[:tasks][0][:user_id]).to eq(1)
+ expect(taskbar2.preferences[:tasks][0][:changed]).to eq(false)
+ expect(taskbar2.preferences[:tasks][1][:user_id]).to eq(2)
+ expect(taskbar2.preferences[:tasks][1][:changed]).to eq(false)
+
+ taskbar3.reload
+ expect(taskbar3.preferences[:tasks].count).to eq(1)
+ expect(taskbar3.preferences[:tasks][0][:user_id]).to eq(2)
+ expect(taskbar3.preferences[:tasks][0][:changed]).to eq(false)
+
+ UserInfo.current_user_id = 3
+ taskbar4 = Taskbar.create(
+ client_id: 123,
+ key: 'Ticket-1234',
+ callback: 'TicketZoom',
+ params: {
+ id: 1234,
+ },
+ state: {},
+ prio: 4,
+ notify: false,
+ )
+
+ taskbar1.reload
+ expect(taskbar1.preferences[:tasks].count).to eq(3)
+ expect(taskbar1.preferences[:tasks][0][:user_id]).to eq(1)
+ expect(taskbar1.preferences[:tasks][0][:changed]).to eq(false)
+ expect(taskbar1.preferences[:tasks][1][:user_id]).to eq(2)
+ expect(taskbar1.preferences[:tasks][1][:changed]).to eq(false)
+ expect(taskbar1.preferences[:tasks][2][:user_id]).to eq(3)
+ expect(taskbar1.preferences[:tasks][2][:changed]).to eq(false)
+
+ taskbar2.reload
+ expect(taskbar2.preferences[:tasks].count).to eq(3)
+ expect(taskbar2.preferences[:tasks][0][:user_id]).to eq(1)
+ expect(taskbar2.preferences[:tasks][0][:changed]).to eq(false)
+ expect(taskbar2.preferences[:tasks][1][:user_id]).to eq(2)
+ expect(taskbar2.preferences[:tasks][1][:changed]).to eq(false)
+ expect(taskbar2.preferences[:tasks][2][:user_id]).to eq(3)
+ expect(taskbar2.preferences[:tasks][2][:changed]).to eq(false)
+
+ taskbar3.reload
+ expect(taskbar3.preferences[:tasks].count).to eq(1)
+ expect(taskbar3.preferences[:tasks][0][:user_id]).to eq(2)
+ expect(taskbar3.preferences[:tasks][0][:changed]).to eq(false)
+
+ taskbar4.reload
+ expect(taskbar4.preferences[:tasks].count).to eq(3)
+ expect(taskbar4.preferences[:tasks][0][:user_id]).to eq(1)
+ expect(taskbar4.preferences[:tasks][0][:changed]).to eq(false)
+ expect(taskbar4.preferences[:tasks][1][:user_id]).to eq(2)
+ expect(taskbar4.preferences[:tasks][1][:changed]).to eq(false)
+ expect(taskbar4.preferences[:tasks][2][:user_id]).to eq(3)
+ expect(taskbar4.preferences[:tasks][2][:changed]).to eq(false)
+
+ UserInfo.current_user_id = 2
+ taskbar2.state = { article: {}, ticket: {} }
+ taskbar2.save!
+
+ taskbar1.reload
+ expect(taskbar1.preferences[:tasks].count).to eq(3)
+ expect(taskbar1.preferences[:tasks][0][:user_id]).to eq(1)
+ expect(taskbar1.preferences[:tasks][0][:changed]).to eq(false)
+ expect(taskbar1.preferences[:tasks][1][:user_id]).to eq(2)
+ expect(taskbar1.preferences[:tasks][1][:changed]).to eq(false)
+ expect(taskbar1.preferences[:tasks][2][:user_id]).to eq(3)
+ expect(taskbar1.preferences[:tasks][2][:changed]).to eq(false)
+
+ taskbar2.reload
+ expect(taskbar2.preferences[:tasks].count).to eq(3)
+ expect(taskbar2.preferences[:tasks][0][:user_id]).to eq(1)
+ expect(taskbar2.preferences[:tasks][0][:changed]).to eq(false)
+ expect(taskbar2.preferences[:tasks][1][:user_id]).to eq(2)
+ expect(taskbar2.preferences[:tasks][1][:changed]).to eq(false)
+ expect(taskbar2.preferences[:tasks][2][:user_id]).to eq(3)
+ expect(taskbar2.preferences[:tasks][2][:changed]).to eq(false)
+
+ taskbar3.reload
+ expect(taskbar3.preferences[:tasks].count).to eq(1)
+ expect(taskbar3.preferences[:tasks][0][:user_id]).to eq(2)
+ expect(taskbar3.preferences[:tasks][0][:changed]).to eq(false)
+
+ taskbar4.reload
+ expect(taskbar4.preferences[:tasks].count).to eq(3)
+ expect(taskbar4.preferences[:tasks][0][:user_id]).to eq(1)
+ expect(taskbar4.preferences[:tasks][0][:changed]).to eq(false)
+ expect(taskbar4.preferences[:tasks][1][:user_id]).to eq(2)
+ expect(taskbar4.preferences[:tasks][1][:changed]).to eq(false)
+ expect(taskbar4.preferences[:tasks][2][:user_id]).to eq(3)
+ expect(taskbar4.preferences[:tasks][2][:changed]).to eq(false)
+
+ UserInfo.current_user_id = 2
+ taskbar2.state = { article: { body: 'some body' }, ticket: {} }
+ taskbar2.save!
+
+ taskbar1.reload
+ expect(taskbar1.preferences[:tasks].count).to eq(3)
+ expect(taskbar1.preferences[:tasks][0][:user_id]).to eq(1)
+ expect(taskbar1.preferences[:tasks][0][:changed]).to eq(false)
+ expect(taskbar1.preferences[:tasks][1][:user_id]).to eq(2)
+ expect(taskbar1.preferences[:tasks][1][:changed]).to eq(true)
+ expect(taskbar1.preferences[:tasks][2][:user_id]).to eq(3)
+ expect(taskbar1.preferences[:tasks][2][:changed]).to eq(false)
+
+ taskbar2.reload
+ expect(taskbar2.preferences[:tasks].count).to eq(3)
+ expect(taskbar2.preferences[:tasks][0][:user_id]).to eq(1)
+ expect(taskbar2.preferences[:tasks][0][:changed]).to eq(false)
+ expect(taskbar2.preferences[:tasks][1][:user_id]).to eq(2)
+ expect(taskbar2.preferences[:tasks][1][:changed]).to eq(true)
+ expect(taskbar2.preferences[:tasks][2][:user_id]).to eq(3)
+ expect(taskbar2.preferences[:tasks][2][:changed]).to eq(false)
+
+ taskbar3.reload
+ expect(taskbar3.preferences[:tasks].count).to eq(1)
+ expect(taskbar3.preferences[:tasks][0][:user_id]).to eq(2)
+ expect(taskbar3.preferences[:tasks][0][:changed]).to eq(false)
+
+ taskbar4.reload
+ expect(taskbar4.preferences[:tasks].count).to eq(3)
+ expect(taskbar4.preferences[:tasks][0][:user_id]).to eq(1)
+ expect(taskbar4.preferences[:tasks][0][:changed]).to eq(false)
+ expect(taskbar4.preferences[:tasks][1][:user_id]).to eq(2)
+ expect(taskbar4.preferences[:tasks][1][:changed]).to eq(true)
+ expect(taskbar4.preferences[:tasks][2][:user_id]).to eq(3)
+ expect(taskbar4.preferences[:tasks][2][:changed]).to eq(false)
+
+ UserInfo.current_user_id = 1
+ taskbar1.state = { article: { body: '' }, ticket: { state_id: 123 } }
+ taskbar1.save!
+
+ taskbar1.reload
+ expect(taskbar1.preferences[:tasks].count).to eq(3)
+ expect(taskbar1.preferences[:tasks][0][:user_id]).to eq(1)
+ expect(taskbar1.preferences[:tasks][0][:changed]).to eq(true)
+ expect(taskbar1.preferences[:tasks][1][:user_id]).to eq(2)
+ expect(taskbar1.preferences[:tasks][1][:changed]).to eq(true)
+ expect(taskbar1.preferences[:tasks][2][:user_id]).to eq(3)
+ expect(taskbar1.preferences[:tasks][2][:changed]).to eq(false)
+
+ taskbar2.reload
+ expect(taskbar2.preferences[:tasks].count).to eq(3)
+ expect(taskbar2.preferences[:tasks][0][:user_id]).to eq(1)
+ expect(taskbar2.preferences[:tasks][0][:changed]).to eq(true)
+ expect(taskbar2.preferences[:tasks][1][:user_id]).to eq(2)
+ expect(taskbar2.preferences[:tasks][1][:changed]).to eq(true)
+ expect(taskbar2.preferences[:tasks][2][:user_id]).to eq(3)
+ expect(taskbar2.preferences[:tasks][2][:changed]).to eq(false)
+
+ taskbar3.reload
+ expect(taskbar3.preferences[:tasks].count).to eq(1)
+ expect(taskbar3.preferences[:tasks][0][:user_id]).to eq(2)
+ expect(taskbar3.preferences[:tasks][0][:changed]).to eq(false)
+
+ taskbar4.reload
+ expect(taskbar4.preferences[:tasks].count).to eq(3)
+ expect(taskbar4.preferences[:tasks][0][:user_id]).to eq(1)
+ expect(taskbar4.preferences[:tasks][0][:changed]).to eq(true)
+ expect(taskbar4.preferences[:tasks][1][:user_id]).to eq(2)
+ expect(taskbar4.preferences[:tasks][1][:changed]).to eq(true)
+ expect(taskbar4.preferences[:tasks][2][:user_id]).to eq(3)
+ expect(taskbar4.preferences[:tasks][2][:changed]).to eq(false)
+
+ UserInfo.current_user_id = nil
+ end
+ end
+
+end
diff --git a/test/browser/agent_ticket_update2_test.rb b/test/browser/agent_ticket_update2_test.rb
index 44b1dd075..6b70eac23 100644
--- a/test/browser/agent_ticket_update2_test.rb
+++ b/test/browser/agent_ticket_update2_test.rb
@@ -43,6 +43,17 @@ class AgentTicketUpdate2Test < TestCase
value: 'some level 3 body 123äöü',
)
+ watch_for(
+ browser: browser1,
+ css: '.content.active .js-attributeBar .js-avatar .avatar--not-changed',
+ value: 'AT', # agent1
+ )
+ watch_for(
+ browser: browser2,
+ css: '.content.active .js-attributeBar .js-avatar .avatar--not-changed',
+ value: 'TA', # master
+ )
+
# change edit screen in instance 1
ticket_update(
browser: browser1,
@@ -58,6 +69,17 @@ class AgentTicketUpdate2Test < TestCase
no_quote: true,
)
+ watch_for(
+ browser: browser1,
+ css: '.content.active .js-attributeBar .js-avatar .avatar--not-changed',
+ value: 'AT', # agent1
+ )
+ watch_for(
+ browser: browser2,
+ css: '.content.active .js-attributeBar .js-avatar .avatar--changed',
+ value: 'TA', # master
+ )
+
# update ticket in instance 2
ticket_update(
browser: browser2,
@@ -72,6 +94,16 @@ class AgentTicketUpdate2Test < TestCase
value: '(Discard your unsaved changes.|Verwerfen der)',
no_quote: true,
)
+ watch_for(
+ browser: browser1,
+ css: '.content.active .js-attributeBar .js-avatar .avatar--changed',
+ value: 'AT', # agent1
+ )
+ watch_for(
+ browser: browser2,
+ css: '.content.active .js-attributeBar .js-avatar .avatar--changed',
+ value: 'TA', # master
+ )
click(
browser: browser2,
@@ -92,6 +124,17 @@ class AgentTicketUpdate2Test < TestCase
},
)
+ watch_for(
+ browser: browser1,
+ css: '.content.active .js-attributeBar .js-avatar .avatar--not-changed',
+ value: 'AT', # agent1
+ )
+ watch_for(
+ browser: browser2,
+ css: '.content.active .js-attributeBar .js-avatar .avatar--changed',
+ value: 'TA', # master
+ )
+
# check content and edit screen in instance 1
watch_for(
browser: browser2,
@@ -126,6 +169,17 @@ class AgentTicketUpdate2Test < TestCase
no_quote: true,
)
+ watch_for(
+ browser: browser1,
+ css: '.content.active .js-attributeBar .js-avatar .avatar--not-changed',
+ value: 'AT', # agent1
+ )
+ watch_for(
+ browser: browser2,
+ css: '.content.active .js-attributeBar .js-avatar .avatar--not-changed',
+ value: 'TA', # master
+ )
+
# check content in instance 2
watch_for(
browser: browser2,
@@ -160,6 +214,17 @@ class AgentTicketUpdate2Test < TestCase
no_quote: true,
)
+ watch_for(
+ browser: browser1,
+ css: '.content.active .js-attributeBar .js-avatar .avatar--not-changed',
+ value: 'AT', # agent1
+ )
+ watch_for(
+ browser: browser2,
+ css: '.content.active .js-attributeBar .js-avatar .avatar--not-changed',
+ value: 'TA', # master
+ )
+
# reload instances, verify again
reload(
browser: browser1,
@@ -195,6 +260,17 @@ class AgentTicketUpdate2Test < TestCase
no_quote: true,
)
+ watch_for(
+ browser: browser1,
+ css: '.content.active .js-attributeBar .js-avatar .avatar--not-changed',
+ value: 'AT', # agent1
+ )
+ watch_for(
+ browser: browser2,
+ css: '.content.active .js-attributeBar .js-avatar .avatar--not-changed',
+ value: 'TA', # master
+ )
+
# change form of ticket, reset, reload and verify in instance 2
ticket_update(
browser: browser2,
@@ -244,6 +320,17 @@ class AgentTicketUpdate2Test < TestCase
)
sleep 2
+ watch_for(
+ browser: browser1,
+ css: '.content.active .js-attributeBar .js-avatar .avatar--changed',
+ value: 'AT', # agent1
+ )
+ watch_for(
+ browser: browser2,
+ css: '.content.active .js-attributeBar .js-avatar .avatar--not-changed',
+ value: 'TA', # master
+ )
+
reload(
browser: browser2,
)
@@ -260,6 +347,17 @@ class AgentTicketUpdate2Test < TestCase
no_quote: true,
)
+ watch_for(
+ browser: browser1,
+ css: '.content.active .js-attributeBar .js-avatar .avatar--changed',
+ value: 'AT', # agent1
+ )
+ watch_for(
+ browser: browser2,
+ css: '.content.active .js-attributeBar .js-avatar .avatar--not-changed',
+ value: 'TA', # master
+ )
+
task_type(
browser: browser2,
type: 'stayOnTab',
@@ -278,6 +376,17 @@ class AgentTicketUpdate2Test < TestCase
no_quote: true,
)
+ watch_for(
+ browser: browser1,
+ css: '.content.active .js-attributeBar .js-avatar .avatar--not-changed',
+ value: 'AT', # agent1
+ )
+ watch_for(
+ browser: browser2,
+ css: '.content.active .js-attributeBar .js-avatar .avatar--not-changed',
+ value: 'TA', # master
+ )
+
# check if new article is empty
ticket_verify(
browser: browser2,