From 93b728034dce4e3c70f81b970d4f77f8813e5fce Mon Sep 17 00:00:00 2001 From: Fredrik Teschke Date: Sun, 6 Oct 2024 11:17:39 +0200 Subject: [PATCH] Handle more websocket responses for phoenix_test --- lib/playwright/sdk/channel/response.ex | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/playwright/sdk/channel/response.ex b/lib/playwright/sdk/channel/response.ex index 211c4f59..b9ba64d5 100644 --- a/lib/playwright/sdk/channel/response.ex +++ b/lib/playwright/sdk/channel/response.ex @@ -93,6 +93,18 @@ defmodule Playwright.SDK.Channel.Response do values end + defp parse([{:matches, matches}], _catalog) do + matches + end + + defp parse([{:matches, matches}, {:received, _}], _catalog) do + matches + end + + defp parse([{:log, _}, {:matches, matches}, {:received, _}, {:timedOut, true}], _catalog) do + matches + end + defp parse([], _catalog) do nil end