Skip to content

Commit

Permalink
Open PhantomJS in a bigger window to avoid responsive layout issues
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagogabriel committed Jun 29, 2016
1 parent bde0148 commit 00a19bd
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 7 deletions.
8 changes: 1 addition & 7 deletions test/integration/main_test.exs
@@ -1,11 +1,5 @@
defmodule PhoenixHoundIssue_116.MainTest do
use PhoenixHoundIssue_116.ConnCase

# Import Hound helpers
use Hound.Helpers

# Start a Hound session
hound_session
use PhoenixHoundIssue_116.IntegrationCase

test "GET /" do
navigate_to "/"
Expand Down
36 changes: 36 additions & 0 deletions test/support/integration_case.ex
@@ -0,0 +1,36 @@
defmodule PhoenixHoundIssue_116.IntegrationCase do
use ExUnit.CaseTemplate

using do
quote do
use Hound.Helpers

import Ecto.Model
import Ecto.Query, only: [from: 2]
import PhoenixHoundIssue_116.Router.Helpers

alias PhoenixHoundIssue_116.Repo

# The default endpoint for testing
@endpoint PhoenixHoundIssue_116.Endpoint

hound_session
end
end

setup(context \\ %{}) do
Hound.start_session(Map.get(context, :hound_options, []))
Hound.Helpers.Window.current_window_handle
|> Hound.Helpers.Window.maximize_window

:ok
end

setup tags do
unless tags[:async] do
Ecto.Adapters.SQL.restart_test_transaction(PhoenixHoundIssue_116.Repo, [])
end

:ok
end
end

0 comments on commit 00a19bd

Please sign in to comment.