Browse Source

CLDC-2862: test header bar links hidden in maintenance mode

pull/2006/head
Sam Seed 3 years ago
parent
commit
722d2c29af
  1. 13
      spec/features/user_spec.rb

13
spec/features/user_spec.rb

@ -139,6 +139,12 @@ RSpec.describe "User Features" do
visit("/users/#{user.id}")
expect(page).to have_content("Sign in to your account to submit CORE data")
end
it "does not show 'Sign in' link if maintenance mode is enabled" do
allow(FeatureToggle).to receive(:maintenance_mode_enabled?).and_return(true)
visit("/lettings-logs")
expect(page).not_to have_link("Sign in")
end
end
context "when the user is trying to log in with incorrect credentials" do
@ -324,6 +330,13 @@ RSpec.describe "User Features" do
expect(page).to have_selector('[data-qa="change-data-protection-officer"]')
expect(page).to have_selector('[data-qa="change-key-contact"]')
end
it "does not show 'Your account' or 'Sign out' links if maintenance mode is enabled" do
allow(FeatureToggle).to receive(:maintenance_mode_enabled?).and_return(true)
visit("/lettings-logs")
expect(page).not_to have_link("Your account")
expect(page).not_to have_link("Sign out")
end
end
context "when adding a new user" do

Loading…
Cancel
Save