From 88f28d3424bffc2625b920f5545ff3178ca0e7e9 Mon Sep 17 00:00:00 2001 From: Orion Kindel Date: Fri, 29 Sep 2023 22:36:12 -0500 Subject: [PATCH] fix: warnings --- spago.dhall | 2 -- src/Puppeteer.Handle.purs | 6 ++---- test/Puppeteer.Page.Spec.purs | 2 +- test/Puppeteer.Spec.purs | 2 +- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/spago.dhall b/spago.dhall index 847fd92..fd1da6f 100644 --- a/spago.dhall +++ b/spago.dhall @@ -34,11 +34,9 @@ to generate this file without the comments in this block. , "node-path" , "node-process" , "node-streams" - , "node-url" , "nullable" , "ordered-collections" , "parallel" - , "partial" , "prelude" , "simple-json" , "spec" diff --git a/src/Puppeteer.Handle.purs b/src/Puppeteer.Handle.purs index 5c8966a..7bf7ac5 100644 --- a/src/Puppeteer.Handle.purs +++ b/src/Puppeteer.Handle.purs @@ -31,20 +31,18 @@ import Data.Map (Map) import Data.Maybe (Maybe(..)) import Data.Nullable (Nullable) import Data.Nullable as Nullable -import Effect (Effect) import Effect.Aff (Aff) -import Foreign (Foreign, unsafeToForeign) +import Foreign (Foreign) import Node.Buffer (Buffer) import Node.Path (FilePath) import Puppeteer.Base (Handle) as X import Puppeteer.Base (class IsElement, Handle) -import Puppeteer.Cartesian (Coord) import Puppeteer.Eval as Eval import Puppeteer.FFI as FFI import Puppeteer.Screenshot (ScreenshotOptions, prepareScreenshotOptions) import Puppeteer.Selector (class Selector) import Puppeteer.Selector as Selector -import Simple.JSON (class ReadForeign, class WriteForeign, writeJSON) +import Simple.JSON (class ReadForeign, class WriteForeign) import Unsafe.Coerce (unsafeCoerce) import Web.HTML (HTMLElement) import Web.HTML as HTML diff --git a/test/Puppeteer.Page.Spec.purs b/test/Puppeteer.Page.Spec.purs index d71474e..5ee3eb4 100644 --- a/test/Puppeteer.Page.Spec.purs +++ b/test/Puppeteer.Page.Spec.purs @@ -177,7 +177,7 @@ spec = beforeAll (Pup.launch_ =<< Pup.puppeteer unit) input <- liftMaybe (error "no inputs!") =<< Pup.Page.findFirst "input" p input' <- liftMaybe (error "not an input!") =<< Pup.Handle.HTML.toHTMLInputElement input shouldEqual "" =<< Pup.Handle.HTML.value input' - Pup.Handle.focus input + Pup.Handle.click input kb <- liftEffect $ Pup.Page.keyboard p Pup.Keyboard.doType "foo bar bingus bat" kb shouldEqual "foo bar bingus bat" =<< Pup.Handle.HTML.value input' diff --git a/test/Puppeteer.Spec.purs b/test/Puppeteer.Spec.purs index 68908d1..40b3fc1 100644 --- a/test/Puppeteer.Spec.purs +++ b/test/Puppeteer.Spec.purs @@ -12,7 +12,7 @@ import Puppeteer.Browser.Spec as Spec.Browser import Puppeteer.Handle.Spec as Spec.Handle import Puppeteer.Page.Spec as Spec.Page import Puppeteer.Selector.Spec as Spec.Selector -import Test.Spec (SpecT, describe, mapSpecTree, parallel) +import Test.Spec (SpecT, describe, mapSpecTree) import Test.Spec.Assertions (shouldEqual) import Test.Util (test)