-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set up wallaby and add a feature test
Followed the instructions in the wallaby readme, using chromdriver because that seems to be the most common setup that works well for people, based on looking around the elixir forum closes #311
- Loading branch information
1 parent
94bf233
commit 4758f92
Showing
7 changed files
with
50 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,9 @@ version: 2.1 | |
|
||
description: Common jobs for testing and building phoenix applications | ||
|
||
orbs: | ||
browser-tools: circleci/[email protected] | ||
node: circleci/[email protected] | ||
executors: | ||
builder: | ||
docker: | ||
|
@@ -97,6 +100,7 @@ jobs: | |
run-unit-tests: | ||
executor: builder | ||
steps: | ||
- browser-tools/install-chrome | ||
- checkout | ||
- install-deps: | ||
include-assets: false | ||
|
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
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,18 @@ | ||
defmodule DpulCollectionsWeb.Features.LocaleTest do | ||
use ExUnit.Case, async: true | ||
use Wallaby.Feature | ||
|
||
import Wallaby.Query | ||
|
||
feature "locale persists between pages", %{session: session} do | ||
session | ||
|> visit("/") | ||
|> assert_has(css("h3", text: "Explore Our Digital Collections")) | ||
|> click(button("Language")) | ||
|> click(link("Español")) | ||
|> assert_has(css("h3", text: "Explora nuestras colecciones")) | ||
|> click(button("Buscar")) | ||
|> assert_has(css("div#filters", text: "Relevancia")) | ||
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 |
---|---|---|
@@ -1,2 +1,5 @@ | ||
ExUnit.start() | ||
Ecto.Adapters.SQL.Sandbox.mode(DpulCollections.Repo, :manual) | ||
|
||
{:ok, _} = Application.ensure_all_started(:wallaby) | ||
Application.put_env(:wallaby, :base_url, DpulCollectionsWeb.Endpoint.url) |