Rostislav Wolny
1d32461b3d
Workaround for the issue with chai v5 and ES modules
...
I couldn't make it work with the Babel loader. There is a possible
solution using ts-node as a loader. I didn't want to install another
package, so I chose a different workaround.
mocha-env.mjs is processed as a module thanks to the suffix, and it
sets chai. expect globally, and then I updated tests to use the global expect.
Please see https://github.com/chaijs/chai/issues/1568
[MAILPOET-6008]
2024-06-19 12:12:59 +02:00
Rostislav Wolny
7a5241d3d3
Add support for padding for headings and paragraphs in the form editor
...
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
Rostislav Wolny
325b223953
Add support for gradient for heading and paragraph in form editor
...
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
Jan Jakes
d664f60e4b
Rename all non-snake-case JS/TS imports
...
[MAILPOET-4938]
2023-10-02 13:05:20 +02:00
Jan Jakes
c8fc6bf49a
Rename all non-snake-case JS/TS files
...
[MAILPOET-4938]
2023-10-02 13:05:20 +02:00
Jan Jakes
c9922d32d8
Fix invalid check for an empty array
...
[MAILPOET-5138]
2023-03-23 16:23:40 -05:00
Rostislav Wolny
ce41438d65
Fix loading saved global font size in the form editor
...
We now support also strings containing value and unit.
[MAILPOET-5139]
2023-03-20 17:24:31 +01:00
Jan Jakes
b20690261f
Fix font size picker trying to process numbers as strings
...
This fixes the "fontSizeValue.startsWith is not a function" error. It seems that the font size picker
now always expects strings, while the values from SETTINGS_DEFAULTS could be numbers,
and we've been using numbers throughout our codebase as well.
This also enables the usage of any font size units, such as em and rem.
This may be related to: https://github.com/WordPress/gutenberg/issues/44857
[MAILPOET-5102]
2023-03-15 21:03:06 +01:00
Brezo Cordero
401501b97b
Use @ts-expect-error
...
[MAILPOET-3523]
2023-02-06 12:19:21 +01:00
Brezo Cordero
d585c27f6e
Convert map_form_data_before_saving.spec.js
...
[MAILPOET-3523]
2023-02-06 12:19:21 +01:00
Brezo Cordero
0775ce2669
Convert map_form_data_after_loading.spec.js
...
[MAILPOET-3523]
2023-02-06 12:19:21 +01:00
Brezo Cordero
37bb5fd824
Convert form_validator.spec.js
...
[MAILPOET-3523]
2023-02-06 12:19:21 +01:00
Brezo Cordero
fee5af2ffa
Convert form_to_block_test_data.js
...
[MAILPOET-3523]
2023-02-06 12:19:21 +01:00
Brezo Cordero
21d03c5bf7
Convert form_body_to_blocks.spec.js
...
[MAILPOET-3523]
2023-02-06 12:19:21 +01:00
Brezo Cordero
0854b1ce36
Convert toggle_sidebar_panel.jsx
...
It also adds a new type for the action and converts the test.
[MAILPOET-3523]
2023-02-06 12:19:21 +01:00
Brezo Cordero
949c962fc9
Convert create_custom_field_started.jsx
...
It also adds a new type for the action and converts the test.
[MAILPOET-3523]
2023-02-06 12:19:21 +01:00
Brezo Cordero
d449f02883
Add functions to use partial types in tests
...
Functions to create mocks with Partial Types in tests and avoid using `as Type`. Also extract FormData type to form_data_types.ts
[MAILPOET-3523]
2023-02-06 12:19:21 +01:00
Brezo Cordero
b40c5a5dfe
Convert history_record.ts.jsx to ts
...
Converts the file and test. It also moves HistorRecord type to state_types.ts
[MAILPOET-3523]
2023-02-06 12:19:21 +01:00
Brezo Cordero
08aea80a55
Convert save_form_started.jsx to ts
...
Converts the file and test. It also removes extra param from tests.
[MAILPOET-3523]
2023-02-06 12:19:21 +01:00
Brezo Cordero
86a4347908
Convert blocks_to_form_body.jsx to ts
...
Converts the file and tests. It also creates the type CustomFields.
[MAILPOET-3523]
2023-02-06 12:19:21 +01:00
Brezo Cordero
f242e847bb
Convert selectors.spec.js to ts
...
I have decided to use `as State` on the mocks instead of creating a big object conforming to the type.
The functions tested only use one or two properties of the 33 the type has and I have verified the properties we use for the test are well-formed.
[MAILPOET-3523]
2023-02-06 12:19:21 +01:00
Jan Jakes
a17b47a2ec
Convert form editor store selectors to TypeScript
...
[MAILPOET-4323]
2022-05-11 14:26:58 +02:00
Sam Najian
d116ff360b
Remove default exports from affected files
...
[MAILPOET-4202]
2022-04-20 08:34:01 +02:00
Jan Jakes
ab27eaee2d
Autoformat files with prettier
...
[MAILPOET-4075]
2022-04-12 15:38:27 +02:00
Sam Najian
b0004d4d4a
Fix issue with getting isFuture when scheduling newsletters
...
- Update tests
- Update tsconfig to include the ts tests
- Adjust eslint.ts.json config to work with tests
[MAILPOET-4163]
2022-03-14 10:15:35 +01:00
Sam NAjian
897c9bbd8c
Add tests for MailPoetDate.isInFuture and fix test eslint issues
...
- Convert date.js to typescript and define types
- Fix test script to include ts tests as well
- Make eslint for ts tests work correct and recognize mocha
[MAILPOET-4023]
2022-02-09 16:32:26 +01:00
Rostislav Wolny
87d443614d
Add support for padding for columns block
...
It was possible to set padding within a single column. After this update a user can set
padding for columns wrapper.
[MAILPOET-4029]
2022-01-19 12:21:15 +01:00
Jan Jakes
9f790efbf0
Move plugin files to a subfolder
...
[MAILPOET-3988]
2022-01-18 15:30:22 +01:00