Skip to content

Commit

Permalink
🧹 Rely on test strategy instead of UI hack
Browse files Browse the repository at this point in the history
Prior to this commit we were relying on a SHA; one that looks like it
might not be all that durable.

With this commit, we instead favor using a test strategy to turn it on.
  • Loading branch information
jeremyf committed Dec 15, 2023
1 parent 9b88c98 commit 94ed0c7
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions spec/features/admin_dashboard_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@
let(:user) { FactoryBot.create(:admin) }
let(:group) { FactoryBot.create(:group) }

before do
before do
login_as(user, scope: :user)
end

skip 'TODO: This consistently fails the CI pipeline, but passes locally. https://github.com/scientist-softserv/palni-palci/issues/933'
it 'shows the admin page' do # rubocop:disable RSpec/ExampleLength
visit Hyrax::Engine.routes.url_helpers.dashboard_path
within '.sidebar' do
Expand Down Expand Up @@ -46,13 +45,8 @@
expect(page).to have_link('Available Work Types')
click_link "Features"
end
# TODO: I (Jeremy) commented out the code, because I find it hard to imagine that the
# e12067c3ac367d4bb2798ab71fbb8660 is a durable value for tests.
#
# the workflow roles button is only ever shown if the setting is turned on.
# within("form[action='/admin/features/show_workflow_roles_menu_item_in_admin_dashboard_sidebar/strategies/e12067c3ac367d4bb2798ab71fbb8660?locale=en']") do
# find("input[value='on']").click
# end
# see before block for enabling the feature
# expect(page).to have_link('Workflow Roles')
end

Expand Down

0 comments on commit 94ed0c7

Please sign in to comment.