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

Fix specs #17

Merged
merged 20 commits into from
May 23, 2024
Merged

Fix specs #17

merged 20 commits into from
May 23, 2024

Conversation

kirkkwang
Copy link
Contributor

@kirkkwang kirkkwang commented May 21, 2024

Ran specs locally and these are the failures:

  • bundle exec rspec ./spec/indexers/cdl_resource_indexer_spec.rb:12 # CdlResourceIndexer behaves like a Hyrax::Resource indexer #to_solr indexes base resource fields
  • bundle exec rspec ./spec/models/concerns/account_settings_spec.rb:39 # AccountSettings#public_settings when is_superadmin is false returns all settings except private, disabled, and superadmin settings
  • bundle exec rspec ./spec/jobs/create_group_and_add_members_job_spec.rb:64 # CreateGroupAndAddMembersJob#perform when does not have all its child works retries the job
  • bundle exec rspec ./spec/jobs/create_group_and_add_members_job_spec.rb:70 # CreateGroupAndAddMembersJob#perform when does not have all its child works does not retry the job more than 5 times
  • bundle exec rspec ./spec/jobs/create_group_and_add_members_job_spec.rb:43 # CreateGroupAndAddMembersJob#perform when has all its child works assigns the group to the read_groups of each work's member
  • bundle exec rspec ./spec/jobs/create_group_and_add_members_job_spec.rb:50 # CreateGroupAndAddMembersJob#perform when has all its child works assigns the group to the read_groups of each work's member's member
  • bundle exec rspec ./spec/jobs/create_group_and_add_members_job_spec.rb:37 # CreateGroupAndAddMembersJob#perform when has all its child works assigns the group to the work read_groups
  • bundle exec rspec ./spec/jobs/create_group_and_add_members_job_spec.rb:33 # CreateGroupAndAddMembersJob#perform when has all its child works creates a group
  • bundle exec rspec ./spec/features/create_etd_spec.rb:37 # Create a Etd a logged in user with the :work_depositor role can create an Etd
  • bundle exec rspec ./spec/features/roles_spec.rb:20 # Site Roles as an administrator updates user roles
  • bundle exec rspec ./spec/features/roles_spec.rb:13 # Site Roles as an administrator lists user roles
  • bundle exec rspec ./spec/views/themes/institutional_repository/_user_util_links.html.erb_spec.rb:35 # /themes/institutional_repository/_user_util_links.html.erb when feature flipper is on logged in admin user shows the links
  • bundle exec rspec ./spec/views/themes/institutional_repository/_user_util_links.html.erb_spec.rb:20 # /themes/institutional_repository/_user_util_links.html.erb when feature flipper is on logged in user shows the links
  • bundle exec rspec ./spec/views/themes/institutional_repository/_user_util_links.html.erb_spec.rb:50 # /themes/institutional_repository/_user_util_links.html.erb when feature flipper is on logged out user links to login path
  • bundle exec rspec ./spec/views/themes/institutional_repository/_user_util_links.html.erb_spec.rb:82 # /themes/institutional_repository/_user_util_links.html.erb When feature flipper is off logged in admin user shows the links
  • bundle exec rspec ./spec/views/themes/institutional_repository/_user_util_links.html.erb_spec.rb:97 # /themes/institutional_repository/_user_util_links.html.erb When feature flipper is off logged out user hides the login path
  • bundle exec rspec ./spec/views/themes/institutional_repository/_user_util_links.html.erb_spec.rb:67 # /themes/institutional_repository/_user_util_links.html.erb When feature flipper is off logged in user hides the links
  • bundle exec rspec ./spec/actors/hyrax/actors/oer_actor_spec.rb:32 # Hyrax::Actors::OerActor#create adds a related version
  • bundle exec rspec ./spec/actors/hyrax/actors/oer_actor_spec.rb:54 # Hyrax::Actors::OerActor#update updates the related item
  • bundle exec rspec ./spec/actors/hyrax/actors/oer_actor_spec.rb:49 # Hyrax::Actors::OerActor#update updates the alternate version
  • bundle exec rspec ./spec/actors/hyrax/actors/oer_actor_spec.rb:39 # Hyrax::Actors::OerActor#update updates the previous version items
  • bundle exec rspec ./spec/actors/hyrax/actors/oer_actor_spec.rb:44 # Hyrax::Actors::OerActor#update updates the newer version items
  • bundle exec rspec ./spec/actors/hyrax/actors/oer_actor_spec.rb:80 # Hyrax::Actors::OerActor#update adds and removes relationships on same submit
  • bundle exec rspec ./spec/actors/hyrax/actors/oer_actor_spec.rb:61 # Hyrax::Actors::OerActor#update removes the related version items

spec/features/advanced_search_spec.rb

  • I believe the following two specs are failing because of some faceting related issue. It's not obvious to me so I'm moving on, however, this spec passes in palni-palci. For some reason, knapsack isn't rendering the _constraints_element partial
  • related PR

Pals vs Knapsack:
image

image (64)
image (65)

  • bundle exec rspec ./spec/features/advanced_search_spec.rb:17 # Advanced Search with unauthenticated user can perform advanced search

  • bundle exec rspec ./spec/features/advanced_search_spec.rb:9 # Advanced Search with unauthenticated user can perform search

  • bundle exec rspec ./spec/jobs/destroy_split_pages_job_spec.rb:15 # DestroySplitPagesJob#perform destroys the child works when the work is destroyed

