Augsburg Berlin Beta Group """ The step ignores all HTML tags and only tests on plain text...

...see Cucumber: Check if a select field contains a disabled option on how to test this...

Generally, Selenium tests use the browser to interact with the page. If it's unavailable, a timeout error is thrown. Now, consider a scenario like this: @javascript Scenario: Receive...

Errors happening on the target page are not "visible" to the test If the browser is still waiting for further responses from the server (like after following...

github.com

...get full SQL syntax highlighting in the editor of your choice and can easily test your SQL in the database console during development. https://robots.thoughtbot.com/announcing-scenic--versioned-database-views-for-rails Notes: PostgreSQL only

...For Spreewald >= 1.9.0 it is as described in Solution 1. When doing integration testing with cucumber and selenium you will often encounter problems with timing - For example if your test...

...runs faster than your application, html elements may not yet be visible when the test looks for them. That's why Spreewald (a collection of cucumber steps) has a concept...

To test if you can connect to a host using password authentication and explicitly deny public key authentication: ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no user@host This also works...

...Then console step from spreewald in combination with geordi vnc from geordi to debug tests within a real browser. Sometimes when you type in the browser it suddenly disappears. You...

When you need to find out in which kind of spec you are during run-time, it's definitely possible...

makandra dev

If you need dummy data to play around with in development, it's often faster to reuse your existing factories...

thoughtbot.github.io

Let's say you have two factories that share some attributes and traits: FactoryBot.define do factory :user do screen_name...

makandra dev
impactahead.com

Also see the list of IRB commands. Switching the context Changes the "default receiver" of expressions. Can be used to...

gist.github.com

Since we're using RSpec on most projects, I've transformed the test for it to a spec. See the attached link...

RSpec lets you define the arguments with which you expect a method to be invoked: subject.should_receive(:say).with('hello...

perlstalker.vuser.org

While you can set your own font in your terminal or other tools, it will not change the default "Monospace...

...the visibility: hidden rule is not checked at all. Selenium Selenium is an integration test framework that consists of different tools to test websites and web-applications with real browsers...

...method? Due to the fact that a real browser is used for your website tests, the browser itself is aware of all visible and hidden elements since it parses CSS...

makandra dev
github.com

...developed as a C extension, so it's fast. And it has a full test suite so it's reliable. Note that byebug works only for ruby 2.0.0 or newer...

tutorialzine.com

...Unpoly you may also use up.util.parseUrl(), which implements the technique in this card with tests and all caveats fixed. Related topic: JavaScript: Working with Query Parameters Javascript: Read params from...

Views are normally (for good reason) not rendered in controller specs. If you need it to happen, use:

Developing complex regular expressions quickly blows my mind. Here are some online regex editors that help you by highlighting matching...

Rails 7.1 added a new method Rails.env.local?. If you want to stub the Rails env correctly, use ActiveSupport::EnvironmentInquirer like...

makandra dev
browsercookielimits.squawky.net

...Behind the link, you'll find a simple HTML page that offers some cookie tests (how large, how many etc) and an overview of this data for various browsers.

Turns out, Cucumber::MultilineArgument::DataTable#diff! caches some stuff. Code of the following form will not work as intended:

rspec.info

Real-world example A real-world use case would be to test if the current page has a button with the label "Foo". There are many ways...

Enable local logging for Sentry when: Debugging Sentry event capture locally Testing error handling without polluting production metrics Developing background jobs and want to see what Sentry captures