Browse Source

Fix integration test with browser view to use VCR instead of manual added items

tags/0.3.6^2
Bèr Kessels 2 months ago
parent
commit
36ca7fe72a
1 changed files with 5 additions and 5 deletions
  1. 5
    5
      test/integration/web/browser_views_place_test.rb

+ 5
- 5
test/integration/web/browser_views_place_test.rb View File

@@ -4,12 +4,8 @@ require 'test_helper'
require 'capybara'
require 'capybara/dsl'

require_relative Hours.base_path.join('test/support/workflows/add_place.rb')

describe 'browser views place' do
include Capybara::DSL
include Workflows::AddPlace
let(:input) { [json_fixtures('input/hm_burchtstraat.json')] }

Capybara.register_driver :selenium_ff_headless do |app|
Capybara::Selenium::Driver.load_selenium
@@ -17,6 +13,8 @@ describe 'browser views place' do
Capybara::Selenium::Driver.new(app, browser: :firefox, options: options)
end

let(:place_id) { 'poi:osm:node:989225414' }

before do
skip unless ENV['RUN_SLOW_TESTS']
Capybara.default_driver = :selenium_ff_headless
@@ -25,7 +23,9 @@ describe 'browser views place' do
end

it 'shows a map' do
visit "/places/#{hm_id}"
VCR.use_cassette :bragi_hm_nijmegen do
visit "/places/#{place_id}"
end
page.assert_title 'Openingstijden'

page.assert_selector('div#map')

Loading…
Cancel
Save