api-components-bundle icon indicating copy to clipboard operation
api-components-bundle copied to clipboard

Draft: Add page resource tests

Open bofalke opened this issue 3 years ago • 5 comments

Ref #113

bofalke avatar Oct 26 '22 14:10 bofalke

I am not sure why, but after calling the thereIsAPage function the GET request to the /_/pages route returns no elements. Do you have an idea what is missing? It seems to be a default ApiPlatform resource but i guess there are some requirements that need to be fulfilled before the Resource is returned via the endpoint?

bofalke avatar Oct 26 '22 14:10 bofalke

So this may be because it's a routable resource without a route associated. So there will be security on it only an admin user could read it until a route is assigned.

silverbackdan avatar Oct 26 '22 15:10 silverbackdan

So you can either run the test with @loginAdmin or make sure the page has a route to it as well :)

silverbackdan avatar Oct 26 '22 19:10 silverbackdan

Codecov Report

Base: 80.43% // Head: 80.36% // Decreases project coverage by -0.06% :warning:

Coverage data is based on head (ae40a00) compared to base (7db786e). Patch has no changes to coverable lines.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #156      +/-   ##
============================================
- Coverage     80.43%   80.36%   -0.07%     
  Complexity     1727     1727              
============================================
  Files           202      202              
  Lines          4783     4761      -22     
============================================
- Hits           3847     3826      -21     
+ Misses          936      935       -1     
Flag Coverage Δ
behat 79.03% <ø> (-0.08%) :arrow_down:
phpunit 9.70% <ø> (+0.02%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/Action/Uploadable/UploadAction.php 77.77% <0.00%> (-0.80%) :arrow_down:
src/EventListener/Api/RouteEventListener.php 93.33% <0.00%> (-0.61%) :arrow_down:
src/Filter/OrSearchFilter.php 40.77% <0.00%> (-0.57%) :arrow_down:
...c/EventListener/Api/CollectionApiEventListener.php 87.09% <0.00%> (-0.41%) :arrow_down:
...ializer/Normalizer/ComponentPositionNormalizer.php 89.47% <0.00%> (-0.19%) :arrow_down:
src/EventListener/Api/UserEventListener.php 97.29% <0.00%> (-0.14%) :arrow_down:
src/AttributeReader/AttributeReader.php 94.11% <0.00%> (-0.12%) :arrow_down:
src/EventListener/Api/FormApiEventListener.php 97.82% <0.00%> (-0.10%) :arrow_down:
...rc/Serializer/Normalizer/PublishableNormalizer.php 96.90% <0.00%> (-0.04%) :arrow_down:
src/Entity/User/AbstractUser.php 96.63% <0.00%> (-0.03%) :arrow_down:
... and 6 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Oct 27 '22 17:10 codecov[bot]

Code Climate has analyzed commit ae40a00b and detected 0 issues on this pull request.

View more on Code Climate.

qlty-cloud-legacy[bot] avatar Oct 27 '22 17:10 qlty-cloud-legacy[bot]