-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Support externalising attachments in HTML formatter #2413
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
Merged
Merged
Changes from 20 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
a7e7ab6
declare options type for formatter
davidjgoss bcf16a2
make directory available in formatter
davidjgoss 30988ab
upgrade html-formatter
davidjgoss 6eb8838
enable logging in formatter plugin
davidjgoss bb46134
ignore all files in reports dir
davidjgoss 0e2c22f
use optionsKey to drill down for options
davidjgoss c5daee4
add scenario
davidjgoss ff40cee
fix options drilling
davidjgoss 14af080
add mime dependency
davidjgoss 6a2e7bd
implement externalisation
davidjgoss 186762c
more aggressive handling of misconfiguration
davidjgoss cace7f1
add documentation
davidjgoss 5fdd358
add to interface
davidjgoss 2db209b
fix audit issues
davidjgoss 6c57c29
update html-formatter
davidjgoss 0aaabb4
implement new link function on world
davidjgoss 9579dfc
update api-extractor output
davidjgoss 7b1c71e
exception for uri-list in html externalise
davidjgoss 180fa8b
documentation
davidjgoss 9a76c78
update CHANGELOG.md
davidjgoss 22f3d06
just dont say just
davidjgoss 1cf1232
update html-formatter and use named export
davidjgoss e51fdb3
Merge remote-tracking branch 'origin/feat/html-externalise' into feat…
davidjgoss a6d7f6c
fix docs
davidjgoss ffbdc5b
add docs links to changelog
davidjgoss 9c10817
tweak changelog wording
davidjgoss 9cfdb2b
Merge branch 'main' into feat/html-externalise
davidjgoss File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| Feature: HTML formatter | ||
|
|
||
| Rule: Attachments except logs are externalised based on the externalAttachments option | ||
|
|
||
| Background: | ||
| Given a file named "features/a.feature" with: | ||
| """ | ||
| Feature: a feature | ||
| Scenario: a scenario | ||
| Given a step | ||
| """ | ||
| And a file named "features/steps.js" with: | ||
| """ | ||
| const {Given, world} = require('@cucumber/cucumber') | ||
|
|
||
| Given('a step', () => { | ||
| world.log('Logging some info') | ||
| world.link('https://cucumber.io') | ||
| world.attach(btoa('Base64 text'), 'base64:text/plain') | ||
| world.attach('Plain text', 'text/plain') | ||
| }) | ||
| """ | ||
|
|
||
| Scenario: Without externalAttachments option | ||
| When I run cucumber-js with `--format html:html.out` | ||
| Then it passes | ||
| And the html formatter output is complete | ||
| And the formatter has no externalised attachments | ||
|
|
||
| Scenario: With externalAttachments option | ||
| When I run cucumber-js with `--format html:html.out --format-options '{"html":{"externalAttachments":true}}'` | ||
| Then it passes | ||
| And the html formatter output is complete | ||
| And the formatter has these external attachments: | ||
| | Base64 text | | ||
| | Plain text | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.