Browse Source

CLDC-4029: Add tests for user filters displaying

CLDC-4029-add-additional-user-filters
samyou-softwire 1 week ago
parent
commit
17dd3be4df
  1. 20
      spec/features/user_spec.rb

20
spec/features/user_spec.rb

@ -282,6 +282,12 @@ RSpec.describe "User Features" do
end end
end end
end end
it "shows correct filters" do
expect(page).to have_selector("label", text: "Data provider")
expect(page).to have_selector("label", text: "Data coordinator")
expect(page).not_to have_selector("label", text: "Support")
end
end end
end end
@ -619,6 +625,20 @@ RSpec.describe "User Features" do
expect(page).to have_button("Resend invite link") expect(page).to have_button("Resend invite link")
end end
end end
context "when filtering users" do
before do
allow(user).to receive(:need_two_factor_authentication?).and_return(false)
sign_in(user)
visit(users_path)
end
it "shows correct filters" do
expect(page).to have_selector("label", text: "Data provider")
expect(page).to have_selector("label", text: "Data coordinator")
expect(page).to have_selector("label", text: "Support")
end
end
end end
context "when the user is a customer support person" do context "when the user is a customer support person" do

Loading…
Cancel
Save