From 739ac961957abaad34d4abe565b056e3c45b0b91 Mon Sep 17 00:00:00 2001 From: Miguel Serrano Date: Wed, 10 Nov 2021 11:41:32 +0100 Subject: [PATCH] Revert "Prepare new Pdf Preview rollout (#5664)" (#5745) This reverts commit 047a3c636e09e9786c2a9b93514fef5bc46b0da9. GitOrigin-RevId: 91b3c024cd364c1fd55d5e4fc6a2c592b784bc2a --- .../web/app/src/Features/Helpers/NewLogsUI.js | 5 +---- .../src/Features/Project/ProjectController.js | 21 +------------------ .../unit/src/HelperFiles/NewLogsUITests.js | 5 ----- .../src/Project/ProjectControllerTests.js | 3 --- 4 files changed, 2 insertions(+), 32 deletions(-) diff --git a/services/web/app/src/Features/Helpers/NewLogsUI.js b/services/web/app/src/Features/Helpers/NewLogsUI.js index c7736c179a..62b91e53f2 100644 --- a/services/web/app/src/Features/Helpers/NewLogsUI.js +++ b/services/web/app/src/Features/Helpers/NewLogsUI.js @@ -38,7 +38,6 @@ function _getVariantForPercentile(percentile) { } } -// eslint-disable-next-line no-unused-vars function getNewLogsUIVariantForUser(user) { const { _id: userId, alphaProgram: isAlphaUser } = user const isSaaS = Boolean(Settings.overleaf) @@ -57,7 +56,5 @@ function getNewLogsUIVariantForUser(user) { } module.exports = { - // We're disabling the split tests while rolling out the PDF Preview - // https://github.com/overleaf/internal/issues/5553 - getNewLogsUIVariantForUser: () => EXISTING_UI, + getNewLogsUIVariantForUser, } diff --git a/services/web/app/src/Features/Project/ProjectController.js b/services/web/app/src/Features/Project/ProjectController.js index d06851a233..36975f3ef3 100644 --- a/services/web/app/src/Features/Project/ProjectController.js +++ b/services/web/app/src/Features/Project/ProjectController.js @@ -733,27 +733,8 @@ const ProjectController = { } ) }, - newPdfPreviewAssignment(cb) { - SplitTestV2Handler.getAssignmentForSession( - req.session, - 'new-pdf-preview', - (err, assignment) => { - cb(err, assignment) - } - ) - }, }, - ( - err, - { - project, - user, - subscription, - isTokenMember, - brandVariation, - newPdfPreviewAssignment, - } - ) => { + (err, { project, user, subscription, isTokenMember, brandVariation }) => { if (err != null) { OError.tag(err, 'error getting details for project page') return next(err) diff --git a/services/web/test/unit/src/HelperFiles/NewLogsUITests.js b/services/web/test/unit/src/HelperFiles/NewLogsUITests.js index 8e2d327bed..e526862903 100644 --- a/services/web/test/unit/src/HelperFiles/NewLogsUITests.js +++ b/services/web/test/unit/src/HelperFiles/NewLogsUITests.js @@ -9,11 +9,6 @@ const MODULE_PATH = require('path').join( describe('NewLogsUI helper', function () { let NewLogsUI - before(function () { - // We're disabling the Logs UI split test while rolling out the PDF Preview - this.skip() - }) - function userIdFromTime(time) { return ObjectId.createFromTime(time).toString() } diff --git a/services/web/test/unit/src/Project/ProjectControllerTests.js b/services/web/test/unit/src/Project/ProjectControllerTests.js index f0b4c57f7d..c11ede8dc6 100644 --- a/services/web/test/unit/src/Project/ProjectControllerTests.js +++ b/services/web/test/unit/src/Project/ProjectControllerTests.js @@ -139,9 +139,6 @@ describe('ProjectController', function () { getAssignment: sinon.stub().resolves({ active: false }), assignInLocalsContext: sinon.stub().resolves(), }, - getAssignmentForSession: sinon - .stub() - .yields(null, { variant: 'variant' }), getAssignment: sinon.stub().yields(null, { active: false }), assignInLocalsContext: sinon.stub().yields(null), }