html-reporter 9.3.0 → 9.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,5 +2,8 @@
2
2
 
3
3
  module.exports = {
4
4
  ALL: 'all',
5
- FAILED: 'failed'
5
+ PASSED: 'passed',
6
+ FAILED: 'failed',
7
+ RETRIED: 'retried',
8
+ SKIPPED: 'skipped'
6
9
  };
@@ -18,14 +18,6 @@ const {DATABASE_URLS_JSON_NAME, LOCAL_DATABASE_NAME} = require('../../constants/
18
18
  const {formatId, getShortMD5, mkFullTitle, mergeDatabasesForReuse, filterByEqualDiffSizes} = require('./utils');
19
19
  const {getTestsTreeFromDatabase} = require('../../db-utils/server');
20
20
 
21
- const lookSameAsync = (img1, img2, opts) => {
22
- return new Promise((resolve, reject) => {
23
- looksSame(img1, img2, opts, (err, data) => {
24
- err ? reject(err) : resolve(data);
25
- });
26
- });
27
- };
28
-
29
21
  module.exports = class ToolRunner {
30
22
  static create(paths, hermione, configs) {
31
23
  return new this(paths, hermione, configs);
@@ -135,7 +127,7 @@ module.exports = class ToolRunner {
135
127
  const equalImages = await Promise.filter(comparedImages, async (image) => {
136
128
  try {
137
129
  await Promise.mapSeries(image.diffClusters, async (diffCluster, i) => {
138
- const refComparisonRes = await lookSameAsync(
130
+ const refComparisonRes = await looksSame(
139
131
  {source: this._resolveImgPath(selectedImage.expectedImg.path), boundingBox: selectedImage.diffClusters[i]},
140
132
  {source: this._resolveImgPath(image.expectedImg.path), boundingBox: diffCluster},
141
133
  compareOpts
@@ -145,7 +137,7 @@ module.exports = class ToolRunner {
145
137
  return Promise.reject(false);
146
138
  }
147
139
 
148
- const actComparisonRes = await lookSameAsync(
140
+ const actComparisonRes = await looksSame(
149
141
  {source: this._resolveImgPath(selectedImage.actualImg.path), boundingBox: selectedImage.diffClusters[i]},
150
142
  {source: this._resolveImgPath(image.actualImg.path), boundingBox: diffCluster},
151
143
  compareOpts
@@ -51,11 +51,6 @@ class ControlButtons extends Component {
51
51
  />
52
52
  </div>
53
53
  <GroupTestsSelect />
54
- <ControlButton
55
- label="Show skipped"
56
- isActive={view.showSkipped}
57
- handler={actions.toggleSkipped}
58
- />
59
54
  <ControlSelect
60
55
  label="Diff mode"
61
56
  value={view.diffMode}
@@ -7,7 +7,6 @@ import {bindActionCreators} from 'redux';
7
7
  import {ROOT} from '../../constants/extension-points';
8
8
  import * as actions from '../modules/actions';
9
9
  import ControlButtons from './controls/gui-controls';
10
- import SkippedList from './skipped-list';
11
10
  import Loading from './loading';
12
11
  import ModalContainer from '../containers/modal';
13
12
  import MainTree from './main-tree';
@@ -84,7 +83,6 @@ class Gui extends Component {
84
83
  <FaviconChanger />
85
84
  <ControlButtons />
86
85
  <main className="container">
87
- <SkippedList />
88
86
  <MainTree />
89
87
  </main>
90
88
  <Loading active={loading.active} content={loading.content} />
@@ -8,24 +8,24 @@ import Summary from './summary';
8
8
  import './header.css';
9
9
 
10
10
  class Header extends Component {
11
- static propTypes = {
12
- date: PropTypes.string
13
- };
11
+ static propTypes = {
12
+ date: PropTypes.string
13
+ };
14
14
 
15
- render() {
16
- const {date} = this.props;
15
+ render() {
16
+ const {date} = this.props;
17
17
 
18
- const dateBlock = date ? (
19
- <div className="header__date">created at {date}</div>
20
- ) : null;
18
+ const dateBlock = date ? (
19
+ <div className="header__date">created at {date}</div>
20
+ ) : null;
21
21
 
22
- return (
23
- <header className="header container">
24
- <Summary />
25
- {dateBlock}
26
- </header>
27
- );
28
- }
22
+ return (
23
+ <header className="header container">
24
+ <Summary />
25
+ {dateBlock}
26
+ </header>
27
+ );
28
+ }
29
29
  }
30
30
 
31
31
  export default connect((state) => {
@@ -9,7 +9,6 @@ import * as actions from '../modules/actions';
9
9
  import Loading from './loading';
10
10
  import Header from './header';
11
11
  import ControlButtons from './controls/report-controls';
12
- import SkippedList from './skipped-list';
13
12
  import MainTree from './main-tree';
14
13
  import CustomScripts from './custom-scripts';
15
14
  import FaviconChanger from './favicon-changer';
@@ -55,7 +54,6 @@ class Report extends Component {
55
54
  <Header/>
56
55
  <ControlButtons/>
57
56
  <main className="container">
58
- <SkippedList />
59
57
  <MainTree />
60
58
  </main>
61
59
  <BottomProgressBar />
@@ -89,8 +89,8 @@ class Suites extends Component {
89
89
  msgs.push(`test name should match to "${testNameFilter}" ${strictMatchFilter ? '' : 'not '}strictly;`);
90
90
  }
91
91
 
92
- if (viewMode === viewModes.FAILED) {
93
- msgs.push(`test should be failed due to selected view mode: "Show only ${viewMode}";`);
92
+ if (viewMode !== viewModes.ALL) {
93
+ msgs.push(`test should be ${viewMode} due to selected view mode;`);
94
94
  }
95
95
 
96
96
  if (filteredBrowsers) {