semaphoreci.com

In this article, we’ll look at what side effects are, why they are problematic despite being necessary, and how...

github.com

...app such as PHP, Perl, Java / JEE, etc. I like using cucumber for functional testing so I put together this project structure to use as a starting point for testing...

jqueryElement.is(':checked')

freelancefolder.com

...this article we’ve listed 7 fresh and simple tools for cross-browser compatibility testing, tools that actually make this stuff pretty easy. Not only that, but every single one...

celerity.rubyforge.org

Celerity is a JRuby wrapper around HtmlUnit – a headless Java browser with JavaScript support. It provides a simple API for...

gusiev.com

What do we expect from the custom finder? We expect that it should find assets A, B, C and should...

...default for building is production. Activate an environment with -e staging or --environment=staging. Test for environments like this: environment? :staging Testing Complex "static" pages might need some integration testing...

...To employ Cucumber with Spreewald and Selenium, add these gems to the Gemfile: group :test do gem 'cucumber' gem 'spreewald' gem 'capybara' gem 'selenium-webdriver' # Only for running tests in...

When an AJAX request raises an exception on the server, Rails will show a minimal error page with only basic...

getbootstrap.com

Suggestion: Upgrade to a newer version before doing the Bootstrap upgrade and test if everything still works as expected. Here is a migration guide for Select2

...navigation on your own. Tip: Add a feature for your navigation bar beforehand and test links and their highlighting (don't forget dropdown submenus!). After upgrading to Bootstrap 4 you...

github.com

There are a few tools to combat the dreaded n+1 queries. The bullet gem notifies you of missing eager...

makandra dev

...at least 2.2.0. Set a cookie with options secure: true, samesite: 'strict|lax|none'. Testing in advance To test the effect of the new Chrome behavior on your site or...

...search results for example to the /app/ directory can be helpful to exclude all test files. The probably easiest way to start this kind of search is from the project...

...Just increase the last index when proceeding to the next example. Handy when the test file frequently changes, e.g. because before blocks are modified. The line number approach would easily...

# At this point we want to stop in the debugger for all following tests, when the :lock call runs into the after_save $debug = true expect { user.lock }.to change...

...processing library. See here for a list of supported queueing adapters. For development and test it also brings its own queue adapters (async, inline and test). Note: For production use...

...have different adapters for different environments): config.active_job.queue_adapter = :sidekiq To set specific adapters in tests, you can create a spec/support/active_job.rb with: RSpec.configure do |config| config.before(:suite) do ActiveJob::Base.queue_adapter...

...If you are unsure if you applied this technique correctly, here is a simple test: Delete all files from app/models/* and run your migration. If it completes successfully, you are...

...setInterval and setTimeout calls from tabs that are currently in the background. You can test it yourself by running the test below and change to a different...

...tab during its runtime. The expected runtime drastically increases in Chrome, Firefox and Safari: https://testbed.nicon.nl/timeouttest/ See also: Stop animations and network polling when the document tab isn't...

Test suites usually grow over time as more and more development time is spent on a projects. Overall run-time and performance of Cucumber suites in turn increases, too.

makandra dev

...lazy, i.e. page 2 is only requested after page 1 is done processing in tests, I could write video_service.each_video.to_a.should == [video_1,...] Lazy enumerators It is possible to chain methods on...

Sidekiq.configure_client do |config| if ENV['RAILS_ENV'] == 'development' || ENV['RAILS_ENV'] == 'test' stdout_logger = ActiveSupport::Logger.new(STDOUT) file_logger = ActiveSupport::Logger.new("log/sidekiq_#{ENV['RAILS_ENV']}.log")

end Sidekiq.configure_server do |config| if ENV['RAILS_ENV'] == 'development' || ENV['RAILS_ENV'] == 'test' stdout_logger = ActiveSupport::Logger.new(STDOUT) file_logger = ActiveSupport::Logger.new("log/sidekiq_#{ENV['RAILS_ENV']}.log")

to add the Ruby, Rails and RSpec cops to include the unit test 2. Report all existing offenses and exclude them initially To start your Rubocop integration it...

...rubocop --auto-gen-config to create a file that excludes all current violations. Your tests (including the Rubocop spec) should now all be green. Commit theses changes and consider whether...

...it becomes more difficult to optimize this query when joining other records (for my tests PostgreSQL was not able to use the GIN index on the joined table within a...