Commit Graph

8479 Commits

Author SHA1 Message Date
Abdullah Atta
555f848ab0 web: convert playwright config to typescript 2022-09-16 08:06:31 +05:00
Abdullah Atta
e4720c4ca9 web: make checkout tests run in parallel 2022-09-16 08:06:13 +05:00
Abdullah Atta
0ae2c6cc17 ci: provide correct path for test-results dir 2022-09-16 00:31:03 +05:00
Abdullah Atta
78a5715757 ci: upload test results on failure for web.tests 2022-09-16 00:12:25 +05:00
Abdullah Atta
926043d222 web: set icons' stroke width to 0 2022-09-15 13:51:23 +05:00
Abdullah Atta
dba1fe41e5 misc: add serve package for running web tests 2022-09-14 12:05:53 +05:00
Abdullah Atta
554e9758ed ci: update web.tests workflow to run the new test suite 2022-09-14 11:50:24 +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
Abdullah Atta
a6c3aeac84 web: editor doesn't detect focus mode 2022-09-14 11:44:04 +05:00
Abdullah Atta
5fb91d9229 web: restoring locked session doesn't update content 2022-09-14 11:44:04 +05:00
Abdullah Atta
0e9d2dcd5e web: allow changing plans when claiming an offer via url 2022-09-14 11:44:04 +05:00
Abdullah Atta
9a77d2e93d web: migrate editor footer to typescript 2022-09-14 11:44:04 +05:00
Abdullah Atta
9638b55f02 web: migrate move note dialog to typescript 2022-09-14 11:44:04 +05:00
Abdullah Atta
c8423333f1 web: migrate icon component to typescript 2022-09-14 11:44:04 +05:00
Abdullah Atta
84417c496f web: migrate navigation menu to typescript 2022-09-14 11:44:04 +05:00
Abdullah Atta
ab5d4fcbb1 web: refresh notes on tag deletion
this is required so any referenced note in the deleted tag get updated.
2022-09-14 11:44:04 +05:00
Abdullah Atta
5e886dc7b5 web: use correct plural/singular form in toasts
e.g. before it was "1 notes deleted" and now it is "1 note deleted"
2022-09-14 11:44:04 +05:00
Abdullah Atta
c954590585 core: look into topics when searching notebooks 2022-09-14 11:44:04 +05:00
ammarahm-ed
df50ece50d editor: don't open already opened popup again 2022-09-13 11:54:33 +05:00
ammarahm-ed
881771a14f editor: fix clicking on link resets editor on mobile 2022-09-13 09:11:36 +05:00
ammarahm-ed
797670f2ef editor: fix popups not opening 2022-09-13 09:10:35 +05:00
Abdullah Atta
ddc370ad17 web: run all tests 2022-09-09 16:11:11 +05:00
Abdullah Atta
5e64e06f52 web: use npm ci instead of npm install 2022-09-09 16:04:04 +05:00
Abdullah Atta
2e42c92674 web: only run tests on chromium 2022-09-09 15:59:29 +05:00
Abdullah Atta
53047f035e web: reduce tests flakiness 2022-09-09 15:42:52 +05:00
Abdullah Atta
cc36951b94 ci: add @notesnook/web e2e tests workflow 2022-09-09 12:12:17 +05:00
Abdullah Atta
f414b34d39 ci: add ats-diagnostics test for payments endpoint 2022-09-09 11:48:33 +05:00
Abdullah Atta
a7901b0323 core: sku property in pricing test should be generic 2022-09-09 01:17:27 +05:00
Abdullah Atta
3f73b47121 core: use generic snapshot for pricing test
this is because the pricing response data contains location based data like
country, countryCode, pricing etc. Running it on different
computers will generate different data. To avoid this we
should test only the types of each property using `jest`'s
propertyMatchers
2022-09-09 01:12:45 +05:00
Abdullah Atta
78c1df8723 core: add pricing test snapshot 2022-09-09 00:56:43 +05:00
Abdullah Atta
15e40b612e config: test:core -> test:e2e 2022-09-09 00:47:40 +05:00
Abdullah Atta
553752d947 ci: wrap PASSWORD env_var in single quotes 2022-09-09 00:37:05 +05:00
Abdullah Atta
23c5bca155 ci: allow running @notesnook/core tests workflow manually 2022-09-09 00:28:19 +05:00
Abdullah Atta
6171b95f01 ci: add credentials to env_vars pre running tests 2022-09-09 00:24:13 +05:00
Abdullah Atta
a5a7f4734f config: run dependent tasks before running tests 2022-09-09 00:23:32 +05:00
Abdullah Atta
42c745088a ci: add @notesnook/core test workflow 2022-09-09 00:14:21 +05:00
Abdullah Atta
1af273c9d3 web: add delay to avoid flakiness in tag test 2022-09-08 23:57:13 +05:00
Abdullah Atta
4c1070af56 web: content overlaps on switching notes very fast 2022-09-08 23:57:13 +05:00
ammarahm-ed
c8dc5207b4 core: fix auto sync does not send sync complete event 2022-09-08 18:30:49 +05:00
Abdullah Atta
0bb7c2dbb9 docs: remove coupon code offer 2022-09-08 16:08:52 +05:00
Abdullah Atta
ccac962151 web: fix minor ui issues due to theme-ui migration 2022-09-08 16:08:38 +05:00
Abdullah Atta
6925f328f3 web: simplify invalid coupon code handling
this fixes a lot of issues when applying coupon codes, especially:
- issue where a default initial loop could not be removed
- issue where valid codes would appear invalid
2022-09-08 16:08:10 +05:00
Abdullah Atta
f60fc39ec0 web: fix e2e tests that download files 2022-09-08 13:53:12 +05:00
Abdullah Atta
bcc14a785f web: update checkout tests snapshots 2022-09-08 13:46:19 +05:00
Abdullah Atta
973417ce2c web: bypass onboarding dialog during debug & tests 2022-09-08 13:40:01 +05:00
ammarahm-ed
9c3219638d mobile: add a ? check before checking if note exists 2022-09-08 13:39:06 +05:00
ammarahm-ed
5689254211 mobile: fix notes.length > getTotalNote() 2022-09-08 13:39:06 +05:00
ammarahm-ed
b5d8840259 mobile: use topicReferences to query if note exists in topic 2022-09-08 13:39:06 +05:00
ammarahm-ed
15a8e0a511 mobile: find notebook that exists and return it 2022-09-08 13:39:06 +05:00
ammarahm-ed
0e61731500 mobile: get total count on notebook & topic from db 2022-09-08 13:39:06 +05:00