mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 06:33:55 +01:00
Merge pull request #35257 from overleaf/bg-png2pdf-premium
limit png2pdf to priority compiles GitOrigin-RevId: a2b394efe6056ccbc6963d922f3e8b385645167b
This commit is contained in:
@@ -1096,6 +1096,7 @@ describe('ClsiManager', function () {
|
||||
ctx.user_id,
|
||||
{
|
||||
timeout: 100,
|
||||
compileGroup: 'priority',
|
||||
png2pdf: true,
|
||||
}
|
||||
)
|
||||
@@ -1111,6 +1112,37 @@ describe('ClsiManager', function () {
|
||||
})
|
||||
})
|
||||
|
||||
describe('with the png2pdf option and standard compileGroup', function () {
|
||||
beforeEach(async function (ctx) {
|
||||
await ctx.ClsiManager.promises.sendRequest(
|
||||
null,
|
||||
ctx.project._id,
|
||||
ctx.user_id,
|
||||
{
|
||||
timeout: 100,
|
||||
compileGroup: 'standard',
|
||||
png2pdf: true,
|
||||
}
|
||||
)
|
||||
})
|
||||
|
||||
it('should force the png2pdf option to false in the request', function (ctx) {
|
||||
expect(ctx.FetchUtils.fetchStringWithResponse).to.have.been.calledWith(
|
||||
sinon.match.any,
|
||||
sinon.match({
|
||||
json: {
|
||||
compile: {
|
||||
options: {
|
||||
compileGroup: 'standard',
|
||||
png2pdf: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
describe('with a failed compile', function () {
|
||||
beforeEach(async function (ctx) {
|
||||
ctx.responseBody.compile.status = 'failure'
|
||||
|
||||
@@ -12,6 +12,7 @@ describe('ProjectEditorHandler', function () {
|
||||
rootDoc_id: 'file-id',
|
||||
publicAccesLevel: 'private',
|
||||
deletedByExternalDataSource: false,
|
||||
png2pdf: true,
|
||||
rootFolder: [
|
||||
{
|
||||
_id: 'root-folder-id',
|
||||
@@ -126,6 +127,10 @@ describe('ProjectEditorHandler', function () {
|
||||
ctx.result.publicAccesLevel.should.equal('private')
|
||||
})
|
||||
|
||||
it('should include the png2pdf setting', function (ctx) {
|
||||
ctx.result.png2pdf.should.equal(true)
|
||||
})
|
||||
|
||||
it('should include the owner', function (ctx) {
|
||||
expect(ctx.result.owner).to.exist
|
||||
ctx.result.owner._id.should.equal('owner-id')
|
||||
|
||||
Reference in New Issue
Block a user