Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

Rewrite tests for v2 #62

Open
patrixr opened this issue Oct 15, 2021 · 0 comments
Open

Rewrite tests for v2 #62

patrixr opened this issue Oct 15, 2021 · 0 comments
Labels
enhancement New feature or request hacktoberfest help wanted Extra attention is needed

Comments

@patrixr
Copy link
Owner

patrixr commented Oct 15, 2021

Due the re-write of of the middleware to version 2, the old tests had to be disabled

The latest working versions of the tests is here

Here's an overview

 Caching
    Collection types
      ✓ should let uncached requests go through
      ✓ following request should be cached
      ✓ following request should have response status 304
      ✓ caches based on headers
      ✓ doesnt cache models not present in the config
      ✓ busts the cache on a POST resquest
      ✓ busts the cache of a related model (via direct relation) on a POST resquest
      ✓ busts the cache of a related model (via relation in component) on a POST resquest
      ✓ busts the cache on an admin panel POST resquest
      ✓ busts the cache on an admin panel POST publishing change
      ✓ busts the cache on a PUT resquest
      ✓ busts the cache of a related model (via direct relation) on a PUT resquest
      ✓ busts the cache of a related model (via relation in component) on a PUT resquest
      ✓ busts the cache on an admin panel PUT resquest
      ✓ busts the cache on an admin panel PUT publishing change
      ✓ busts the cache on a DELETE resquest
      ✓ busts the cache of a related model (via direct relation) on a DELETE resquest
      ✓ busts the cache of a related model (via relation in component) on a DELETE resquest
      ✓ busts the cache on an admin panel DELETE resquest
      ✓ busts the cache on an admin panel DELETE publishing change
      when an ID is specified on a POST request
        ✓ doesn't bust the cache for other IDs
      when an ID is specified on a PUT request
        ✓ doesn't bust the cache for other IDs
      when an ID is specified on a DELETE request
        ✓ doesn't bust the cache for other IDs
    Single types
      ✓ caches non pluralized endpoints
      ✓ doesnt cache pluralized endpoints
      ✓ busts the cache on a POST resquest
      ✓ busts the cache on an admin panel POST resquest
      ✓ busts the cache on a PUT resquest
      ✓ busts the cache on an admin panel PUT resquest
      ✓ busts the cache on a DELETE resquest
      ✓ busts the cache on an admin panel DELETE resquest

Ideally the tests would be an end-to-end setup which spins up an actual Strapi instance to test against.

cc @stafyniaksacha

@patrixr patrixr added enhancement New feature or request help wanted Extra attention is needed hacktoberfest labels Oct 15, 2021
@patrixr patrixr mentioned this issue Oct 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant