264 Commits

Author SHA1 Message Date
Alexandre Bodin
b6845ef084 Fix generate-test-app always linking packages 2023-07-27 15:53:08 +02:00
Josh
f45146aa97 chore: pr amends
Update docs/docs/guides/e2e/02-data-transfer.md

Update docs/docs/guides/e2e/01-app-template.md

Update docs/docs/guides/e2e/00-setup.md

Update docs/docs/guides/e2e/00-setup.md

Update docs/docs/guides/e2e/02-data-transfer.md

Update test/scripts/run-e2e-tests.js

Co-Authored-By: Ben Irvin <ben@innerdvations.com>
2023-07-25 14:20:49 +01:00
Josh
b79ccf8628 fix: github action 2023-07-25 14:20:49 +01:00
Josh
b3318bd824 feat: add e2e cli to run multiple apps in one go 2023-07-25 14:20:49 +01:00
Alexandre Bodin
4a615f2db4 test: add e2e tooling
Remove old cypress related files

Update config and reorg tests

Run test app before running playwright tests

feat: add beginning of authentication test

feat: add app template with database dumping ability

chore: pr amends

Run test app before running playwright tests

feat: add beginning of authentication test

feat: add app template with database dumping ability

chore: pr amends

init deits

fix: e2e test

chore: rename to e2e

chore: commit tar for data

Init playwright

Run test app before running playwright tests

feat: add beginning of authentication test

feat: add app template with database dumping ability

chore: pr amends

chore: remove unneeded workflow

fix: add private: true to the template so `test-apps` aren't published

docs: add docs

chore: add warning about DTS caveats

chore: tweak docs

docs(e2e): add correct route to api example for template

chore: fix package.json tests

chore: update from feature/DEITS

chore: updates from DTS

chore: update data-transfer

Update yarn.lock

fix: remove duplicate type

chore(e2e): set up folder structure

fix(e2e): avoid clearing 'admin_' DB tables through DTS or DB Dump

feat(e2e): DTS scripts and backup files

add route to change rate limit

fix wront appPath for API test in CI

no template by default when creating a test app

Fix typo double equal

fix template path for e2e tests

chore(e2e): fix broken signup spec

feat(e2e): basic logout test spec

Login e2e tests

globalSetup attempt

use withAdmin backup

cleanup

fix playwright config & rate limit test

remove example.spec.js

refactor and merge some login tests

Chore: Cleanup login and signup specs

feat(e2e): sign up password error cases

feat(e2e): add homepage expectation to signup spec

refactor(e2e)

refactor(e2e): signUp

refactor(e2e): use global login util for logout and logins specs

Init playwright

fix: remove duplicate type

chore: uncomment transfer route registering

Update yarn.lock

chore: update data-transfer

chore: updates from DTS

chore: update from feature/DEITS

chore: fix package.json tests

docs(e2e): add correct route to api example for template

chore: tweak docs

chore: add warning about DTS caveats

docs: add docs

fix: add private: true to the template so `test-apps` aren't published

chore: remove unneeded workflow

chore: pr amends

feat: add app template with database dumping ability

feat: add beginning of authentication test

Run test app before running playwright tests

Init playwright

chore: commit tar for data

chore: rename to e2e

fix: e2e test

init deits

chore: pr amends

feat: add app template with database dumping ability

feat: add beginning of authentication test

Run test app before running playwright tests

chore: pr amends

feat: add app template with database dumping ability

feat: add beginning of authentication test

Run test app before running playwright tests

Update config and reorg tests

Remove old cypress related files

chore(e2e): cleanup e2e dir

chore(docs): improve e2e testing documentation

chore(docs): PR feedback

chore: tweak action to run browsers in matrix & build packages

chore: fix tests based on merge

chore: shuffle e2e tests and add first conent-type

fix: tests

Make use of yarn linking for api & e2e tests

Chore: Fix running backend unit tests

Chore: Bring opts.run back

Chore: Update playwright

Chore: Update Playwright setup

fix: workflow

chore: fix path to package.json

chore: build ts projects before tests

chore: update e2e workflow

chore: add no-immutable

Use simpler transfer token to avoid misinterpretation

Remove console.log

Ensure that the custom transfer token exists in the e2e test app's database upon startup

Use the custom transfer token for transferring data to the e2e test app

Fix code analysis warning

Define and export a constant for the custom transfer token

Allow passing a custom access key for the transfer token service

chore: add test-apps to workspace

chore: update lockfile
Co-Authored-By: Josh <37798644+joshuaellis@users.noreply.github.com>
Co-Authored-By: Gustav Hansen <gu@stav.dev>
Co-Authored-By: Alexandre BODIN <alexandrebodin@users.noreply.github.com>
Co-Authored-By: Jean-Sébastien Herbaux <25851739+Convly@users.noreply.github.com>
2023-07-25 14:20:49 +01:00
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