Fixes #3260 - "Next in overview" doesn't update the URL
This commit is contained in:
parent
68fb6bc541
commit
bb26438c1c
3 changed files with 27 additions and 0 deletions
|
@ -32,6 +32,8 @@ App.TicketNavigable =
|
||||||
if nextTicket
|
if nextTicket
|
||||||
@taskCloseTicket()
|
@taskCloseTicket()
|
||||||
@taskLoadTicket(nextTicket.id)
|
@taskLoadTicket(nextTicket.id)
|
||||||
|
|
||||||
|
@navigate "#ticket/zoom/#{nextTicket.id}"
|
||||||
return
|
return
|
||||||
|
|
||||||
@taskCloseTicket(true)
|
@taskCloseTicket(true)
|
||||||
|
|
|
@ -43,3 +43,7 @@ end
|
||||||
Capybara.add_selector(:link_containing) do
|
Capybara.add_selector(:link_containing) do
|
||||||
xpath { |text| ".//a//*[text()[contains(.,\"#{text}\")]]" }
|
xpath { |text| ".//a//*[text()[contains(.,\"#{text}\")]]" }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Capybara.add_selector(:element_containing) do
|
||||||
|
xpath { |text| ".//*[text()[contains(.,\"#{text}\")]]" }
|
||||||
|
end
|
||||||
|
|
|
@ -1093,4 +1093,25 @@ RSpec.describe 'Ticket zoom', type: :system do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# https://github.com/zammad/zammad/issues/3260
|
||||||
|
describe 'next in overview macro changes URL', authenticated_as: :authenticate do
|
||||||
|
let(:ticket_a) { create(:ticket, title: 'ticket a', group: Group.first) }
|
||||||
|
let(:macro) { create(:macro, name: 'next macro', ux_flow_next_up: 'next_from_overview') }
|
||||||
|
|
||||||
|
def authenticate
|
||||||
|
ticket_a && macro
|
||||||
|
|
||||||
|
true
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'works' do
|
||||||
|
visit 'ticket/view/all_unassigned'
|
||||||
|
click_on 'Welcome to Zammad!'
|
||||||
|
click '.js-openDropdownMacro'
|
||||||
|
|
||||||
|
expect { find(:element_containing, macro.name).click }.to change { current_url }
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue