-
Notifications
You must be signed in to change notification settings - Fork 349
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
Browser/Plugin improvements: counting nodes, ordering and Nodes section at top/bottom #1575
base: master
Are you sure you want to change the base?
Conversation
…ring resources without lastmodified (found in manual UI tests)
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1575 +/- ##
============================================
- Coverage 97.23% 97.22% -0.01%
- Complexity 2836 2843 +7
============================================
Files 175 175
Lines 9028 9043 +15
============================================
+ Hits 8778 8792 +14
- Misses 250 251 +1 ☔ View full report in Codecov by Sentry. |
@rNoz php-cs-fixer has some minor formatting required. https://github.com/sabre-io/dav/actions/runs/12096265416/job/34109861744?pr=1575 You can run it locally |
// If there are nodes and they are more than the max number to show at the top of the page | ||
if ($numSubNodes) { | ||
$html .= $this->generateNodesSection($subNodes, $numSubNodes); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a test case for when there are more than 20 nodes?
That will exercise this code, and the test can check that the Nodes section comes down the bottom of the HTML.
What am I doing?
Providing some tweaks to
Sabre\DAV\Browser\Plugin.php
:Example with this PR:
Why?
More context: issue
I have added a test to evaluate the new
compareNodes
protected function, as I didn't see a way to easily replacelastmodified
values for a set of files and just parsing the table rows of the response body. So I am using reflection to verify all the possibilities when comparing.Originally, I had another function (see below) to evaluate specifically the counting of nodes, but I think it will be fine just using what is provided by the
parent::setUp()
+setUp
(3 nodes).All passing:
Let me know if something else is necessary ;)