Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

js_errors: false config is being ignored #746

Open
1 task done
rails4sandeep opened this issue Aug 21, 2023 · 0 comments
Open
1 task done

js_errors: false config is being ignored #746

rails4sandeep opened this issue Aug 21, 2023 · 0 comments

Comments

@rails4sandeep
Copy link

rails4sandeep commented Aug 21, 2023

Elixir and Erlang/OTP versions

Erlang/OTP 26 [erts-14.0.2] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [jit:ns] [dtrace]

Elixir 1.15.4 (compiled with Erlang/OTP 26)

Operating system

Mac OSX Ventura 13.3.1

Browser

Chrome

Driver

Chromedriver

Correct Configuration

  • I confirm that I have Wallaby configured correctly.

Current behavior

Config:

import Config

config :wallaby,
  js_errors: false
  driver: Wallaby.Chrome

import_config "#{config_env()}.exs"

Sample Test:

Application.ensure_all_started(:wallaby)

defmodule UitestsTest do
  use Wallaby.DSL
  use ExUnit.Case
  doctest Uitests

  test "greets the world" do
    assert Uitests.hello() == :world
  end

  test "hello wallaby" do
    {:ok, session} = Wallaby.start_session()

    session
    |> visit("our_website_url")
    |> page_title()
    |> IO.inspect()

   Wallaby.end_session(session)
  end
end

Test fails with error

** (Wallaby.JSError) There was an uncaught JavaScript error:

Expected behavior

As per the other issues and documentation, this should make wallaby ignore the js errors?

Test Code & HTML

stacktrace: (wallaby 0.30.6) lib/wallaby/chrome/logger.ex:8: Wallaby.Chrome.Logger.parse_log/1 (elixir 1.15.4) lib/enum.ex:984: Enum."-each/2-lists^foreach/1-0-"/2 (wallaby 0.30.6) lib/wallaby/driver/log_checker.ex:12: Wallaby.Driver.LogChecker.check_logs!/2 (wallaby 0.30.6) lib/wallaby/browser.ex:1269: Wallaby.Browser.visit/2 test/uitests_test.exs:16: (test)

Demonstration Project

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant