vue app for image list. even tests. but wip

This commit is contained in:
2022-12-17 21:22:31 +02:00
parent fc2c390fd1
commit 1aa092c433
9 changed files with 98 additions and 22 deletions

View File

@ -7,7 +7,7 @@ RSpec.feature "Images", type: :feature do
expect(page).to have_title("Dummy")
expect(page).to have_text("Pages")
end
it "has picures" do
it "has picures" , js: true do
expexted_num = Merged::Image.count
visit "/merged/images"
found= find_all(".image_box").count

View File

@ -5,6 +5,8 @@ require_relative '../test/dummy/config/environment'
# Prevent database truncation if the environment is production
abort("The Rails environment is running in production mode!") if Rails.env.production?
require 'rspec/rails'
require 'capybara/rails'
# Add additional requires below this line. Rails is not loaded until this point!
# Requires supporting ruby files with custom matchers and macros, etc, in
@ -22,7 +24,11 @@ require 'rspec/rails'
#
# Dir[Rails.root.join('spec', 'support', '**', '*.rb')].sort.each { |f| require f }
Capybara.javascript_driver = :selenium_headless
RSpec.configure do |config|
# Remove this line to enable support for ActiveRecord
config.use_active_record = false