caniemail.com

The french Tilt Studio built a caniuse clone for email clients. Note that while checking styling support helps using (or...

justinfrench.com

Eventually you’ll forget that you used to spend hours testing your code in a browser, and start complaining that your automated tests are taking minutes to run! You’ll...

...have intense debates with co-workers about what to test and how to test it properly. You’ll start writing the test first to expose the bug or missing feature...

Due to the way we setup Jasmine tests in our projects, you may run into various errors when Jasmine boots. Setting jasmineRequire on undefined Jasmine 4 may fail with an...

Now add the following loader to your config/webpack/environment.js: environment.loaders.prepend('fix-jasmine4-global-detection', { test: /jasmine-core\/lib\/jasmine-core\/jasmine\.js$/, use: [{ loader: 'string-replace-loader', options: { search: 'window.toString() === \'[object GjsGlobal...

Don't say is_a?(ActiveRecord::NamedScope::Scope) because that is no longer true in Rails 3 and also doesn...

...use plain ruby scripts, consider lib/scripts/* as folder. Keeping tasks slim For readability and testing it's easier to keep your tasks slim. We suggest to use folders inside the...

...Your code of exporting all users e.g. into a XSLX file end end end Testing should not be optional Tasks should be tested the same way as other code, even...

...up DOM elements. There are also matchers like have_field to make expectations during tests. These methods also have a number of options to influence the lookup. E.g. the :disabled...

When testing with Cucumber / Caypbara, iframes are ignored, so you can't interact with them. To interact with your iframe, you have to explicitly tell your driver to use it...

github.com

...formerly known as "spec_candy.rb") is now available as a gem. It works, it is tested and there will be updates. Usage Add rspec_candy to your Gemfile. Add require 'rspec...

regular-expressions.info

...a number between 100 and 99999. Modes: Greedy, Lazy and Possessive Example string: This test is a first test string. greedy (default): * and + match as much as they can and...

...backtrack when they can't satisfy the regex, i.e. the .* in /.*test/ will first match the whole example string and then go back to match this: This test is a...

Same requests are recorded only once in vcr. Replaying a test fails, if you trigger the same request multiple times. The error message is somehow confusing, as your cassette contains...

URI ignoring query parameter ordering 1 URI ignoring query parameter ordering 2 Tests with AJAX Using javascript in integration tests might cause issues that AJAX requests are not...

github.com

Scenario outlines allow us to more concisely express repetitive examples through the use of a template with placeholders.

github.com

"I click on ..." step fixed Errors added to ToleranceForSeleniumSyncIssues::RETRY_ERRORS Capybara::ElementNotFound Selenium::WebDriver::Error::ElementNotVisibleError Selenium::WebDriver::Error...

vimeo.com

Hashrocket Lunch n' Learn #1 with Avdi Grimm: Making Little Classes out of Big Ones A look at the pros...

github.com

...relative 'lib/capistrano/slackistrano' set :slackistrano, { klass: Slackistrano::CustomMessaging, channel: '#your-channel', webhook: 'https://hooks.slack.com/services/your/webhook/url', } Test Slackistrano: cap staging slack:deploy:test When you are satisfied, do a real deploy to...

bitovi.com

Syn is a synthetic event library that pretty much handles typing, clicking, moving, and dragging exactly how a real user...

stackoverflow.com

This works in all relevant browsers: document.activeElement You can use this in your Selenium steps, for example, to assert that...

robots.thoughtbot.com

I think this pattern is really useful not just for upgrading suites from Webrat, but really anywhere you have an...

...T is allowed to be UTF-16, we want to read it back in tests without having to decode. For the page Annots lists the page's annotations. We must...

...viewer knows, so it needs no embedding. WinAnsiEncoding covers Western European characters like umlauts. Tests You can use pdf-reader to access fields. Example: pdf = Prawn::Document.new {...

github.com

matches. Example Let the following setup: # my_model_spec.rb describe MyModel do it 'perfoms a test' it_behaves_like 'something shared' end # something_shared.rb shared_examples_for 'something shared' do

...MyModel is spec/models/my_model_spec.rb[1]. The ID of the ExampleGroup created by it 'performs a test' is spec/models/my_model_spec.rb[1:1]. The ID of the ExampleGroup created by it_behaves_like 'something...

...current JavaScript VM: window.addEventListener('error', function(event) { console.log("Got an uncaught error: ", event.error) }) Tip Testing tools like Jasmine might also listen to the error event and fail your test if...

...do not need a code review, but use the merge request to run a test pipeline: # Push branch, create a merge request, set the branch to be removed on merge...

...and set to merge when all tests are green ptm = push -u origin HEAD -o merge_request.create -o merge_request.merge_when_pipeline_succeeds -o merge_request.remove_source_branch Miscellaneous [core] editor = vim # Set...

github.com

Internet Explorer until version 9 has some limitations when parsing CSS files Summarized, these are: Up to 31 CSS files...

makandra dev
github.com

For years we copied the patiently helpers into our test suites. they now live in their own gem (makandra/patiently) where we can test them and distribute changes. Setup

When you roll custom URLs with hacks like routing-filter, you can put a spec like this into spec/routing/routing_spec.rb: