Skip to content

Commit

Permalink
Fix build of reflex-dom-test-selenium
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfmpe committed Apr 12, 2024
1 parent 5d1dbde commit 0dd3ab4
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions reflex-dom-test-selenium/src/Reflex/Dom/Test/Selenium.hs
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ import qualified Test.Hspec.Core.Spec as Hspec
import qualified Test.WebDriver as WD
import qualified Test.WebDriver.Capabilities as WD

deriving instance MonadMask WD

data SeleniumSetupConfig = SeleniumSetupConfig
{ _seleniumSetupConfig_chromiumPath :: FilePath
-- ^ Path to the chromium executable
Expand Down Expand Up @@ -116,7 +114,7 @@ type TestWidget t m =
data TestWidgetConfig = TestWidgetConfig
{ _testWidgetConfig_debug :: Bool
-- ^ If this flag is set to True, during the test we will emit debug messages
, _testWidgetConfig_headWidget :: (forall m js. TestWidget js (SpiderTimeline Global) m => m ())
, _testWidgetConfig_headWidget :: (forall m. TestWidget (SpiderTimeline Global) m => m ())
-- ^ We can add widgets here that will be included in the head of the page
-- (useful for example to include external js libraries in the tests)
, _testWidgetConfig_jsaddlePort :: PortNumber
Expand All @@ -131,7 +129,7 @@ testWidget
-- ^ Webdriver commands to run before the JS runs (i.e. on the statically rendered page)
-> WD b
-- ^ Webdriver commands to run after hydration switchover
-> (forall m js. TestWidget js (SpiderTimeline Global) m => m ())
-> (forall m. TestWidget (SpiderTimeline Global) m => m ())
-- ^ Widget we are testing (contents of body)
-> WD b
testWidget cfg before after widget = testWidget' cfg before (const after) widget
Expand All @@ -142,7 +140,7 @@ testWidgetStatic
:: TestWidgetConfig
-> WD a
-- ^ Webdriver commands to run before the JS runs (i.e. on the statically rendered page)
-> (forall m js. TestWidget js (SpiderTimeline Global) m => m ())
-> (forall m. TestWidget (SpiderTimeline Global) m => m ())
-- ^ Widget we are testing (contents of body)
-> WD a
testWidgetStatic cfg before widget = testWidget' cfg before pure widget
Expand All @@ -152,7 +150,7 @@ testWidgetHydrated
:: TestWidgetConfig
-> WD b
-- ^ Webdriver commands to run after hydration switchover
-> (forall m js. TestWidget js (SpiderTimeline Global) m => m ())
-> (forall m . TestWidget (SpiderTimeline Global) m => m ())
-- ^ Widget we are testing (contents of body)
-> WD b
testWidgetHydrated cfg after widget = testWidget' cfg (pure ()) (const after) widget
Expand All @@ -166,7 +164,7 @@ testWidget'
-- ^ Webdriver commands to run before the JS runs (i.e. on the statically rendered page)
-> (a -> WD b)
-- ^ Webdriver commands to run after hydration switchover
-> (forall m js. TestWidget js (SpiderTimeline Global) m => m ())
-> (forall m. TestWidget (SpiderTimeline Global) m => m ())
-- ^ Widget we are testing (contents of body)
-> WD b
testWidget' (TestWidgetConfig withDebugging headWidget jsaddlePort) beforeJS afterSwitchover bodyWidget = do
Expand Down

0 comments on commit 0dd3ab4

Please sign in to comment.