]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: set appropriate baseline branch for applitools 44934/head
authorNizamudeen A <nia@redhat.com>
Tue, 8 Feb 2022 06:20:29 +0000 (11:50 +0530)
committerNizamudeen A <nia@redhat.com>
Wed, 9 Feb 2022 06:16:21 +0000 (11:46 +0530)
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 <nia@redhat.com>
src/pybind/mgr/dashboard/frontend/applitools.config.js

index c20d3ef542f301b10bb9e753b60879e22e8ee7b2..be93a0050c9f1b8f9bb20b40dad3260351b55b65 100644 (file)
@@ -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
 };