From cb824bdd3b5911c38cf5da524d51b6bd36036468 Mon Sep 17 00:00:00 2001 From: Antoine Clausse Date: Wed, 25 Sep 2024 12:05:42 +0200 Subject: [PATCH] [web] Initialize BS5 in subscription page (#20476) GitOrigin-RevId: dacb283822eb4628f230a66f49af8bc9a2fa5dde --- .../src/Features/Subscription/SubscriptionController.js | 8 ++++++++ services/web/app/views/subscriptions/dashboard-react.pug | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/services/web/app/src/Features/Subscription/SubscriptionController.js b/services/web/app/src/Features/Subscription/SubscriptionController.js index fe13d92309..0255f3b0d5 100644 --- a/services/web/app/src/Features/Subscription/SubscriptionController.js +++ b/services/web/app/src/Features/Subscription/SubscriptionController.js @@ -232,6 +232,14 @@ async function userSubscriptionPage(req, res) { 'local-ccy-format-v2' ) + // Populates splitTestVariants with a value for the split test name and allows + // Pug to read it + await SplitTestHandler.promises.getAssignment( + req, + res, + 'bootstrap-5-subscription' + ) + const results = await SubscriptionViewModelBuilder.promises.buildUsersSubscriptionViewModel( user, diff --git a/services/web/app/views/subscriptions/dashboard-react.pug b/services/web/app/views/subscriptions/dashboard-react.pug index f0da840b33..19444222c3 100644 --- a/services/web/app/views/subscriptions/dashboard-react.pug +++ b/services/web/app/views/subscriptions/dashboard-react.pug @@ -1,5 +1,9 @@ extends ../layout-marketing +block vars + - bootstrap5PageStatus = 'enabled' // One of 'disabled', 'enabled', and 'queryStringOnly' + - bootstrap5PageSplitTest = 'bootstrap-5-subscription' + block entrypointVar - entrypoint = 'pages/user/subscription/dashboard'