Merge pull request #22178 from overleaf/jpa-file-view-hash-2
[web] migrate file-view to download from history-v1 (via web) 2/2 GitOrigin-RevId: 93172cbbd2d19a55bb27f5b0ca0b494f815a3632
This commit is contained in:
@@ -23,12 +23,12 @@ describe('<FileViewText/>', function () {
|
||||
})
|
||||
|
||||
it('renders a text view', async function () {
|
||||
fetchMock.head('express:/project/:project_id/file/:file_id', {
|
||||
fetchMock.head('express:/project/:project_id/blob/:hash', {
|
||||
status: 201,
|
||||
headers: { 'Content-Length': 10000 },
|
||||
})
|
||||
fetchMock.get(
|
||||
'express:/project/:project_id/file/:file_id',
|
||||
'express:/project/:project_id/blob/:hash',
|
||||
'Text file content'
|
||||
)
|
||||
|
||||
|
||||
@@ -36,12 +36,12 @@ describe('<FileView/>', function () {
|
||||
|
||||
describe('for a text file', function () {
|
||||
it('shows a loading indicator while the file is loading', async function () {
|
||||
fetchMock.head('express:/project/:project_id/file/:file_id', {
|
||||
fetchMock.head('express:/project/:project_id/blob/:hash', {
|
||||
status: 201,
|
||||
headers: { 'Content-Length': 10000 },
|
||||
})
|
||||
fetchMock.get(
|
||||
'express:/project/:project_id/file/:file_id',
|
||||
'express:/project/:project_id/blob/:hash',
|
||||
'Text file content'
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user