-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support externalising attachments in HTML formatter (#2413)
- Loading branch information
1 parent
551efa2
commit 7ef4d0e
Showing
21 changed files
with
332 additions
and
41 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 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 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 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.