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

Tag indexing integration tests all the way through Argo UI #4345

Merged
merged 2 commits into from
Mar 15, 2024

Conversation

ndushay
Copy link
Contributor

@ndushay ndushay commented Mar 14, 2024

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

@ndushay ndushay mentioned this pull request Mar 14, 2024
11 tasks
@ndushay ndushay force-pushed the tag-indexing-integration-tests branch from cd95c97 to 953ad9c Compare March 14, 2024 22:41
end

after do
solr_conn.delete_by_id(solr_id)
solr_conn.commit
end

describe 'identifier searching' do
Copy link
Contributor Author

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

Comment on lines -58 to -59
it 'matches without prefix before the first colon' do
fill_in 'q', with: source_id.split(':').last
Copy link
Contributor Author

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.

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
Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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?'
Copy link
Contributor Author

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.

@ndushay ndushay changed the title Tag indexing integration tests Tag indexing integration tests all the way through Argo UI Mar 14, 2024
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
Copy link
Contributor

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.

@ndushay ndushay force-pushed the tag-indexing-integration-tests branch from 953ad9c to dc2842b Compare March 15, 2024 22:20
@ndushay ndushay merged commit b2c800a into main Mar 15, 2024
7 checks passed
@ndushay ndushay deleted the tag-indexing-integration-tests branch March 15, 2024 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants