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

[ui-storagebrowser] fixes file preview for non-readable file #4061

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ramprasadagarwal
Copy link
Collaborator

What changes were proposed in this pull request?

  • When we are not able to read the file content due to any reason, the message will be displayed to indicate that preview is not supported.

How was this patch tested?

  • Added test case

Please review Hue Contributing Guide before opening a pull request.

@ramprasadagarwal ramprasadagarwal self-assigned this Mar 18, 2025
Copy link

⚠️ No unit test files modified. Please ensure that changes are properly tested. ⚠️

Copy link

github-actions bot commented Mar 18, 2025

Backend Codecov

Backend Code Coverage Report •
FileStmtsMissCoverMissing
apps/filebrowser/src/filebrowser
   api.py51722157%79–86, 94, 96–98, 100–101, 103, 115–117, 240, 296, 303, 311, 320, 327–329, 336–339, 359–360, 362–363, 365, 369–371, 373–374, 376, 378–382, 384, 386, 388–389, 391–398, 401, 404–407, 409–413, 415, 423, 431–432, 434–435, 437, 439, 469, 471–476, 479–481, 484–488, 490–493, 507–509, 511–515, 542, 639–640, 642–643, 645–646, 648–650, 652–654, 657, 783–784, 786–787, 789–790, 792–795, 797–800, 802, 808–809, 811–813, 815, 821–822, 824, 826, 831–833, 835–836, 838–841, 843, 845, 850–851, 853, 858, 860, 866–869, 872, 874, 881, 893–894, 896, 898, 900, 906–907, 909–910, 912–913, 917–919, 921, 927–928, 930–932, 934–938, 940, 942, 947–951, 953–957, 959, 965–966, 968–972, 974, 976–977, 979, 982–984, 986, 988–989, 991
TOTAL536032624151% 

Pytest Report

Tests Skipped Failures Errors Time
1108 106 💤 0 ❌ 0 🔥 5m 47s ⏱️

Copy link
Contributor

@JohanAhlen JohanAhlen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Comment on lines +296 to +299
mockData = {
isContentReadable: false,
contents: ''
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could potentially change the outcome of other tests relying on mockData. Perhaps resetting it in an "beforeEach"..

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