Follow up - bb26438c1c
- Fixes #3260: Race condition in changed URL check causes instable specs.
This commit is contained in:
parent
0a85b079ca
commit
97526c121c
2 changed files with 7 additions and 9 deletions
|
@ -43,7 +43,3 @@ 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
|
|
||||||
|
|
|
@ -1096,21 +1096,23 @@ RSpec.describe 'Ticket zoom', type: :system do
|
||||||
|
|
||||||
# https://github.com/zammad/zammad/issues/3260
|
# https://github.com/zammad/zammad/issues/3260
|
||||||
describe 'next in overview macro changes URL', authenticated_as: :authenticate do
|
describe 'next in overview macro changes URL', authenticated_as: :authenticate do
|
||||||
let(:ticket_a) { create(:ticket, title: 'ticket a', group: Group.first) }
|
let(:next_ticket) { create(:ticket, title: 'next Ticket', group: Group.first) }
|
||||||
let(:macro) { create(:macro, name: 'next macro', ux_flow_next_up: 'next_from_overview') }
|
let(:macro) { create(:macro, name: 'next macro', ux_flow_next_up: 'next_from_overview') }
|
||||||
|
|
||||||
def authenticate
|
def authenticate
|
||||||
ticket_a && macro
|
next_ticket && macro
|
||||||
|
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'works' do
|
it 'to next Ticket ID' do
|
||||||
visit 'ticket/view/all_unassigned'
|
visit 'ticket/view/all_unassigned'
|
||||||
click_on 'Welcome to Zammad!'
|
click_on 'Welcome to Zammad!'
|
||||||
click '.js-openDropdownMacro'
|
click '.js-openDropdownMacro'
|
||||||
|
find(:macro, macro.id).click
|
||||||
|
wait(5, interval: 1).until_constant { current_url }
|
||||||
|
|
||||||
expect { find(:element_containing, macro.name).click }.to change { current_url }
|
expect(current_url).to include("ticket/zoom/#{next_ticket.id}")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue