-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ♻️ Split end-to-end tests into separate workflows * ✅ Add missing test for clearing the seed * ✨ Add tag filtering settings * ✨ Extract tag filter options from initial command line * ✨ Add tag filtering commands * ✅ Add end-to-end test for tag filtering * ✨ Include tag filters in run summary * 🚸 Sort help message by command * 📝 Add tag filter commands to docs * ✅ Sort settings on command line The sort order is different in older Elixir versions, so this adds consistency.
- Loading branch information
1 parent
aa6a2b5
commit c8b88a5
Showing
12 changed files
with
496 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
defmodule MixTestInteractive.Command.Exclude do | ||
@moduledoc """ | ||
Specify or clear tags to exclude. | ||
Runs the tests excluding the given tags if provided. If not provided, the | ||
excludes are cleared and the tests will run with any excludes configured in | ||
your `ExUnit.configure/1` call (if any). | ||
""" | ||
use MixTestInteractive.Command, command: "x", desc: "set or clear excluded tags" | ||
|
||
alias MixTestInteractive.Command | ||
alias MixTestInteractive.Settings | ||
|
||
@impl Command | ||
def name, do: "x [<tags...>]" | ||
|
||
@impl Command | ||
def run([], %Settings{} = settings) do | ||
{:ok, Settings.clear_excludes(settings)} | ||
end | ||
|
||
@impl Command | ||
def run(tags, %Settings{} = settings) do | ||
{:ok, Settings.with_excludes(settings, tags)} | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
defmodule MixTestInteractive.Command.Include do | ||
@moduledoc """ | ||
Specify or clear tags to include. | ||
Runs the tests excluding the given tags if provided. If not provided, the | ||
includes are cleared and the tests will run with any includes configured in | ||
your `ExUnit.configure/1` call (if any). | ||
""" | ||
use MixTestInteractive.Command, command: "i", desc: "set or clear included tags" | ||
|
||
alias MixTestInteractive.Command | ||
alias MixTestInteractive.Settings | ||
|
||
@impl Command | ||
def name, do: "i [<tags...>]" | ||
|
||
@impl Command | ||
def run([], %Settings{} = settings) do | ||
{:ok, Settings.clear_includes(settings)} | ||
end | ||
|
||
@impl Command | ||
def run(tags, %Settings{} = settings) do | ||
{:ok, Settings.with_includes(settings, tags)} | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
defmodule MixTestInteractive.Command.Only do | ||
@moduledoc """ | ||
Specify or clear the only tags to run. | ||
Runs the tests with only the given tags if provided. If not provided, the list | ||
of only tags is cleared and the tests will run with any only configured in | ||
your `ExUnit.configure/1` call (if any). | ||
""" | ||
use MixTestInteractive.Command, command: "o", desc: "set or clear only tags" | ||
|
||
alias MixTestInteractive.Command | ||
alias MixTestInteractive.Settings | ||
|
||
@impl Command | ||
def name, do: "o [<tags...>]" | ||
|
||
@impl Command | ||
def run([], %Settings{} = settings) do | ||
{:ok, Settings.clear_only(settings)} | ||
end | ||
|
||
@impl Command | ||
def run(tags, %Settings{} = settings) do | ||
{:ok, Settings.with_only(settings, tags)} | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.