-
Notifications
You must be signed in to change notification settings - Fork 14
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
Fix spec tests for table actions #5012
Conversation
@@ -52,25 +52,25 @@ | |||
find('input[type="checkbox"][aria-label="select all"]', visible: :all).trigger(:click) | |||
|
|||
expect do | |||
click_button 'Enroll (3) + Assign (3)' | |||
find('button', text: 'Enroll (3) + Assign (3)').trigger(:click) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gigxz yes, I thought I saw a failure with this locally, but let me poke it a little more...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. Something I will do if I want to be certain about new system test is to run it repeatedly on CI by adding to the below line:
hmis-warehouse/bin/run_hmis_system_tests.sh
Line 110 in 9b26502
RUN_SYSTEM_TESTS=true RAILS_ENV=test CAPYBARA_APP_HOST="http://$HOSTNAME:5173" rspec drivers/hmis/spec/system/hmis/* |
RUN_SYSTEM_TESTS=true RAILS_ENV=test CAPYBARA_APP_HOST="http://$HOSTNAME:5173" rspec drivers/hmis/spec/system/hmis/my_test.rb
RUN_SYSTEM_TESTS=true RAILS_ENV=test CAPYBARA_APP_HOST="http://$HOSTNAME:5173" rspec drivers/hmis/spec/system/hmis/my_test.rb
RUN_SYSTEM_TESTS=true RAILS_ENV=test CAPYBARA_APP_HOST="http://$HOSTNAME:5173" rspec drivers/hmis/spec/system/hmis/my_test.rb
RUN_SYSTEM_TESTS=true RAILS_ENV=test CAPYBARA_APP_HOST="http://$HOSTNAME:5173" rspec drivers/hmis/spec/system/hmis/my_test.rb
etc...
temporarily of course :)
@@ -74,7 +74,7 @@ def complete_individual_assessment | |||
expect(e2.intake_assessment).to be_nil | |||
|
|||
fill_in 'Search Clients', with: c1.last_name | |||
click_link c1.brief_name | |||
find('a', text: 'View Enrollment', match: :first).trigger(:click) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We lose some fidelity here -- previously we knew we were clicking on the row for c1
(or at least, a client with their name), and now we're just clicking on the first row. Can we use the aria-label here, so we know who we're clicking on?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like we have enable_aria_label
enabled so you may be able to just look for the text
of the aria label directly to find the button, like click_button "View Enrollment, {c1.brief_name}"
(untested)
Merging this PR
Description
GH issues: https://github.com/open-path/Green-River/issues/6761, https://github.com/open-path/Green-River/issues/6825
Replaces #4983
Several tables are adopting the new table actions convention, so this PR updates the spec tests so they can find the new actions.
Type of change
Spec test update
Checklist before requesting review