...simply replace %br with %br>< for that. When you are done, use a spam test service like mail-tester.com to check if all is well. Note that premailer-rails can do...

Capistrano is by default configured to exclude the gems of the groups development and test when deploying to the stages production and staging. Whenever you create custom groups in your...

...deploy, add the following to config/deploy/production.rb and config/deploy/staging.rb respectively: set :bundle_without, %w[development test cucumber deploy].join(' ') Be aware, that gems that belong to two groups, are only excluded...

...Common mistakes when storing file uploads with Rails Carrierwave: How to attach files in tests Carrierwave: Built-in RSpec matchers CarrierWave: Processing images with libvips Multipart formposts Content Disposition Header...

...form is displayed again. Use the CarrierWave cache for this. Make sure to add tests for adding, changing and deleting a poster image: An integration test for the happy path...

...does not have any log or debugging statements like console.log(...), byebug etc. has green tests has tests for new features has been manually tested in the browser has no missing...

Our preferred way of testing ActiveRecord is to simply create/update/destroy the record and then check if the expected behavior has happened. We used to bend over backwards to avoid touching...

Today we would rather make a few database queries than have a fragile test full of stubs. Example Let's say your User model creates a first Project on...

github.com

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

puppet.com

...server before the new version can be used. That also means you can't test functions in a different puppet environment. And also if you have changed functions in a...

...different puppet environment (where you e.g. test some new module version) and this environment runs at first after a puppetserver restart, you have this changed functions also in your production...

.../regex/.test(...) is converted to a string as defined by the specs, which means e.g. .test(null) is equal to .test("null"). Globally matching regex objects remember the last index they...

...matched. Multiple calls to test() will advance this pointer: matcher = new RegExp("foo", "g") // <- "global" flag matcher.test("foobar") // => true matcher.lastIndex // => 3 (where the regexp stopped scanning) matcher.test("foobar") // => false matcher.lastIndex...

...of their file paths by default (or when you specify --order defined). You run tests in random order by using --order random on the command line, or by putting it...

...your project's .rspec file. Note that both switches also affect the order the tests inside each file are run: defined runs tests in the order they are defined inside...

testing-library are widely used testing utilities libraries for javascript dependent frontend testing. The main utilities provided are query methods, user interactions, dom expectations and interacting with components of several...

...less about the details happening in the browser and focus more on user centric tests instead! Some of the time you will find a necessity to use methods like waitFor...

In Cucumber, scenario outlines help avoiding tests that are basically the same, except for a few variables (such as different inputs). So far, nothing new. The problem

...your test should (or should not) do something, like filling in a field only for some tests? Scenario Outline: ... When I open the form And I fill in "Name" with...

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...

...the middle of config/application.rb: require 'middleware/secure_cookies' config.middleware.insert_after ActionDispatch::Static, Middleware::SecureCookies Add a test to spec/requests/secure_cookies_spec.rb: describe Middleware::SecureCookies do it 'flags all cookies sent by the application as...

get 'https://www.example.com/test/set_cookie' response.headers['Set-Cookie'].should =~ %r(test=\S+; path=/; Secure$) end it 'will not flag cookies as secure when HTTPS is not being used (in...

...TLSv1.3 gelöst? Du weißt, wie du eine Webseite auf die Sicherheit der SSL Konfiguration testen kannst. Du kennst Certificate Transparency logs und weißt wofür das gut ist.

...Was kannst du hier herausfinden? Wie ist es möglich, dass die Informationen dort vorliegen? Teste makandra.de auf SSL Labs. Schau dir das Testergebnis an und verstehe welche Ergebnisse dir angezeigt...

...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...

config.move_to_store = true We have a separate card about that. Store test files separately. Also add support for parallel tests. You can easily do that by setting...

config.root = "#{Rails.public_path}/system/#{Rails.env}#{ENV['TEST_ENV_NUMBER']}".freeze For debugging purposes (e.g. trying to hunt down a staging bug locally), it might make sense to allow reading...

DevOps Curriculum

Als DevOps Engineer kann es häufiger vorkommen, dass du ein lokales Testsetup bauen musst, um eine bestimmte Software oder ein Tool zu testen. Dafür bieten sich VMs oder Linux Container...

...dein Notebook mit vorkonfigurierten Firewall-Regeln ausgestattet ist. Starte einen (oder mehrere Container) und teste, wie du dich auf der Shell Ebene zu diesen verbinden kannst. Stelle sicher, dass deine...

Using a gem like rails_state_machine Make sure that you have tests for all the changes you make. Note that your E2E-Tests should rather focus on...

...should create records in a state that is useful for the vast majority of tests. Tip We often use state machines to track the state of "wizard forms", i.e. long...

...explains which threads and processes interact with each other when you run a Selenium test with Capybara. This will help you understand "impossible" behavior of your tests.

...a Rack::Test (non-Javascript) test with Capybara, there is a single process in play. It runs both your test script and the server responding to the user interactions scripted...

When using Chrome for Selenium tests, the chromedriver binary will be used to control Chrome. To debug problems that stem from Selenium's Chrome and/or Chromedriver, you might want to...

...the chromedriver itself. Here is how. Option 1: Use Selenium::WebDriver::Service In your test setup, you may already have something like Capybara::Selenium::Driver.new(@app, browser: :chrome, options: ...), especially...

Debugging your integration tests, that run a headless Chrome inside a docker image, is tricky. In many cases you can connect your Chrome to a remote docker container like docker...

...be the preferred way when you try to inspect a page within your integration test. Otherwise you might be able to start your docker container with --net=host and access...

makandra dev

...Binding URL with the LogoutResponse. Keycloak does this when Front channel logout is disabled. Testing in development using a local keycloak server You can test this using a local keycloak...

...and is enabled per default This just worked for me, so no troubleshooting here Testing in development using a local keycloak server You can test this using a local keycloak...

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...

...trashed_changed? end Or, move the conditions into the callback. This also allows you test the conditions more easily using a unit test: after_save :update_offices_people_count

if office_id_changed? || trashed_changed? ... end end Also see the card on testing conditional validations...