|
|
|
@ -140,6 +140,12 @@ RSpec.describe "User Features" do |
|
|
|
expect(page).to have_content("Sign in to your account to submit CORE data") |
|
|
|
expect(page).to have_content("Sign in to your account to submit CORE data") |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it "does not show 'Sign in' link when the service has moved" do |
|
|
|
|
|
|
|
allow(FeatureToggle).to receive(:service_moved?).and_return(true) |
|
|
|
|
|
|
|
visit("/lettings-logs") |
|
|
|
|
|
|
|
expect(page).not_to have_link("Sign in") |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
it "does not show 'Sign in' link when the service is unavailable" do |
|
|
|
it "does not show 'Sign in' link when the service is unavailable" do |
|
|
|
allow(FeatureToggle).to receive(:service_unavailable?).and_return(true) |
|
|
|
allow(FeatureToggle).to receive(:service_unavailable?).and_return(true) |
|
|
|
visit("/lettings-logs") |
|
|
|
visit("/lettings-logs") |
|
|
|
@ -331,6 +337,13 @@ RSpec.describe "User Features" do |
|
|
|
expect(page).to have_selector('[data-qa="change-key-contact"]') |
|
|
|
expect(page).to have_selector('[data-qa="change-key-contact"]') |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it "does not show 'Your account' or 'Sign out' links when the service has moved" do |
|
|
|
|
|
|
|
allow(FeatureToggle).to receive(:service_moved?).and_return(true) |
|
|
|
|
|
|
|
visit("/lettings-logs") |
|
|
|
|
|
|
|
expect(page).not_to have_link("Your account") |
|
|
|
|
|
|
|
expect(page).not_to have_link("Sign out") |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
it "does not show 'Your account' or 'Sign out' links when the service is unavailable" do |
|
|
|
it "does not show 'Your account' or 'Sign out' links when the service is unavailable" do |
|
|
|
allow(FeatureToggle).to receive(:service_unavailable?).and_return(true) |
|
|
|
allow(FeatureToggle).to receive(:service_unavailable?).and_return(true) |
|
|
|
visit("/lettings-logs") |
|
|
|
visit("/lettings-logs") |
|
|
|
|