Commit Graph

297 Commits

Author SHA1 Message Date
Yitz Gale
26de905117 Use haddock @since notation 2023-09-19 17:50:20 +03:00
Yitz Gale
32b609e93f Add PR link to ChangeLog.md 2023-09-19 13:13:06 +00:00
Yitz Gale
8534caa05a Add addBareGetParam to yesod-test 2023-09-19 13:10:12 +00:00
Michael Snoyman
5ac0138697
Minor version bump on yesod-test 2022-09-22 09:48:42 +03:00
Eric Ahlberg
bca75573b8 Update changelog 2022-09-21 13:50:50 +02:00
Eric Ahlberg
6c2a20699a Refactor 2022-09-21 13:50:50 +02:00
Eric Ahlberg
bd86b4db7a Add bySelectorLabelContain 2022-09-21 13:50:50 +02:00
Eric Ahlberg
b28ee833d1 Add tests 2022-09-21 10:34:02 +02:00
Derek Gustafson
7721b65f58
Remove deprecated function from testing example
byLabel has been deprecated, but is still used as an example.
2022-08-25 17:07:07 -04:00
Michael Snoyman
99c1fd49a3
Merge branch 'patch-1' of https://github.com/friedbrice/yesod 2022-05-11 14:44:27 +03:00
Daniel P. Brice
b8de71c5ab
Update ChangeLog.md 2022-05-10 13:31:34 -07:00
Jappie Klooster
b88b1f430f Add link to PR 2022-05-10 16:27:28 -04:00
Daniel P. Brice
d5a194a7dd
Update yesod-test.cabal 2022-05-10 13:25:45 -07:00
Daniel P. Brice
8028f1defd
assertEq delegates to HUnit.assertEqual
HUnit.assertEqual gives a formatted diff, making it easier to see the differences between the two values at a glance.
2022-05-10 13:24:21 -07:00
Jappie Klooster
5f3e237c29 Bump version and add changes 2022-05-10 16:24:07 -04:00
Jappie Klooster
28fc2269b0 Fix quote ' not matching in any body
This sometimes occured in our code base when generating
names with the fakedata package, someone named o'conner
randomly fails a particular test.

Also add tests for the other matching function and fixed them.

Furthermore, I snuck in logging of the matches as well.
2022-05-10 16:20:35 -04:00
parsonsmatt
ef4178f4c8 Add runSIO, changelog, version bump 2022-04-14 08:50:41 -06:00
parsonsmatt
60d0748834 Expose SIO type 2022-04-13 16:27:01 -06:00
Michael Snoyman
19bd528ac7
Version bump 2020-12-16 05:45:46 +02:00
Asad Saeeduddin
63afa32fa0
Add MPTC extension 2020-12-15 21:34:16 -05:00
Asad Saeeduddin
7695803af5
Fix ambiguous get/put issue 2020-12-15 20:48:20 -05:00
Asad Saeeduddin
210c992601
Add MTL dependency 2020-12-15 19:59:28 -05:00
Asad Saeeduddin
a1e708107b
Add MonadState instance for SIO 2020-12-15 19:59:28 -05:00
Eric Ahlberg
383149c0af Update changelog 2020-12-14 14:30:08 +01:00
Eric Ahlberg
44895915ea Fix import in cookie example 2020-12-14 10:39:50 +01:00
patrick brisbin
761dbc7753
Update yesod-test ChangeLog 2020-12-01 12:00:45 -05:00
patrick brisbin
cb06004044
yesod-test version bump 2020-12-01 11:57:46 -05:00
patrick brisbin
07d76095a7
Add missing HasCallStack
As far as I could tell, all of these functions call failure, or call
things that call failure.
2020-12-01 11:56:37 -05:00
patrick brisbin
24acd4e3b7
Add missing HasCallStack
Even though functions that use this one all have HasCallStack, the fact
that this function itself doesn't means that all errors are reported as
from this line anyway:

    Failures:

      ./Yesod/Test.hs:1571:28:
      1) ...

This should correct that.
2020-12-01 11:49:29 -05:00
Felix Yan
672b82d510
Drop dependency on semigroups
They are not needed on GHC we support.
2020-08-02 17:30:19 +08:00
Maximilian Tagher
1d67e3a359 1.6.10 2020-06-21 20:27:35 -04:00
Maximilian Tagher
28e5b606b2 attempt to fix 8.2 2020-06-20 17:27:13 -04:00
Maximilian Tagher
4ddff42847 .. 2020-06-20 15:01:51 -04:00
Maximilian Tagher
f50d23ce49 .. 2020-06-20 15:01:26 -04:00
Maximilian Tagher
8f00e76257 .. 2020-06-20 14:56:19 -04:00
Maximilian Tagher
34927e3401 .. 2020-06-20 14:54:31 -04:00
Maximilian Tagher
2ddc63e66a When statusIs fails, print a preview of the body
My team makes frequent use of `statusIs`, but in virtually all cases where `statusIs` fails, we need to add a call to `printBody` to do further debugging.

Following in the footsteps of `requireJSONResponse`, this PR automatically prints a portion of the body when `statusIs` fails, assuming the body looks like a text-based response (e.g. not a JPEG).

I've found that a status code alone is often very misleading and leads people on a wild good chase, because e.g. a 403 could be triggered for many different reasons.

I'm opening this PR as a draft to confirm people like the idea of doing this. If so I'll do a closer review of the code (this is my first draft basically), and also write some tests + test the code works in all cases.
2020-06-17 17:31:00 -04:00
Maximilian Tagher
e7cf662af7 Update yesod-test cabal file for distribution
Hackage is now requiring a higher cabal file version, and with that comes a requirement to specify the language of each module
2020-06-01 14:54:39 -04:00
Maximilian Tagher
d03c095b63 Add bumped GHC dependency in yesod-test changelog 2020-06-01 11:53:03 -04:00
Maximilian Tagher
5c33dcb518 .. 2020-05-31 16:56:09 -04:00
Maximilian Tagher
8e89ec0e40 .. 2020-05-31 16:38:48 -04:00
Maximilian Tagher
ab8a994a34 .. 2020-05-31 16:38:09 -04:00
Maximilian Tagher
c3fa2adddd Add more documentation to yesod-test
This adds high-level documentation to yesod-test, plus some function documentation
2020-05-31 16:35:27 -04:00
Michael Snoyman
804b114d91
Drop LTS 9 2020-01-07 13:36:58 +02:00
Maximilian Tagher
4f51153b09 Require latest yesod-core for yesod-test
(This was missing from #1646)
2019-12-01 08:06:10 -05:00
Maximilian Tagher
8ee771896c .. 2019-11-29 10:46:25 -05:00
Maximilian Tagher
561adc2e17 .. 2019-11-29 10:44:49 -05:00
Maximilian Tagher
42d41f77de .. 2019-11-29 10:43:11 -05:00
Maximilian Tagher
0025226af6 Print preview of JSON body in case of parse failure 2019-11-28 22:33:00 -05:00
Maximilian Tagher
91b75741dd .. 2019-11-24 16:11:50 -05:00