Closed jensencp7 closed 4 months ago
Please try new version 2.4.7:
columns: (defaultColumns) => {
// disable title tags
defaultColumns.find((column) => column.id === 'title').titleTagsDisabled = true;
// add tags column
const index = defaultColumns.findIndex((column) => column.id === 'type');
defaultColumns.splice(index, 0, {
id: 'tags',
name: 'Tags',
width: 150,
formatter: 'tags'
});
}
see example: https://github.com/cenfun/monocart-reporter-examples/tree/main/tests/tags-column
tested on my side works great. just a side note we should probably move tags to the annotations instead of test title.. In your screenshot above the @positive in the test title becomes redundant if we have a separate column for tags. Your choice , let me know.
thanks again !
Yes, it is because the tag is part of the title, personally, I don't think it should be removed. However we can use the new syntax to separate the tag from the title.
test('test', { tag: ['@Negative'] }, async () => {
});
happy , please close :)
Hi Cen ,
How do i put the tags in a new column instead of infront of the test title as seen in screenshot. For example i would like to move it to a new column after the JIRA # column.
below is my reporter config
reporter: [['line'],['monocart-reporter', { name: "Infinity Test Report", outputFile: 'test-results/report.html', tags: { 'Positive': { style: { background: '#0000FF' }, description: 'This is Smoke Test' }, Negative: { background: '#FFA500' } }, // custom columns columns: (defaultColumns) => {
}]],