diff --git a/spec/features/admin_dashboard_spec.rb b/spec/features/admin_dashboard_spec.rb index 93ef5a51b..cdcfd3d1b 100644 --- a/spec/features/admin_dashboard_spec.rb +++ b/spec/features/admin_dashboard_spec.rb @@ -6,8 +6,10 @@ context 'as an administrator' do let(:user) { FactoryBot.create(:admin) } let(:group) { FactoryBot.create(:group) } + let!(:test_strategy) { Flipflop::FeatureSet.current.test! } before do + test_strategy.switch(:show_workflow_roles_menu_item_in_admin_dashboard_sidebar, true) login_as(user, scope: :user) end @@ -46,14 +48,9 @@ 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 - # expect(page).to have_link('Workflow Roles') + # see before block for enabling the feature + expect(page).to have_link('Workflow Roles') end it 'shows the status page' do