Skip to content

Commit

Permalink
set preferred_cli_env for mix coveralls.json task to :test #53
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonic committed Mar 13, 2022
1 parent 3c16d10 commit 1636477
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 13 deletions.
15 changes: 6 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,15 @@ to add their own features.

# What? 📱 🛌

This App is the simplest possible **sleep tracker**
(_other than using a notepad + pen
or a notes App on your phone ..._)

This App is the simplest possible **sleep tracker**.
<!-- other than using a notepad + pen
or notes App ... -->
A **_deliberately_ basic** version of an App is
commonly referred to as Minimum Viable Product ("MVP")
which means it has the minimum features to be useful,
but leaves a lot enhancements out.

but leaves the possible enhancements out.
If you think of a feature/improvement, _please_
[**open an issue**!](https://github.com/dwyl/sleep/issues). <br />
[**open an issue**!](https://github.com/dwyl/sleep/issues).
**Contributions/ideas** are **_always_ welcome**
and we're delighted to extend this
in response to feedback!
Expand Down Expand Up @@ -262,8 +260,7 @@ and you have a reference implementation
that you _know_ works on your computer,
it's time to write some **`code`**

## `GOTO:`
[`tutorial.md`](https://github.com/dwyl/sleep/blob/main/tutorial.md)
## `GOTO:` [`tutorial.md`](https://github.com/dwyl/sleep/blob/main/tutorial.md)

<br />

Expand Down
3 changes: 2 additions & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ defmodule App.MixProject do
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test
"coveralls.html": :test,
"coveralls.json": :test
],
package: package(),
description: "Turnkey Auth Auth Application"
Expand Down
40 changes: 37 additions & 3 deletions tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,18 +305,21 @@ you should see something similar to this:

<img width="726" alt="image" src="https://user-images.githubusercontent.com/194400/159721352-7a53f510-9cce-402a-a7df-5f17e00a129a.png">

The App doesn't _do_ anything yet,
but at least we know it _renders_.

<br />

## 7. Update Tests

If you attempt to run the tests in the project now:
Following the changes we made above,
if you attempt to run the tests in the project now:

```sh
mix test
```

One of the tests will fail:

You will see that one of the tests fail:

```elixir
Generated app app
Expand All @@ -332,6 +335,13 @@ Generated app app
test/app_web/controllers/page_controller_test.exs:6: (test)
```

It's pretty obvious _why_ the test is failing ...
we removed the "**Welcome to Phoenix!**" text from the template.

Let's _fix_ the failing test.

### 7.1 Rename the Test File

First given that we won't be using
`controllers` in this App,
rename the test folder from:
Expand All @@ -352,6 +362,8 @@ e.g:
mv test/app_web/live/page_controller_test.exs test/app_web/live/app_live_test.exs
```

### 7.2 Update the Test

Then open the
`test/app_web/live/app_live_test.exs`
file and
Expand All @@ -369,6 +381,8 @@ defmodule AppWeb.AppLiveTest do
end
```

### 7.3 Re-run the Tests

Now when you re-run the tests:

```sh
Expand All @@ -387,5 +401,25 @@ Randomized with seed 575721
```


## 8. Create Database Schema

We could work on the interface first
and then figure out how to store data


## X. Start a Sleep Timer

## X. Stop a Running Sleep Timer

## X. Display Past Timers




## X. Authentication





[![HitCount](http://hits.dwyl.com/dwyl/sleep-tutorial.svg?style=flat-square)](http://hits.dwyl.com/dwyl/sleep)

0 comments on commit 1636477

Please sign in to comment.