Merge pull request #4645 from overleaf/jpa-pdf-caching-opt-in

[misc] make PDF caching an opt-in feature

GitOrigin-RevId: 85ea5739d7bbeea3ac2517ec99f90f2beec2a768
This commit is contained in:
Jakob Ackermann
2021-08-24 11:52:38 +02:00
committed by Copybot
parent 31b71493f2
commit c4d79280af
2 changed files with 33 additions and 36 deletions

View File

@@ -1237,6 +1237,9 @@ describe('ProjectController', function () {
})
describe('during regular roll-out', function () {
before(function () {
this.skip()
})
describe('disabled', function () {
showNoVariant()
@@ -1285,6 +1288,29 @@ describe('ProjectController', function () {
})
})
})
describe('during opt-in only', function () {
describe('with no query', function () {
expectBandwidthTrackingDisabled()
expectPDFCachingDisabled()
})
describe('with enable_pdf_caching=false', function () {
beforeEach(function () {
this.req.query.enable_pdf_caching = 'false'
})
expectBandwidthTrackingDisabled()
expectPDFCachingDisabled()
})
describe('with enable_pdf_caching=true', function () {
beforeEach(function () {
this.req.query.enable_pdf_caching = 'true'
})
expectBandwidthTrackingEnabled()
expectPDFCachingEnabled()
})
})
})
describe('wsUrl', function () {