Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #37774 - wait for the host page to render before editing again #10302

Merged
merged 1 commit into from
Aug 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions test/integration/host_js_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@
visit new_host_path
select2(hostgroup.name, :from => 'host_hostgroup_id')
wait_for_ajax
click_link('Virtual Machine')

Check failure on line 310 in test/integration/host_js_test.rb

View workflow job for this annotation

GitHub Actions / webpack:compile test:integration - Ruby 2.7 and Node 14 on PostgreSQL 13

Failure: test_0004_edit page Capybara::Ambiguous: Ambiguous match, found 2 elements matching visible button "Edit" that is not disabled test/integration/host_js_test.rb:99:in `block (2 levels) in <class:HostJSTest>'

Check failure on line 310 in test/integration/host_js_test.rb

View workflow job for this annotation

GitHub Actions / webpack:compile test:integration - Ruby 2.7 and Node 18 on PostgreSQL 13

Failure: test_0004_edit page Capybara::Ambiguous: Ambiguous match, found 2 elements matching visible button "Edit" that is not disabled test/integration/host_js_test.rb:99:in `block (2 levels) in <class:HostJSTest>'

Check failure on line 310 in test/integration/host_js_test.rb

View workflow job for this annotation

GitHub Actions / webpack:compile test:integration - Ruby 3.0 and Node 14 on PostgreSQL 13

Failure: test_0004_edit page Capybara::Ambiguous: Ambiguous match, found 2 elements matching visible button "Edit" that is not disabled test/integration/host_js_test.rb:99:in `block (2 levels) in <class:HostJSTest>'

Check failure on line 310 in test/integration/host_js_test.rb

View workflow job for this annotation

GitHub Actions / webpack:compile test:integration - Ruby 3.0 and Node 18 on PostgreSQL 13

Failure: test_0004_edit page Capybara::Ambiguous: Ambiguous match, found 2 elements matching visible button "Edit" that is not disabled test/integration/host_js_test.rb:99:in `block (2 levels) in <class:HostJSTest>'
cpus_field = page.find_field('host[compute_attributes][cpus]')
assert_equal '1', cpus_field.value

Expand Down Expand Up @@ -529,6 +529,7 @@
page.find(id).click
assert page.has_no_selector?(id)
click_button('Submit')
find('h5', :text => host.fqdn) # wait for the host page to load
Comment on lines 531 to +532
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a dedicated click_on_submit helper (introduced in 1580adb), but all of its uses were removed in 98c1752 and I am not sure why.

Following the same logic as in 98c1752 and using a find to find the header with the hostname.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps assert page.has_link?('Edit') no longer worked?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idk. Maybe. I just want #10125 to pass :D


visit edit_host_path(host)
switch_form_tab('Parameters')
Expand Down
Loading