Maintenance: Stabilize System > Objects test (another try).
This commit is contained in:
parent
6a10308f29
commit
9689d3d97e
1 changed files with 5 additions and 0 deletions
|
@ -217,6 +217,11 @@ RSpec.describe 'System > Objects', type: :system do
|
||||||
# Make sure option is still available in already saved ticket, even though the option was removed from the object attribute.
|
# Make sure option is still available in already saved ticket, even though the option was removed from the object attribute.
|
||||||
# This is done via the :historical_options.
|
# This is done via the :historical_options.
|
||||||
visit "/#ticket/zoom/#{ticket.id}"
|
visit "/#ticket/zoom/#{ticket.id}"
|
||||||
|
|
||||||
|
# Ticket data is loaded from a front end cache first, so wait until there is a consistent state.
|
||||||
|
expect(page).to have_css("select[name=#{object_attribute.name}] option[value='delete']")
|
||||||
|
expect(page).to have_no_css("select[name=#{object_attribute.name}] option[value='dog']")
|
||||||
|
|
||||||
sorted_ticket_values = all("select[name=#{object_attribute.name}] option").map(&:value).reject { |x| x == '' }
|
sorted_ticket_values = all("select[name=#{object_attribute.name}] option").map(&:value).reject { |x| x == '' }
|
||||||
expect(sorted_ticket_values).to eq(options_no_dog.keys)
|
expect(sorted_ticket_values).to eq(options_no_dog.keys)
|
||||||
expect(find("select[name=#{object_attribute.name}] option:checked").value).to eq('delete')
|
expect(find("select[name=#{object_attribute.name}] option:checked").value).to eq('delete')
|
||||||
|
|
Loading…
Reference in a new issue