Skip to content
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

Use cross-platform symbols #635

Merged
merged 2 commits into from
Sep 12, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion features/multiple_formatters.feature
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Feature: Multiple Formatters
Feature: some feature

Scenario: I've declared one step which passes
Given This step is passing
Given This step is passing

1 scenario (1 passed)
1 step (1 passed)
Expand Down
10 changes: 5 additions & 5 deletions features/pretty_formatter.feature
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Feature: Pretty Formatter
Feature: some feature

Scenario: I've declared one step which passes
Given This step is passing
Given This step is passing

1 scenario (1 passed)
1 step (1 passed)
Expand Down Expand Up @@ -130,12 +130,12 @@ Feature: Pretty Formatter
Feature: some feature

Scenario: some scenario
Given a basic step
And a step with a doc string
Given a basic step
And a step with a doc string
\"\"\"
my doc string
\"\"\"
And a basic step
And a basic step

1 scenario (1 passed)
3 steps (3 passed)
Expand Down Expand Up @@ -164,7 +164,7 @@ Feature: Pretty Formatter
Feature: some feature

Scenario: some scenario
Given a table:
Given a table:
| foo\nbar | bar | baz |
| foo\nbar\n\nbaz\n\\boo | bar | baz\nfoo |

Expand Down
2 changes: 1 addition & 1 deletion features/profiles.feature
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Feature: default command line arguments
Feature: some feature

Scenario: some scenario
Given a passing step
Given a passing step

1 scenario (1 passed)
1 step (1 passed)
Expand Down
6 changes: 3 additions & 3 deletions features/rerun_formatter.feature
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Feature: Rerun Formatter
Feature: A

Scenario: 1
Given a passing step
Given a passing step

1 scenario (1 passed)
1 step (1 passed)
Expand All @@ -64,7 +64,7 @@ Feature: Rerun Formatter
Feature: A

Scenario: 1
Given a passing step
Given a passing step

Scenario: 2
✖ Given a failing step
Expand All @@ -75,7 +75,7 @@ Feature: Rerun Formatter
Feature: B

Scenario: 4
Given a passing step
Given a passing step

Scenario: 5
✖ Given a failing step
Expand Down
10 changes: 5 additions & 5 deletions features/target_specific_scenarios_by_line.feature
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Feature: Target specific scenarios
Feature: some feature

Scenario: first scenario
When a step is passing
When a step is passing

1 scenario (1 passed)
1 step (1 passed)
Expand All @@ -52,7 +52,7 @@ Feature: Target specific scenarios
Feature: some feature

Scenario: third scenario
When a step is passing
When a step is passing

Scenario: third scenario
? When a step is pending
Expand All @@ -78,7 +78,7 @@ Feature: Target specific scenarios
Feature: some feature

Scenario: third scenario
When a step is passing
When a step is passing

1 scenario (1 passed)
1 step (1 passed)
Expand All @@ -93,10 +93,10 @@ Feature: Target specific scenarios
Feature: some feature

Scenario: first scenario
When a step is passing
When a step is passing

Scenario: second scenario
When a step is passing
When a step is passing

2 scenarios (2 passed)
2 steps (2 passed)
Expand Down
8 changes: 4 additions & 4 deletions features/target_specific_scenarios_by_tag.feature
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Feature: Target specific scenarios

@a
Scenario: first scenario
When a step is passing
When a step is passing

1 scenario (1 passed)
1 step (1 passed)
Expand All @@ -59,7 +59,7 @@ Feature: Target specific scenarios

@a
Scenario: first scenario
When a step is passing
When a step is passing

1 scenario (1 passed)
1 step (1 passed)
Expand All @@ -75,7 +75,7 @@ Feature: Target specific scenarios

@b @c
Scenario: second scenario
When a step is passing
When a step is passing

@b @c
Scenario: second scenario
Expand Down Expand Up @@ -117,7 +117,7 @@ Feature: Target specific scenarios

@b @c
Scenario: second scenario
When a step is passing
When a step is passing

@b @c
Scenario: second scenario
Expand Down
7 changes: 4 additions & 3 deletions lib/cucumber/listener/pretty_formatter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
function PrettyFormatter(options) {
var Cucumber = require('../../cucumber');
var figures = require('figures');

var colors = Cucumber.Util.Colors(options.useColors);
var self = Cucumber.Listener.Formatter(options);
Expand All @@ -16,9 +17,9 @@ function PrettyFormatter(options) {
};

var characters = {};
characters[Cucumber.Status.AMBIGUOUS] = '✖';
characters[Cucumber.Status.FAILED] = '✖';
characters[Cucumber.Status.PASSED] = '✓';
characters[Cucumber.Status.AMBIGUOUS] = figures.cross;
characters[Cucumber.Status.FAILED] = figures.cross;
characters[Cucumber.Status.PASSED] = figures.tick;
characters[Cucumber.Status.PENDING] = '?';
characters[Cucumber.Status.SKIPPED] = '-';
characters[Cucumber.Status.UNDEFINED] = '?';
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
"commander": "^2.9.0",
"cucumber-html": "^0.2.3",
"duration": "^0.2.0",
"figures": "1.7.0",
"gherkin": "^4.0.0",
"glob": "^7.0.0",
"is-generator": "^1.0.2",
Expand Down
8 changes: 4 additions & 4 deletions spec/cucumber/listener/pretty_formatter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ describe("Cucumber.Listener.PrettyFormatter", function () {

it('logs the keyword and name', function () {
var expected =
' ' + colors.green(' step-keyword step-name') + '\n';
' ' + colors.green(' step-keyword step-name') + '\n';
expect(logged).toEqual(expected);
});
});
Expand Down Expand Up @@ -296,7 +296,7 @@ describe("Cucumber.Listener.PrettyFormatter", function () {

it('logs the keyword', function () {
var expected =
' step-keyword ' + '\n';
' step-keyword ' + '\n';
expect(colors.strip(logged)).toEqual(expected);
});
});
Expand All @@ -315,7 +315,7 @@ describe("Cucumber.Listener.PrettyFormatter", function () {

it('logs the keyword and name and data table', function () {
var expected =
' step-keyword step-name' + '\n' +
' step-keyword step-name' + '\n' +
' | cuk | cuke | cukejs |' + '\n' +
' | c | cuke | cuke.js |' + '\n' +
' | cu | cuke | cucumber |' + '\n';
Expand All @@ -333,7 +333,7 @@ describe("Cucumber.Listener.PrettyFormatter", function () {

it('logs the keyword and name and doc string', function () {
var expected =
' step-keyword step-name' + '\n' +
' step-keyword step-name' + '\n' +
' """' + '\n' +
' this is a multiline' + '\n' +
' doc string' + '\n' +
Expand Down