Skip to content

Commit

Permalink
Refs #37382 - pr fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MariaAga committed Jan 16, 2025
1 parent e2a89e5 commit 6654e5b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/views/nic/_base_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
{ :label => _("IPv4 Subnet"),
:label_help => _("IPv4 Subnet with associated TFTP smart proxy is required for PXE based provisioning."),
:label_help_options => { :rel => 'popover-modal' },
:class => 'interface_subnet' } %>
:class => 'interface_subnet include_blank' } %>
<%= nic_subnet_field f, :subnet6_id, :"Subnet::Ipv6",
{ :label => _("IPv6 Subnet"),
:class => 'interface_subnet6' } %>
:class => 'interface_subnet6 include_blank' } %>
<%= text_f f, :ip,
:class => :interface_ip,
:label => _("IPv4 Address"),
Expand Down
10 changes: 5 additions & 5 deletions test/integration_test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,21 +158,21 @@ def select2_result_selector(name)
end

def select2_chosen_selector(name)
page.find(select2_selector(name), visible: false, wait: 10).ancestor('.select2-container')
find(select2_selector(name), visible: false, wait: 10).ancestor('.select2-container')
end

def select2(value, attrs)
find(select2_selector(attrs[:from]), visible: false).ancestor('.select2-container').click
wait_for { find('.select2-search__field').visible? rescue false }
wait_for { find(".select2-search__field").set(value) }
# set(value) errors on not interactable error even though the element is visible and not disabled
page.execute_script("arguments[0].value = arguments[1];", find('.select2-search__field').native, value)
wait_for { find('.select2-results').visible? rescue false }
within ".select2-results__options" do
wait_for { find(".select2-results__options li", text: value).visible? rescue false }
find("li", text: value).click
end
wait_for do
select2_chosen_selector(attrs[:from]).has_text? value
end
sleep 0.15
select2_chosen_selector(attrs[:from]).has_text? value
end

def wait_for
Expand Down

0 comments on commit 6654e5b

Please sign in to comment.