259 Commits

Author SHA1 Message Date
Josh
d07d489109 chore: convert admin-utils to TS and reorganise preset setup
chore

chore: fix tests

chore: fix workflow

chore: tidy ups

chore: test fixes

chore: skip nx cache

chore: pr amends

chore: fix rogue incorrect import
2023-04-26 09:57:17 +01:00
Alexandre BODIN
12d3068013
Migrate generators to ts (#16392) 2023-04-26 09:07:40 +02:00
Alexandre BODIN
feced1d72b
Move api tests to root of repo with same structure (#16242) 2023-04-05 10:32:20 +02:00
Ben Irvin
41c7792b54 add mysql2 as a db client option 2023-03-22 12:11:15 +01:00
Ben Irvin
801e3db415 add traverse query
fix single type

fix query

sanitize pagination count params

add comments

Cleanup the params/filters sanitize helpers

sanitize association resolver

Sanitize sort

fix graphql single type

fix graphql types

fix addFindQuery

Sanitize fields

Update sanitize sort to handle all the different formats

Update fields sanitize to handle regular strings & wildcard

Fix non scalar recursion

Add a traverse factory

Add visitor to remove dz & morph relations

Replace the old traverse utils (sort, filters) by one created using the traverse factory

add sanitize populate

await args

fix async and duplicate sanitization

sanitize u&p params

Add traverse fields

Fix traverse & sanitize fields

add traverse fields to nested populate

sanitize admin api filter queries

Co-authored-by: Jean-Sébastien Herbaux <Convly@users.noreply.github.com>

sanitize sort params in admin API

todo

make token fields unsearchable with _q

sanitize delete mutation

Update packages/core/admin/server/services/permission/permissions-manager/sanitize.js

Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com>

fix errors on queries without ctx

rename findParams to sanitizedParams

Sanitize queries everywhere in the content manager admin controllers

sanitize single type update and delete

Ignore non attribute keys in the sanitize sort

Fix the sanitize query sort for nested string sort

Fix permission check for the admin

typo

sanitize upload

sanitize admin media library

sanitize admin users

Add missing await

Co-authored-by: Jean-Sébastien Herbaux <Convly@users.noreply.github.com>

set U&P users fields to searchable:false

add token support to createContentAPIRequest

add searchable:false to getstarted U&P schema

remove comment

sanitize component resolver

remove await

add searchable false to the file's folder path

Fix admin query when the permission query is set to null

add basic tests for filtering private params

add tests for fields

add pagination tests

Fix admin user fields not being sanitized

Fix convert query params for the morph fragment on undefined value

Traverse dynamic zone on nested populate

Handle nested sort, filters & fields in populate queries + handle populate fragment for morphTo relations

Sanitize 'on' subpopulate

Co-authored-by: Jean-Sébastien Herbaux <Convly@users.noreply.github.com>

don't throw error on invalid attributes

check models for snake case column name instead of assuming they are operators

Add first batch of api tests for params sanitize

Fix sort traversal: handle object arrays

Put back removePassword for fields,sort,filters

Add schemas and fixtures for sanitize api tests

Add tests for relations (sanitize api tests)

Move constant to domain scope

Rename sanitize params to sanitize query

Fix typo

Cleanup fixtures file

Fix variable name conflict

Update packages/core/admin/server/services/permission/permissions-manager/sanitize.js

Co-authored-by: Alexandre BODIN <alexandrebodin@users.noreply.github.com>

Update comment for array filters

Rename sanitize test

Test implicit & explicit array operator for filter

Remove unused code
2023-03-15 14:59:19 +01:00
Gustav Hansen
1d99c3f217 Chore: Remove request dependency 2023-02-10 09:04:32 +01:00
Fabien del Carmen
0bc46be074
Merge pull request #15577 from strapi/fix/remove-detect-open-handles
Remove --detectOpenHandles from "api" tests
2023-01-26 12:21:30 +01:00
fdel-car
0806591427 Remove --detectOpenHandles from "api" tests 2023-01-25 19:27:05 +01:00
Rémi de Juvigny
10274e4685 Mock audit log provider in API tests 2023-01-25 18:50:36 +01:00
Gustav Hansen
51f16d50c9 Chore: Remove unused test utility 2023-01-23 10:30:07 +01:00
Alexandre Bodin
8c9e785ee8 Remove unnecessary log 2022-11-21 16:29:46 +01:00
Alexandre Bodin
246f9d0425 Fix flaky api tests due to exit code management 2022-11-21 16:29:46 +01:00
Pierre Noël
fc26a07014 add schema in api.js file 2022-11-19 01:04:54 +01:00
Pierre Noël
d31da5b4ae add a postgres schema for api tests 2022-11-17 12:24:58 +01:00
Alexandre Bodin
6ae9c6f5dd Cleanup logs 2022-11-07 18:07:24 +01:00
Alexandre Bodin
5d77a53c06 Merge branch 'main' into chore/rename-e2e-to-api 2022-11-07 16:29:37 +01:00
Alexandre Bodin
57e1eb5ee8 Move e2e to api tests and unify test command 2022-10-27 19:49:37 +02:00
Pierre Noël
3f72ff3a73 Merge branch 'main' into feature/relations-main-view 2022-09-08 15:41:31 +02:00
Pierre Noël
3ff32e91eb use entityService + redo permissions 2022-09-06 12:17:54 +02:00
Pierre Noël
247499dd8a add tests 2022-09-06 12:17:54 +02:00
Alexandre Bodin
bba4c4c85a Fix eslint in test utils 2022-09-05 15:05:26 +02:00
Alexandre Bodin
cf49ddbbfc Prettier and backend fix 2022-08-11 10:20:49 +02:00
Alexandre Bodin
0ae14c06cb 1st fix pass 2022-08-11 10:20:48 +02:00
Convly
ba91f47f04 Merge branch 'master' into releases/4.3.0 2022-07-27 12:55:48 +02:00
Convly
0b8c7b59c6 Merge branch 'master' into features/typescript 2022-07-25 09:30:18 +02:00
Simone Taeggi
82e8036d0e force the node LANG to us to run the unit tests 2022-07-21 18:54:07 +02:00
Pierre Noël
2e926e63ca revert strapi.start to load and listen 2022-07-12 17:57:01 +02:00
Pierre Noël
5706191547 fix unit tests open handles 2022-07-12 17:57:01 +02:00
Pierre Noël
d48d91ee1c fix open handles 2022-07-12 17:57:00 +02:00
Convly
4fa2804f35 Merge branch 'master' into features/typescript 2022-04-15 15:47:16 +02:00
Pierre Noël
5f993a0857 add JWT_SECRET env var to fix e2e tests 2022-04-07 16:50:20 +02:00
Convly
fb720da187 Fix directories resolve 2022-04-04 12:02:21 +02:00
Alexandre Bodin
4b965665d4 Test each sqlite pkg 2022-03-25 09:02:19 +01:00
Pierre Noël
83d321a981 better handle env variables in e2e tests 2022-01-24 17:01:51 +01:00
Pierre Noël
597df20411 fix appendFile 2022-01-20 18:48:57 +01:00
Pierre Noël
1dc74b0792 add session middleware to new project config + fix test app not using .env 2022-01-19 17:13:00 +01:00
fdel-car
3864399eb8 Merge branch 'master' into chore/test-config 2021-11-30 12:36:11 +01:00
Pierre Noël
c6a5a047d6 Merge branch 'releases/v4' into v4/error-handling 2021-11-05 10:40:11 +01:00
Pierre Noël
db1cb3040c refactor error-handling PR 2021-11-05 10:13:43 +01:00
Jean-Sébastien Herbaux
7f285fb755
[V4] Enhanced sanitize & remove restricted relations from content API's payloads (#11411)
* Rework sanitizeEntity, first iteration

* remove console.log

* Remove useless comments

* Fix e2e tests

* Fix up user e2e test

* Fix remove-restricted-relations visitor

* Handle grapqhql resolver, prevent access to restricted relations

* Handle polymorphic relation in the related visitor

* Remove morph attribute if empty

* Use only the find action to check if the relation is allowed
2021-11-04 15:47:53 +01:00
Pierre Noël
a58d15407a fix unit:test 2021-11-04 11:42:09 +01:00
soupette
d3bd5d5294 Fix jest config
Signed-off-by: soupette <cyril@strapi.io>
2021-10-27 08:26:57 +02:00
Pierre Noël
6fd9f780c7 Merge branch 'v4/ctb' into v4/plural-name-in-CTB 2021-10-22 12:33:48 +02:00
Marvin Frachet
74ee11f764 Testing upload asset dialog (#11285) 2021-10-19 11:30:52 +02:00
Marvin Frachet
4b311e777c Add Delete an asset call to the ML (#11186) 2021-10-19 11:26:35 +02:00
Alexandre Bodin
fb54e36051 Fix unit tests 2021-10-07 13:13:30 +02:00
fdel-car
c505d0c4b8 Move /config/front/mocks files inside admin-test-utils 2021-10-04 15:29:58 +02:00
fdel-car
0980031778 Add watch and ce tests commands & update base front config 2021-10-04 11:54:39 +02:00
Alexandre Bodin
f55276cc73 Merge branch 'releases/v4' into v4/ds-migration 2021-09-28 18:21:21 +02:00
Alexandre Bodin
dd9543147c Fix different version break frontend tests 2021-09-28 10:34:14 +02:00