Skip to content

Commit

Permalink
Merge 5590048 into 58f6d98
Browse files Browse the repository at this point in the history
  • Loading branch information
DesHorsley committed Oct 13, 2019
2 parents 58f6d98 + 5590048 commit e9455d6
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# YACHR
[![Build Status](https://travis-ci.org/yachr/yachr.svg?branch=GH-30)](https://travis-ci.org/yachr/yachr/branches)
[![Build Status](https://travis-ci.org/yachr/yachr.svg?branch=GH-29)](https://travis-ci.org/yachr/yachr/branches)
[![Coverage Status](https://coveralls.io/repos/github/yachr/yachr/badge.svg?branch=develop)](https://coveralls.io/github/yachr/yachr?branch=develop)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
---
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Ability: Understand how features and scenarios are given a status

As a report reader
I wan't to understand how a scenario or feature gets assigned its status
So I can better understand the stats on the report

Scenario: View description of statuses
Given Lina is viewing a cucumber report
Then Lina should be able to see a legend explaining the status
32 changes: 32 additions & 0 deletions e2e/step_definitions/understand-rankings.steps.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// tslint:disable-next-line: file-name-casing
import { expect } from 'chai';
import { Given, Then } from 'cucumber';
import * as fs from 'fs';
import { IReportOptions } from '../../dist/src/models/reportOptions';

import { Reporter } from '../../dist/src/reporter';
const reportLocation = 'e2e/reportOutput/understand-rankings.html';
const jsonOutput = 'e2e/resources/onePassingScenario.json';

let reporter: Reporter;
let reportOptions: IReportOptions;

// tslint:disable-next-line: max-line-length
Given(`Lina is viewing a cucumber report`, () => {
reportOptions = <IReportOptions> {
jsonFile: jsonOutput,
output: reportLocation,
};

reporter = new Reporter();
reporter.generate(reportOptions);
});

Then(`Lina should be able to see a legend explaining the status`, () => {
const report = fs.readFileSync(reportLocation, 'utf8');

const expectedText = 'The status of a scenario or feature is based on the ' +
'worst status of its steps, in order: ambiguous -> failed -> undefined -> pending -> passed';

expect(report.includes(expectedText)).to.equal(true);
});
6 changes: 5 additions & 1 deletion src/templates/standard.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@
overflow: hidden;
}

table i {
vertical-align: middle;
}

.summary-table {
display: table;
width: 80%;
Expand Down Expand Up @@ -328,7 +332,7 @@ <h1>Specification Execution Results</h1>
<header>
<thead>
<tr class="summary-hr-row">
<th class="summary-cell"></th>
<th class="summary-cell"><i class="material-icons" title="The status of a scenario or feature is based on the worst status of its steps, in order: ambiguous -> failed -> undefined -> pending -> passed">info</i></th>
<th class="summary-cell">Failed</th>
<th class="summary-cell">Undefined</th>
<th class="summary-cell">Pending</th>
Expand Down

0 comments on commit e9455d6

Please sign in to comment.