Resolve binary file that appears to be text in the first 1024 bytes edge case
Description
In spec/features/projects/blobs/blob_show_spec.rb
we test a case where we display a binary file that appears to be text in the first 1024 bytes but ends up being a binary.
With the refactored blob viewer this spec fails, we need to determine whether this test is still needed and fix/remove it accordingly.
Feature flags
This test fails when both the refactor_blob_viewer
and highlight_js
feature flags are enabled.
Proposed solution
From here
Right now the backend sends
fileType: "text"
to the frontend which in turn causes the frontend to render it as text. In this scenario we needfileType: "download"
so that the frontend can render the download component instead of the text viewer.
Testing
Exploratory testing for verification, feature spec coverage, package-and-qa
run recommended for regression testing.