When using custom properties in your stylesheets, you may want to set a specific property value to an existing variable...

You can throttle the network in your headless chrome via Selenium. This might be useful for debugging issues with flaky...

en.wikipedia.org

Formerly 301 (Moved Permanently) and 302 (Found) were used for redirecting. Browsers did implement them in different ways, so since...

After switching a project from Sprockets to Webpack, I started observing a bug that was hard to debug: Our...

In case your integration tests crash with a message like below, try to upgrade Capybara to a newer version (3.35.3...

Capybara added a deprecation warning in version 3.35.3 (version from 2019) that shows up if your selector is not of...

makandra dev

6.0.0 2021-06-02 Compatible changes geordi commit will continue even if one of the given projects is inaccessible. It...

When testing JavaScript functionality in Selenium (E2E), you may need to access a class or function inside of a evaluate...

Browsers usually cache website content in order to provide the user with faster responses. Examples are returning to a website...

If your Webpack build is slow, you can use the Speed Measure Plugin for Webpack to figure out where time...

Webpack builds can take a long time, so we only want to compile when needed. This card shows what will...

When you need the DOM node of a tag (e.g. to read extra attributes, or to modify the DOM near it), you can usually reference it via document.currentScript. However, document.currentScript is unsupported in ancient browsers, like Internet Explorer 11 or wkhtmltopdf's Webkit engine. If you are not running async scripts, you can easily polyfill it: document.scripts[document.scripts.length - 1] It works because document.scripts grows with each tag that was evaluated. That is also the reason why this solution will not work reliably for async code. Demo: https://codepen.io/foobear/pen/poRLxQm

web.archive.org

The attached article examines what the percent unit (%) is relative to in CSS The article does a great job of...

ruby-lang.org

Ruby 3.0 introduced a breaking change in how it treats keyword arguments. There is an excellent blog post on the...

When you have a hex color code, you can easily convert it into its RGB values using plain Ruby.

tableconvert.com

https://tableconvert.com/ is an online tool to convert tables between different formats (e.g. json, markdown, csv).

We prefer to run our end-to-end tests with headless Chrome. While it's a very stable solution overall...

When your Rails application server raises error, Capybara will fail your test when it clears the session after the last...

Browsers blocks abusable JavaScript API calls until the user has interacted with the document. Examples would be opening new tab...

makandra dev

In Ruby (almost) everything is an Object. While this enables a lot of powerful features, this concept might be confusing...

By default parallel_tests will spawn as many test processes as you have CPUs. If you have issues with flaky...

makandra dev
mixedcontentexamples.com

The pages […] allow you to see different types of mixed content and test how they behave in your browser. The...

getbootstrap.com

Recently I made an upgrade from Bootstrap 3 to Bootstrap 4 in a bigger project. Here are some tips how...

makandra dev

Rails 6 includes a WYSIWYG editor, Action Text. It works out of the box quite well, but chances are that...