From 40c902ac59b758a314f6a123d71cb59342523dac Mon Sep 17 00:00:00 2001 From: Nizamudeen A Date: Tue, 8 Feb 2022 11:50:29 +0530 Subject: [PATCH] mgr/dashboard: set appropriate baseline branch for applitools All the dashboard PRs are checked against a baseline branch called 'default' in the visual regresstion testing. This will cause issues when testing PRs in different branches. For eg: currently our master and pacific has to save two different screenshots since the two of them differ slightly. Disabling the applitools logs as well because its too 'noisy' Fixes: https://tracker.ceph.com/issues/54190 Signed-off-by: Nizamudeen A --- .../mgr/dashboard/frontend/applitools.config.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/pybind/mgr/dashboard/frontend/applitools.config.js b/src/pybind/mgr/dashboard/frontend/applitools.config.js index c20d3ef542f30..be93a0050c9f1 100644 --- a/src/pybind/mgr/dashboard/frontend/applitools.config.js +++ b/src/pybind/mgr/dashboard/frontend/applitools.config.js @@ -1,3 +1,12 @@ +const fs = require('fs') +var branch = new String(); + +// Read the contents of the ceph_release file to retrieve +// the branch +fs.readFile('../../../../ceph_release', (_, data) => { + branch = data.toString().split('\n')[1]; +}); + module.exports = { appName: 'Ceph Dashboard', batchId: process.env.APPLITOOLS_BATCH_ID, @@ -8,8 +17,9 @@ module.exports = { { width: 800, height: 600, name: 'chrome' }, { width: 800, height: 600, name: 'firefox' } ], - showLogs: true, + showLogs: false, saveDebugData: true, failCypressOnDiff: true, - concurrency: 4 + concurrency: 4, + baselineBranchName: branch }; -- 2.39.5