-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #56 from mechanical-orchard/issue-55--locator.wait…
…_for Fix: make `Locator.wait_for` timeout safe
- Loading branch information
Showing
10 changed files
with
113 additions
and
75 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
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 |
---|---|---|
@@ -1,17 +1,30 @@ | ||
defmodule Playwright.SDK.Channel.Error do | ||
@moduledoc false | ||
# `Error` represents an error message received from the Playwright server that is | ||
# in response to a `Message` previously sent. | ||
# `Error` represents an error message received from the Playwright server | ||
# that is in response to a `Message` previously sent. | ||
alias Playwright.SDK.Channel | ||
|
||
@enforce_keys [:message] | ||
defstruct [:message] | ||
@enforce_keys [:type, :message] | ||
defstruct [:type, :message] | ||
|
||
@type t() :: %__MODULE__{message: String.t()} | ||
@type t() :: %__MODULE__{ | ||
type: String.t(), | ||
message: String.t() | ||
} | ||
|
||
def new(%{error: error}, _catalog) do | ||
def new(%{error: %{name: name, message: message} = _error}, _catalog) do | ||
%Channel.Error{ | ||
message: String.split(error.message, "\n") |> List.first() | ||
type: name, | ||
message: String.split(message, "\n") |> List.first() | ||
} | ||
end | ||
|
||
# TODO: determine why we get here... | ||
# DONE: see comment at error_handling.ex:9. | ||
def new(%{error: %{message: message} = _error}, _catalog) do | ||
%Channel.Error{ | ||
type: "NotImplementedError", | ||
message: String.split(message, "\n") |> List.first() | ||
} | ||
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
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