Team Qameta Minitest

Fix Flaky Rails System Tests caused by slow scrolling or animations

Chrome and Chromium Smooth scrolling flag

Flakiness on browser-based system tests (integration tests) in Ruby on Rails may have a lot of different reasons. One is scrolling, which may be slowed down by browser setup (smooth scrolling), JavaScript callbacks which result in some kind of events like for animations, etc.

To use or not to use assert_predicate with minitest in Ruby

Recently RuboCop started to blame my assert something.booked? style tests in minitest and telling me this:

Minitest/AssertPredicate: Prefer using `assert_predicate(something, :booked?)`.

I’ve looked for the corresponding Pull Request and also checked the final Rubocop Minitest Style Guide: Assert Predicate.

According to the documentation, we can read: