mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 14:43:46 +01:00
[clsi] migrate convert project to document to compile from history (#33985)
* [clsi] add request flag for isCompileFromHistory * [clsi] derive cacheKey for history snapshot from compile dir * [clsi] migrate convert project to document to compile from history * [clsi] address review feedback * [web] determine root doc at the time of converting the project * [web] wait for flush before starting document conversion * [saas-e2e] add tests for root doc override when converting project GitOrigin-RevId: 71c578030949b89f3a74e7f7ab882dfa9c98c17a
This commit is contained in:
@@ -18,7 +18,11 @@ describe('ConversionController', function () {
|
||||
ctx.documentStat = { size: 5678 }
|
||||
ctx.Settings = {
|
||||
enablePandocConversions: true,
|
||||
path: { compilesDir: '/compiles', outputDir: '/output' },
|
||||
path: {
|
||||
compilesDir: '/compiles',
|
||||
outputDir: '/output',
|
||||
clsiCacheDir: '/cache',
|
||||
},
|
||||
}
|
||||
ctx.OutputCacheManager = {
|
||||
CACHE_SUBDIR: 'generated-files',
|
||||
@@ -43,6 +47,13 @@ describe('ConversionController', function () {
|
||||
syncResourcesToDisk: sinon.stub().resolves(),
|
||||
},
|
||||
}
|
||||
|
||||
ctx.HistoryResourceWriter = {
|
||||
promises: {
|
||||
syncResourcesToDisk: sinon.stub().resolves(),
|
||||
},
|
||||
}
|
||||
|
||||
ctx.RequestParser = {
|
||||
promises: {
|
||||
parse: sinon.stub().resolves(ctx.parsedRequest),
|
||||
@@ -87,6 +98,11 @@ describe('ConversionController', function () {
|
||||
default: ctx.ResourceWriter,
|
||||
}))
|
||||
|
||||
vi.doMock(
|
||||
'../../../app/js/HistoryResourceWriter',
|
||||
() => ctx.HistoryResourceWriter
|
||||
)
|
||||
|
||||
vi.doMock('../../../app/js/RequestParser', () => ({
|
||||
default: ctx.RequestParser,
|
||||
}))
|
||||
|
||||
Reference in New Issue
Block a user