Commit Graph

9 Commits

Author SHA1 Message Date
Abdullah Atta
6ae1674de5 web: fix tests 2025-10-03 11:59:53 +05:00
Abdullah Atta
a5faa4acea web: fix checkout (and make it load faster) 2024-11-08 17:06:17 +05:00
Abdullah Atta
59a66a63c5 web: update all checkout snapshots 2023-08-05 13:52:19 +05:00
Abdullah Atta
d2f39df3bf web: make tests more reliable 2023-02-23 15:14:49 +05:00
Abdullah Atta
9116a24392 global: update license year to 2023 2023-01-16 13:48:28 +05:00
Abdullah Atta
a0ad4403cb web: fix checkout tests 2023-01-06 17:44:07 +05:00
Abdullah Atta
446bec83e7 web: revert "make checkout tests run in parallel" 2022-09-16 09:31:20 +05:00
Abdullah Atta
e4720c4ca9 web: make checkout tests run in parallel 2022-09-16 08:06:13 +05:00
Abdullah Atta
d31a43b463 web: rewrite the whole test suite to be more resilient
**Why?**
The old test suite was a confusing mess, hard to maintain, update, and
add more tests to. It lacked a much needed layer of expressivity &
the reusable functions were all over the place.
Since it used a global `page` (by mistake), it couldn't run in parallel.
Moreover, the global `page` approach caused random flakiness.

All the above reasons led to this OM (Object Model) based approach to tests.
The tests are now much more expressive, reslient, resuable & easier to
maintain. During the rewriting process I also added a couple more
tests (about 10) so this is a net improvement.

Previously, running the tests were also quite slow (15-25s avg). This has
now been improved to (5-8s avg) by running the tests in production.
This means the app now requires to be built before running the tests:

```sh
npm run build:test:web # this is only required once
npm run test:web
```
2022-09-14 11:50:24 +05:00