woocommerce/.github/actions/tests/slack-summary-on-release/slack-blocks/scripts/create-result-block/utils/set-element-text.js

13 lines
469 B
JavaScript

const setElementText = ( { testType, result, envSlug, releaseVersion } ) => {
const { selectEmoji } = require( './select-emoji' );
const allureReportURL = `https://woocommerce.github.io/woocommerce-test-reports/release/${ releaseVersion }/${ envSlug }/${ testType.toLowerCase() }`;
const emoji = selectEmoji( result );
const textValue = `<${ allureReportURL }|${ testType.toUpperCase() } ${ emoji }>`;
return textValue;
};
module.exports = {
setElementText,
};