Test Selector Gem

In tests it can be hard to find the exact place where your expected results should be, because the results can be ambiguous. An option is to add selectors like id or class to elements so they can be found in tests. But adding those selectors for tests doesn’t feel to well if they aren’t doing anything for you in production. Next to that it will get harder and harder to find new names that can be added as a selector and are unique on the page. [Read More]
rails  tests 

Using Phoenix.PubSub to manage side effects

In a normal cycle of a request we do a couple of things before we show something to the user. A CRUD request is received, we do something on the database and return the data on the page that’s shown to the user. Because of this, it takes some time before the user gets shown what he requested. In some requests there are side effects. What I see as a side effects is everything in the request that has been done that doesn’t have a direct input on what the user sees. [Read More]