-
Notifications
You must be signed in to change notification settings - Fork 5
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
Tag indexing integration tests all the way through Argo UI #4345
Conversation
cd95c97
to
953ad9c
Compare
end | ||
|
||
after do | ||
solr_conn.delete_by_id(solr_id) | ||
solr_conn.commit | ||
end | ||
|
||
describe 'identifier searching' do |
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.
removing outer block, which is not giving us any value
it 'matches without prefix before the first colon' do | ||
fill_in 'q', with: source_id.split(':').last |
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.
I moved some stuff around and tried to have fewer test setups; I didn't ditch any functionality in the tsts.
spec/features/indexing_tags_spec.rb
Outdated
let(:blacklight_config) { CatalogController.blacklight_config } | ||
let(:solr_conn) { blacklight_config.repository_class.new(blacklight_config).connection } | ||
|
||
# I tried to do this as a before(:context) but after much teeth gnashing, I gave up |
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.
Leaving behind a working test of some utility seems better than spending more hours debugging some rspec weirdness interacting with javascript or scoping or whatever the problem is.
This way, we have one costly setup and a whole bunch of functionality of our tag fields indexing to UI checked.
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.
I'm confused. My reading of this comment is that you couldn't get the before
to work, but there is a before
here.
I'd just get rid of the comments about your coding travails here and below.
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.
before(:context) is like before(:all), while a plain before is a before(:each)
# ensure facet has been expanded by javascript | ||
expect(page).to have_css('#facet-exploded_nonproject_tag_ssim') | ||
click_link_or_button 'willet' | ||
skip 'FIXME: is this failing on spaces in nonproject tag values?' |
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.
This was a second big mystery I fussed over for a long time and finally decided to leave this for someone more clever and/or determined than me.
spec/features/indexing_tags_spec.rb
Outdated
let(:blacklight_config) { CatalogController.blacklight_config } | ||
let(:solr_conn) { blacklight_config.repository_class.new(blacklight_config).connection } | ||
|
||
# I tried to do this as a before(:context) but after much teeth gnashing, I gave up |
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.
I'm confused. My reading of this comment is that you couldn't get the before
to work, but there is a before
here.
I'd just get rid of the comments about your coding travails here and below.
953ad9c
to
dc2842b
Compare
Why was this change made?
Part of #4331
As discussed in Infra Dev Planning meeting on Tues 3/5/24, this PR introduces some integration tests that allow us to put arbitrary cocina objects into dor-services-app via factory_bot (see spec/factories/items.rb), index them using the Argo indexer (which calls the dor-indexing-app), and then use the Argo UI to search for the objects, ensure the search results are as expected, ditto the facets, blah blah.
How was this change tested?
CI