portagenetwork / roadmap

Developed by the the Alliance in collaboration with University of Alberta, DMP Assistant a data management planning tool, forking the DMP Roadmap codebase
MIT License
6 stars 1 forks source link

Update Webmock's Allowed Request List For Fetching Chromedriver #669

Closed aaronskiba closed 4 months ago

aaronskiba commented 4 months ago

Please complete the following fields as applicable:

What version of the DMPRoadmap code are you running? (e.g. v2.2.0)

Issue The following error/failure is outputted when executing the features/selenium tests:

Failures:

  1) SuperAdmins Merge Orgs Super admin merges an Org into another Org
     Failure/Error: browser = Capybara.current_session.driver.browser

     WebMock::NetConnectNotAllowedError:
       Real HTTP connections are disabled. Unregistered request: GET https://storage.googleapis.com/chrome-for-testing-public/121.0.6167.184/linux64/chromedriver-linux64.zip with headers {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Host'=>'storage.googleapis.com', 'User-Agent'=>'Ruby'}

       You can stub this request with the following snippet:

       stub_request(:get, "https://storage.googleapis.com/chrome-for-testing-public/121.0.6167.184/linux64/chromedriver-linux64.zip").
         with(
           headers: {
          'Accept'=>'*/*',
          'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
          'Host'=>'storage.googleapis.com',
          'User-Agent'=>'Ruby'
           }).
         to_return(status: 200, body: "", headers: {})

       ============================================================
     # ./spec/support/helpers/capybara_helper.rb:5:in `clear_cookies!'
     # ./spec/support/helpers/sessions_helper.rb:16:in `sign_in_as_user'
     # ./spec/support/helpers/sessions_helper.rb:7:in `sign_in'
     # ./spec/features/super_admins/merge_org_spec.rb:27:in `block (2 levels) in <top (required)>'