csv_parser_decorator_spec

  • this logic needs to be updated. valid_import? returns false instead of true

    • bundle exec rspec ./spec/parsers/bulkrax/csv_parser_decorator_spec.rb:214 # Bulkrax::CsvParserDecorator#valid_import? when the csv header is the parser_mappings value still returns true
    • bundle exec rspec ./spec/parsers/bulkrax/csv_parser_decorator_spec.rb:203 # Bulkrax::CsvParserDecorator#valid_import? when the csv headers do not have underscores still returns true
  • bundle exec rspec ./spec/omni_auth/strategies/open_id_connect_decorator_spec.rb:84 # OmniAuth::Strategies::OpenIDConnect#options method source_location is expected to contain exactly "/app/samvera/hyrax-webapp/lib/omni_auth/strategies/open_id_connect_decorator.rb" and Integer

  • bundle exec rspec ./spec/features/create_oer_spec.rb:41 # Create a Oer a logged in user with the :work_depositor role

accessibility_features_service_spec.rb

  • We need to pull over schema_org.yml to the knapsack config, and make sure to reset the constant FILENAME. I'm having issues overriding the constant - it still wants to use the schema_org.yml defined in hyrax, which does not have the key we're looking for - so it defaults to CreativeWorks and fails the spec.

    • bundle exec rspec ./spec/services/hyrax/accessibility_hazards_service_spec.rb:25 # Hyrax::AccessibilityHazardsService.microdata_type when id is in the i18n gives schema.org type
  • bundle exec rspec ./spec/views/themes/cultural_repository/_user_util_links.html.erb_spec.rb:53 # /themes/cultural_repository/_user_util_links.html.erb when feature flipper is on logged out user links to login path

  • bundle exec rspec ./spec/views/themes/cultural_repository/_user_util_links.html.erb_spec.rb:38 # /themes/cultural_repository/_user_util_links.html.erb when feature flipper is on logged in admin user shows the links

  • bundle exec rspec ./spec/views/themes/cultural_repository/_user_util_links.html.erb_spec.rb:23 # /themes/cultural_repository/_user_util_links.html.erb when feature flipper is on logged in user shows the links

  • bundle exec rspec ./spec/views/themes/cultural_repository/_user_util_links.html.erb_spec.rb:73 # /themes/cultural_repository/_user_util_links.html.erb When feature flipper is off logged in user hides the links

  • bundle exec rspec ./spec/views/themes/cultural_repository/_user_util_links.html.erb_spec.rb:88 # /themes/cultural_repository/_user_util_links.html.erb When feature flipper is off logged in admin user shows the links

  • bundle exec rspec ./spec/views/themes/cultural_repository/_user_util_links.html.erb_spec.rb:103 # /themes/cultural_repository/_user_util_links.html.erb When feature flipper is off logged out user hides the login path

  • bundle exec rspec ./spec/indexers/oer_resource_indexer_spec.rb:12 # OerResourceIndexer behaves like a Hyrax::Resource indexer #to_solr indexes base resource fields

work_authoritzation_spec

  • missing this migration. How do we include a custom migration for knapsack? I don't see it in the schema after i run migrations.
    • bundle exec rspec ./spec/models/work_authorization_spec.rb:86 # WorkAuthorization.handle_signin_for! when not given a work_pid will de-authorize all authorizations that have expired but not those that have not expired
    • bundle exec rspec ./spec/models/work_authorization_spec.rb:73 # WorkAuthorization.handle_signin_for! when given a work_pid will re-authorize the given work and expire non-specified works
    • bundle exec rspec ./spec/models/work_authorization_spec.rb:61 # WorkAuthorization.handle_signin_for! when given a work_pid and a scope will authorize the given work_pid and scope’s work
    • bundle exec rspec ./spec/models/work_authorization_spec.rb:102 # WorkAuthorization.authorize! gives the borrowing user the ability to "read" the work
    • bundle exec rspec ./spec/models/work_authorization_spec.rb:120 # WorkAuthorization.revoke! gracefully handles revoking that which was never authorized
    • bundle exec rspec ./spec/models/work_authorization_spec.rb:112 # WorkAuthorization.revoke! revokes an authorized user from being able to "read" the work
  • bundle exec rspec ./spec/indexers/etd_resource_indexer_spec.rb:12 # EtdResourceIndexer behaves like a Hyrax::Resource indexer #to_solr indexes base resource fields
  • bundle exec rspec ./spec/helpers/blacklight/advanced_search_helper_spec.rb:13 # Blacklight::AdvancedSearchHelper#primary_search_fields returns the client specified advanced search fields

kirkkwang and others added 20 commits May 21, 2024 11:18
Added a gitignore for byebug history.  Added work_resources to support
valkyrie factories.  Fixed a few specs.
The spec is still broken but I'm putting it down for now and commiting
my findings.
This is no longer relevant. This should be handled by jobs in iiif_print.
Previously, we could call work.read_groups= and it will set the read
group, but now we need to alter the access control list and save it.

Also, updated the WorkAuthorization to be valkyrie compatible.
The WorkAuthorization spec is still not passing but we at least made a
little bit of progress.
@kirkkwang kirkkwang merged commit 8a95e59 into main May 23, 2024
5 of 6 checks passed
@kirkkwang kirkkwang deleted the fix-specs branch May 23, 2024 22:18
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