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

Bugfix/20002 superfluous query on head request in serializer #20060

Conversation

xicond
Copy link
Contributor

@xicond xicond commented Nov 2, 2023

Q A
Is bugfix? ✔️
New feature?
Breaks BC?
Fixed issues #20055

Copy link

what-the-diff bot commented Nov 2, 2023

PR Summary

  • Improved Data Serialization
    The method handling how data is serialized has been enhanced. Specifically, a property named 'totalCount' of the pagination information now reflects the full count of items from the data provider.

  • Enhancements to Serializer Test
    Changes were executed in the Serializer's test suite for better functionality and comprehensive testing:

    • After the data provider is serialized, the test now confirms that the 'totalCount' appears in the response headers, ensuring that this information is correctly relayed.
    • A simulated version (mock object) of a data provider is created in testing, and this mocked version can reproduce expected outcomes when used.
    • The mocked data provider's pagination information can mirror the original data provider's, a feature exercised in the tests.
    • After the mock data provider is serialized, it's confirmed that the resulting response is empty (as expected).
    • An expectation has been added to ensure that certain method calls, particularly those involving data fetching, never happen within the mock data provider.
    • Contextual information such as posted form data or server data, used during the tests, is reset at the end of each test, maintaining test integrity.

Copy link

codecov bot commented Nov 2, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (aa9adc8) 19.37% compared to head (9a2500d) 48.01%.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #20060       +/-   ##
===========================================
+ Coverage   19.37%   48.01%   +28.64%     
===========================================
  Files         445      445               
  Lines       43671    43897      +226     
===========================================
+ Hits         8461    21079    +12618     
+ Misses      35210    22818    -12392     
Files Coverage Δ
framework/rest/Serializer.php 64.70% <100.00%> (+64.70%) ⬆️

... and 251 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@samdark samdark requested review from a team November 23, 2023 14:02
@samdark
Copy link
Member

samdark commented Nov 23, 2023

@xicond please add a line for CHANGELOG. Thanks.

@samdark
Copy link
Member

samdark commented Dec 13, 2023

Closed in favor of #20070

@samdark samdark closed this Dec 13, 2023
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.

2 participants