Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: Add page resource tests #156

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bofalke
Copy link
Contributor

@bofalke bofalke commented Oct 26, 2022

Ref #113

@bofalke
Copy link
Contributor Author

bofalke commented Oct 26, 2022

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?

@silverbackdan
Copy link
Collaborator

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
Copy link
Collaborator

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

@bofalke bofalke force-pushed the feature/#113-additional-page-resource-tests branch from bed07ec to 6c3c1fb Compare October 27, 2022 17:35
@bofalke bofalke force-pushed the feature/#113-additional-page-resource-tests branch from 6c3c1fb to ae40a00 Compare October 27, 2022 17:40
@codecov
Copy link

codecov bot commented Oct 27, 2022

Codecov Report

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

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%) ⬇️
phpunit 9.70% <ø> (+0.02%) ⬆️

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%) ⬇️
src/EventListener/Api/RouteEventListener.php 93.33% <0.00%> (-0.61%) ⬇️
src/Filter/OrSearchFilter.php 40.77% <0.00%> (-0.57%) ⬇️
...c/EventListener/Api/CollectionApiEventListener.php 87.09% <0.00%> (-0.41%) ⬇️
...ializer/Normalizer/ComponentPositionNormalizer.php 89.47% <0.00%> (-0.19%) ⬇️
src/EventListener/Api/UserEventListener.php 97.29% <0.00%> (-0.14%) ⬇️
src/AttributeReader/AttributeReader.php 94.11% <0.00%> (-0.12%) ⬇️
src/EventListener/Api/FormApiEventListener.php 97.82% <0.00%> (-0.10%) ⬇️
...rc/Serializer/Normalizer/PublishableNormalizer.php 96.90% <0.00%> (-0.04%) ⬇️
src/Entity/User/AbstractUser.php 96.63% <0.00%> (-0.03%) ⬇️
... 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.

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

@codeclimate
Copy link

codeclimate bot commented Oct 27, 2022

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

View more on Code Climate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants