Comments (7)
@edumserrano @Aroot42 Thank you for the suggestions about the title width.
Percentage width should not work, because it is not a simple table.
I agree that the default width of title should takes as much space as possible. This should be possible if do some calculations. let me do some research first.
from monocart-reporter.
the column width is customizable
// playwright.config.js
module.exports = {
reporter: [
['monocart-reporter', {
name: "My Test Report",
outputFile: './test-results/report.html',
// custom columns
columns: (defaultColumns) => {
// find title column
const titleColumn = defaultColumns.find((column) => column.id === 'title');
titleColumn.width = 500;
titleColumn.maxWidth = 2000;
}
}]
]
};
from monocart-reporter.
I saw that on the docs, you are right. My request was to try and make the default more user friendly.
Could the default try to be set using the above logic?
Because the problem is I don't know what fixed width to use. That would change depending on how the test titles change. I could just keep updating the fixed width, that's a solution indeed. I was trying to see if the report could have a better default for the title column.
from monocart-reporter.
The title width is 300 by default. What do you think the default width should be?
Maybe we can't find a most suitable default width, because users can view the report on their mobile phones.
from monocart-reporter.
Maybe you should think about stretching all the columns to 100% of the width of the screen, and setting the width of the columns to %?
from monocart-reporter.
My suggestion was:
if possible, make it so that the default width for the title column takes as much space as possible in attempt to display all titles without cropping. So in my test case it should look like this by default:
So the rules would be:
- find the max column width the title column could have. This might vary depending on screen resolution and number of columns in a report.
- find the test title with the longest width
- try to make the title column have enough width to display the largest title
- if the column with for the largest title is higher than the max column width then set the it to the max column width.
As @Aroot42 pointed out this might be something that can be achieved with some CSS instead of having to do any calculations. The above rules were just to explain my reasoning.
from monocart-reporter.
Tested on version 1.6.33
and it's working as expected.
Thank you @cenfun 🎉
Awesome work as always.
from monocart-reporter.
Related Issues (20)
- Error: unexpected end of json input HOT 9
- [QUESTION] How to to pull the test title for each test item into the test rail report HOT 2
- Screen shots not attached to email report HOT 3
- Question: is onEnd() hook invoked after the playwright global teardown function or before? HOT 2
- Add metadata as a column HOT 4
- Open on failure HOT 2
- 建议将测试用例名称的tag字符直接渲染 HOT 5
- Merge playwright and vitest v8 coverage reports HOT 12
- Post monocart-reporter installation, execution happens only on chrome HOT 9
- merge() doesn't honor trace traceViewerUrl option HOT 2
- 用例详情页面,点击trace按钮,打开了错误的trace文件 HOT 2
- [REQUEST] Integration with browser stack tc management HOT 6
- test输入中文,trace无法被打开 HOT 2
- [Bug] Coverage report not working in 2.4.5 HOT 3
- [Bug] I have no arrow for expand test info HOT 1
- [Help] Only file scss on coverage v8 on type file js HOT 5
- [Suggest ] 建议 playwright的进程被ctrl +c 或者vscode 插件 关闭后,monocart-reporter仍输出报告 HOT 10
- [Bug] in the testrail.js Skipped tests are marked as passed in Testrail testrun HOT 9
- [Question] Put Style Tags in new column HOT 4
- github summary HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from monocart-reporter.