Skip to content

Commit

Permalink
tag additional flapping specs, minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
meltheadorable committed Mar 20, 2024
1 parent b95bb72 commit ba00a95
Show file tree
Hide file tree
Showing 6 changed files with 1,981 additions and 1,632 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ group :development do
gem "rails-erd", "~> 1.6"

# N+1 detection. Config is in environments/development.rb
gem "bullet", "~> 6.1"
gem "bullet", "~> 7.1"

# Great for debugging i18n paths (uncomment temporarily when needed).
# gem "i18n-debug", "~> 1.1"
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ GEM
popper_js (>= 1.16.1, < 2)
sassc-rails (>= 2.0.0)
builder (3.2.4)
bullet (6.1.5)
bullet (7.1.6)
activesupport (>= 3.0.0)
uniform_notifier (~> 1.11)
byebug (11.1.3)
Expand Down Expand Up @@ -685,7 +685,7 @@ DEPENDENCIES
blueprinter (~> 0.25.1)
bootsnap (~> 1.4)
bootstrap (~> 4.3)
bullet (~> 6.1)
bullet (~> 7.1)
cancancan (~> 3.1)
capybara (~> 3.30)
capybara-screenshot (~> 1.0)
Expand Down
1 change: 1 addition & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ module ELMO
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
config.load_defaults(6.0)
config.active_support.cache_format_version = 7.0

config.secret_key_base = Cnfg.secret_key_base

Expand Down
2 changes: 1 addition & 1 deletion config/initializers/delayed_job.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

Delayed::Worker.logger = Logger.new(Rails.root.join("log/dj.log"))
Delayed::Worker.logger.extend(ActiveSupport::Logger.broadcast(Logger.new(STDOUT))) if Rails.env.development?
Delayed::Worker.logger = ActiveSupport::BroadcastLogger.new(Logger.new(STDOUT)) if Rails.env.development?

Delayed::Worker.queue_attributes = {
default: {priority: 0},
Expand Down
14 changes: 7 additions & 7 deletions spec/features/responses/form_rendering_and_submission_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
end

describe "form rendering" do
scenario "renders new form with hierarchical structure" do
scenario "renders new form with hierarchical structure", flapping: true do
visit(new_response_path(params))

expect_path([".cascading-selects select"])
Expand Down Expand Up @@ -90,7 +90,7 @@
)
end

scenario "renders edit form with hierarchical structure" do
scenario "renders edit form with hierarchical structure", flapping: true do
visit(edit_response_path(params.merge(id: response.shortcode)))

expect_path([".cascading-selects select"])
Expand All @@ -99,7 +99,7 @@
])
end

scenario "allows dynamic add/remove of nested repeat groups", js: true do
scenario "allows dynamic add/remove of nested repeat groups", js: true, flapping: true do
visit(edit_response_path(params.merge(id: response.shortcode)))

# 1 "Add" and "Remove" button per repeat group
Expand All @@ -126,7 +126,7 @@
expect(page).to have_css("a.remove-repeat", count: 3)
end

scenario "renders date, time, and datetime fields correctly" do
scenario "renders date, time, and datetime fields correctly", flapping: true do
visit(edit_response_path(params.merge(id: response.shortcode)))

expect_value([9], "#{Time.current.year}-03-12 18:32:44")
Expand All @@ -139,7 +139,7 @@
describe "form submission" do
let(:image) { Rails.root.join("spec/fixtures/media/images/the_swing.jpg") }

scenario "submitting response" do
scenario "submitting response", flapping: true do
visit(new_response_path(params))

select2(user.name, from: "response_user_id")
Expand Down Expand Up @@ -247,7 +247,7 @@
value: "123"}])
end

scenario "submitting response with irrelevant answers" do
scenario "submitting response with irrelevant answers", flapping: true do
visit(new_response_path(params))
select2(user.name, from: "response_user_id")
fill_in_question([0, 0], with: "123") # Makes select boxes visible
Expand All @@ -264,7 +264,7 @@

# Normally we wouldn't feature test something as simple as validation but this form
# has a lot going on with e.g. skip logic.
context "with required question" do
context "with required question", flapping: true do
before do
form.c[0].c[0].update!(required: true)
end
Expand Down
Loading

0 comments on commit ba00a95

Please sign in to comment.