sydtest-yesod 0.3.0.1 → 0.3.0.2
raw patch · 6 files changed
+18/−6 lines, 6 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +6/−0
- LICENSE.md +1/−1
- blog-example/Example/Blog.hs +1/−0
- src/Test/Syd/Yesod/E2E.hs +2/−0
- src/Test/Syd/Yesod/Request.hs +5/−1
- sydtest-yesod.cabal +3/−4
CHANGELOG.md view
@@ -1,5 +1,11 @@ # Changelog +## [0.3.0.2] - 2023-10-09++### Added++* Compatiblity with `GHC >= 9.8`.+ ## [0.3.0.1] - 2022-08-21 ### Added
LICENSE.md view
@@ -1,5 +1,5 @@ # Sydtest License -Copyright (c) 2020-2021 Tom Sydney Kerckhove+Copyright (c) 2020-2023 Tom Sydney Kerckhove See the Sydtest License at https://github.com/NorfairKing/sydtest/blob/master/sydtest/LICENSE.md for the full license text.
blog-example/Example/Blog.hs view
@@ -12,6 +12,7 @@ {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE ViewPatterns #-}
src/Test/Syd/Yesod/E2E.hs view
@@ -6,6 +6,8 @@ {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-}+-- Because we don't need Eq (Route site) in newer versions of Yesod.+{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} module Test.Syd.Yesod.E2E where
src/Test/Syd/Yesod/Request.hs view
@@ -323,7 +323,11 @@ matches <- liftClient $ htmlQuery $ scope <> " input[name=_token][type=hidden][value]" case matches of [] -> liftIO $ expectationFailure "No CSRF token found in the current page"- [element] -> addPostParam "_token" $ head $ C.attribute "value" $ YesodTest.parseHTML element+ [element] -> do+ t <- case listToMaybe $ C.attribute "value" $ YesodTest.parseHTML element of+ Nothing -> liftIO $ expectationFailure "Expected a value attribute"+ Just t -> pure t+ addPostParam "_token" t _ -> liftIO $ expectationFailure "More than one CSRF token found in the page" -- | Look up the CSRF token from the only form data and add it to the request header
sydtest-yesod.cabal view
@@ -1,18 +1,18 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.7.+-- This file has been generated from package.yaml by hpack version 0.35.2. -- -- see: https://github.com/sol/hpack name: sydtest-yesod-version: 0.3.0.1+version: 0.3.0.2 synopsis: A yesod companion library for sydtest category: Testing homepage: https://github.com/NorfairKing/sydtest#readme bug-reports: https://github.com/NorfairKing/sydtest/issues author: Tom Sydney Kerckhove maintainer: syd@cs-syd.eu-copyright: Copyright (c) 2020-2021 Tom Sydney Kerckhove+copyright: Copyright (c) 2020-2023 Tom Sydney Kerckhove license: OtherLicense license-file: LICENSE.md build-type: Simple@@ -106,7 +106,6 @@ , conduit , cookie , http-client- , http-types , path , path-io , sydtest