Fix E2E test reporting message for webhook (#29304)
* Fix testcases failing Webpack compilation * Fix E2E test report message for webhook * Demote more unstable tests * Fix playwright reporting message, better test demotion --------- Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
c2c2bc1efe
Коммит
cf5b4610b1
@@ -3,8 +3,10 @@
|
||||
|
||||
const RESULTS_DIR = 'results';
|
||||
const MOCHAWESOME_REPORT_DIR = 'results/mochawesome-report';
|
||||
const AD_CYCLE_FILE = 'results/ad_cycle.json';
|
||||
|
||||
module.exports = {
|
||||
MOCHAWESOME_REPORT_DIR,
|
||||
RESULTS_DIR,
|
||||
AD_CYCLE_FILE,
|
||||
};
|
||||
|
||||
@@ -9,7 +9,7 @@ const dayjs = require('dayjs');
|
||||
const duration = require('dayjs/plugin/duration');
|
||||
dayjs.extend(duration);
|
||||
|
||||
const {MOCHAWESOME_REPORT_DIR} = require('./constants');
|
||||
const {MOCHAWESOME_REPORT_DIR, AD_CYCLE_FILE} = require('./constants');
|
||||
|
||||
const MAX_FAILED_TITLES = 5;
|
||||
|
||||
@@ -76,6 +76,16 @@ function generateShortSummary(report) {
|
||||
const failedFullTitles = tests.filter((t) => t.fail).map((t) => t.fullTitle);
|
||||
const statsFieldValue = generateStatsFieldValue(stats, failedFullTitles);
|
||||
|
||||
// If AD Cycle file is found, we have data from the Automation Dashboard available
|
||||
// We are able to override the run stats with enriched information
|
||||
const adCycle = readJsonFromFile(AD_CYCLE_FILE);
|
||||
if (!(adCycle instanceof Error)) {
|
||||
stats.passes = adCycle.pass;
|
||||
stats.failures = adCycle.fail;
|
||||
stats.tests = adCycle.pass + adCycle.fail;
|
||||
stats.passPercent = 100 * (stats.passes / stats.tests);
|
||||
}
|
||||
|
||||
return {
|
||||
stats,
|
||||
statsFieldValue,
|
||||
|
||||
Ссылка в новой задаче
Block a user