Skip to content

Commit

Permalink
Convert existing system specs to use mock OmniAuth support
Browse files Browse the repository at this point in the history
  • Loading branch information
steventux committed Jul 27, 2023
1 parent fe24d91 commit 042affa
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
require "rails_helper"

RSpec.describe "Upload file", type: :system do
scenario "Support user uploads a valid CSV file" do
include ActivateFeaturesSteps
include AuthenticationSteps

scenario "Support user uploads a valid CSV file", test: :with_stubbed_auth do
given_the_service_is_open
and_i_am_signed_in_via_dsi
and_i_am_on_the_upload_page
when_i_upload_a_valid_csv_file
then_i_see_a_success_message
Expand Down
4 changes: 3 additions & 1 deletion spec/system/user_searches_with_matching_record_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@

RSpec.describe "Valid search", type: :system do
include ActivateFeaturesSteps
include AuthenticationSteps

scenario "User searches with a last name" do
scenario "User searches with a last name", test: :with_stubbed_auth do
given_the_service_is_open
and_i_am_signed_in_via_dsi
and_there_is_a_record
and_i_visit_the_search_page
and_i_enter_their_last_name
Expand Down
4 changes: 3 additions & 1 deletion spec/system/user_searches_with_missing_params_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@

RSpec.describe "Invalid search", type: :system do
include ActivateFeaturesSteps
include AuthenticationSteps

scenario "User searches without a last name" do
scenario "User searches without a last name", test: :with_stubbed_auth do
given_the_service_is_open
and_i_am_signed_in_via_dsi
and_i_visit_the_search_page
and_i_click_search
then_i_see_an_error
Expand Down
4 changes: 3 additions & 1 deletion spec/system/user_searches_with_no_matching_record_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@

RSpec.describe "No matching record search", type: :system do
include ActivateFeaturesSteps
include AuthenticationSteps

scenario "User searches with no matching last name" do
scenario "User searches with no matching last name", test: :with_stubbed_auth do
given_the_service_is_open
and_i_am_signed_in_via_dsi
and_there_is_a_record
and_i_visit_the_search_page
and_i_search_for_a_different_last_name
Expand Down

0 comments on commit 042affa

Please sign in to comment.