Skip to content

Including DataTables in pretty-plugin terminal output #2320

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
artysidorenko opened this issue Jun 20, 2021 · 3 comments
Closed

Including DataTables in pretty-plugin terminal output #2320

artysidorenko opened this issue Jun 20, 2021 · 3 comments
Labels
⚡ enhancement Request for new functionality
Milestone

Comments

@artysidorenko
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Currently when you run scenarios with data tables, the table input is not included in the terminal output.

Describe the solution you'd like
Would like to include these tables in the output. I've got a forked branch that shows a sample of the required changes I think, however wasn't sure if it's something you would like to have as part of the existing plugin, switched on by default, or if these tables were originally excluded by design, and it's better to have it as some separate option if at all. Let me know what you think.

Describe alternatives you've considered
Was manually printing the tables via the step definitions, however the order of the items in the output was confusing.

@mpkorstanje
Copy link
Contributor

This is a good suggestion!

To implement this the TablePrinter could be reused.

Though it currently prints everything at a fixed indent and escapes the cell content. The latter isn't great for readability. So this could be made configurable. Something like:

DataTablePrinter printer = DataTablePrinter.builder()
    .indent("      ")
    .escapeCells(false)
    .build();

printer.print(table, out);

Additionally the current TablePrinter and would need a once over to be made part of the public API. Would you like to prepare the PRs for this?

@artysidorenko
Copy link
Contributor Author

Sure, I'll put something together. Hadn't come across the cucumber/common repo yet but I'll familiarise myself and have a stab at it 👍

@mpkorstanje
Copy link
Contributor

Fixed by #2330

@mpkorstanje mpkorstanje added this to the v7.0.0 milestone Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚡ enhancement Request for new functionality
Projects
None yet
Development

No branches or pull requests

3 participants