---
title: 'New in Lucky: Browser tests with LuckyFlow, Emails with Carbon, and built-in
  Authentication with Authentic'
teaser: 'Lucky v0.10 adds tons of new features for testing in a browser, sending emails,
  and handling authentication.

  '
tags: lucky,crystal,web
author: Paul Smith
published_on: 2018-06-05
---

> [Lucky] is a web framework written in [Crystal] designed to help you write
> applications faster. It’s familiar and approachable, but packed with new ideas
> that will help you write beautiful apps in less time.

[Lucky] v0.10 is out and it's a big one! Along with smaller improvements and bug
fixes, we have some big new additions:

- LuckyFlow, a browser testing library like Capybara, but with a few twists
  that make for more readable and reliable tests.
- Carbon, an email library that catches common bugs at compile time.
- Authentic, a simple library for authentication.

## Built-in authentication

Just about every app I write needs some form of authentication. As of this
release, Lucky comes with sign in, sign up, and password reset out of the box.
It’s easy to customize and saves a lot of time.

Here's what the code for signing up looks like:

![Sign up form](https://images.thoughtbot.com/blog-vellum-image-uploads/24oFtX7XRfaLxWXCBJbN_carbon-6.png)

Check out the [authentication guide] to learn more.

## Readable and reliable browser tests

[LuckyFlow] is similar to Capybara, but with a few twists. LuckyFlow works with
objects instead of modules, and has a [clever way of targeting elements] that
was borrowed from [Laravel Dusk].

Object oriented "Flows" make for readable tests and [Flow IDs] mean you can
freely change the text and classes in your UI without breaking your tests.

![LuckyFlow example](https://images.thoughtbot.com/blog-images/2018/lucky-flow.png)

## Easily send and test emails

[Carbon] is the type-safe email library in Crystal. It’ll let you know at
compile time if you forget a subject or accidentally try to send to an email
address that might be `nil`. It’s also easy to test and has a built in dev
adapter so you don’t need to set up an SMTP server or SendGrid account until
you’re ready to deploy.

![Carbon code preview](https://images.thoughtbot.com/blog-images/2018/lucky-carbon.png)

## Give Lucky a try

It’s easy to get started with the [Lucky guides] and the helpful community in
our [chat room] is eager to help.

See you around!

[authentication guide]: https://luckyframework.org/guides/authentication/
[carbon]: https://github.com/luckyframework/carbon
[chat room]: https://gitter.im/luckyframework/Lobby
[clever way of targeting elements]: https://luckyframework.org/guides/browser-tests/#using-to-find-by-flow-id
[crystal]: https://crystal-lang.org
[flow ids]: https://luckyframework.org/guides/browser-tests/#using-to-find-by-flow-id
[laravel dusk]: https://laravel.com/docs/5.6/dusk
[lucky guides]: https://luckyframework.org/guides/
[lucky]: https://luckyframework.org
[luckyflow]: https://luckyframework.org/guides/browser-tests/
