Skip to content

Commit

Permalink
Merge branch 'main' into abel-6537-fix_visibility_prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
laritakr authored May 21, 2024
2 parents 6d514aa + 943b002 commit 51a7b33
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions spec/features/deposit_agreements_spec.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# frozen_string_literal: true
RSpec.describe 'Deposit Agreement options', :js, :workflow, :clean_repo do
let(:user) { create(:user) }
let(:admin_user) { create(:admin) }
# let(:adminset) { create(:admin_set) }
let!(:ability) { ::Ability.new(user) }
let(:permission_template) { create(:permission_template, with_admin_set: true, with_active_workflow: true) }

Expand All @@ -15,19 +13,15 @@

context "with activate deposit agreement off" do
before do
sign_in admin_user
# Disable active agreements
visit "/admin/features"
first("tr[data-feature='active-deposit-agreement-acceptance'] input[value='off']").click

allow(Flipflop).to receive(:active_deposit_agreement_acceptance?).and_return(false)
sign_in user
end

it "allows saving work when active deposit agreement is off" do
click_link 'Works'
find('#add-new-work-button').click
choose "payload_concern", option: "GenericWork"
click_button 'Create work'
end

it "allows saving work when active deposit agreement is off" do
expect(page).to have_selector('input[name="save_with_files"][disabled]')

# Fill in required metadata
Expand Down

0 comments on commit 51a7b33

Please sign in to comment.