html-reporter 7.6.1 → 8.0.1

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,56 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ <a name="8.0.1"></a>
6
+ ## [8.0.1](https://github.com/gemini-testing/html-reporter/compare/v8.0.0...v8.0.1) (2021-12-01)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **gui:** stop endlessly restarting tests ([#412](https://github.com/gemini-testing/html-reporter/issues/412)) ([fb8a397](https://github.com/gemini-testing/html-reporter/commit/fb8a397))
12
+
13
+
14
+
15
+ <a name="8.0.0"></a>
16
+ # [8.0.0](https://github.com/gemini-testing/html-reporter/compare/v7.7.1...v8.0.0) (2021-11-25)
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * update better-sqlite to support Node 16 ([0df4cb5](https://github.com/gemini-testing/html-reporter/commit/0df4cb5))
22
+
23
+
24
+ ### Chores
25
+
26
+ * drop nodejs <= 12 support ([afbc1a5](https://github.com/gemini-testing/html-reporter/commit/afbc1a5))
27
+
28
+
29
+ ### BREAKING CHANGES
30
+
31
+ * drop nodejs <= 12.x support
32
+
33
+
34
+
35
+ <a name="7.7.1"></a>
36
+ ## [7.7.1](https://github.com/gemini-testing/html-reporter/compare/v7.7.0...v7.7.1) (2021-11-18)
37
+
38
+
39
+ ### Bug Fixes
40
+
41
+ * **gui:** reconnect to database on tests end event ([#411](https://github.com/gemini-testing/html-reporter/issues/411)) ([002b43d](https://github.com/gemini-testing/html-reporter/commit/002b43d))
42
+
43
+
44
+
45
+ <a name="7.7.0"></a>
46
+ # [7.7.0](https://github.com/gemini-testing/html-reporter/compare/v7.6.1...v7.7.0) (2021-11-09)
47
+
48
+
49
+ ### Features
50
+
51
+ * add ability to share html-reporter components with its plugins ([#407](https://github.com/gemini-testing/html-reporter/issues/407)) ([f95b50f](https://github.com/gemini-testing/html-reporter/commit/f95b50f))
52
+
53
+
54
+
5
55
  <a name="7.6.1"></a>
6
56
  ## [7.6.1](https://github.com/gemini-testing/html-reporter/compare/v7.6.0...v7.6.1) (2021-11-08)
7
57
 
package/README.md CHANGED
@@ -256,7 +256,7 @@ directory.
256
256
  The routes then can be called from the plugin React components defined in the `plugin.js`. For convenience the plugin name is always passed with options when function- or array-returning form is used to export plugin as the function options property `pluginName`:
257
257
 
258
258
  ```js
259
- export default ['react', 'axios', function(React, axios, {pluginName, pluginConfig, actions, selectors}) {
259
+ export default ['react', 'axios', function(React, axios, {pluginName, pluginConfig, actions, actionNames, selectors}) {
260
260
  class PluginComponent extends React.Component {
261
261
  // ... somewhere inside the component ...
262
262
  const result = await axios.get(`/plugin-routes/${pluginName}/plugin-route`);
@@ -270,9 +270,49 @@ directory.
270
270
  ```
271
271
 
272
272
  In the example you can also see another convenient properties:
273
+ - `pluginName` - plugin name;
274
+ - `pluginConfig` - plugin configuration;
273
275
  - `actions` - the html-reporter **Redux** actions;
274
- - `selectors` - the memoized html-reporter selectors which created using **reselect** library
275
- - `pluginConfig` - plugin configuration.
276
+ - `actionNames` - the html-reporter action names, that used in **Redux** actions. To be able to subscribe on html-reporter events;
277
+ - `selectors` - the memoized html-reporter selectors which created using **reselect** library.
278
+
279
+
280
+ Available dependencies:
281
+ - `react`
282
+ - `redux`
283
+ - `react-redux`
284
+ - `lodash`
285
+ - `prop-types`
286
+ - `classnames`
287
+ - `semantic-ui-react`
288
+ - `react-markdown`
289
+ - `reduce-reducers`
290
+ - `immer`
291
+ - `reselect`
292
+ - `axios`
293
+
294
+ Available components:
295
+ - `components`
296
+ - `<Details />` - component which allows users to toggle the display of content.
297
+ Example of usage:
298
+ ```js
299
+ // ... inside your react component
300
+ render() {
301
+ return <Details
302
+ title='Some title'
303
+ content='Some content' // content that will appear when you click on the title
304
+ extendClassNames='some_class_name' // ability to add own css-classes to component
305
+ onClick={() => console.log('clicked')} // ability to add handler
306
+ />
307
+ }
308
+ ```
309
+
310
+ , where:
311
+
312
+ * **title** (required) `String|JSX.Element` - title that describes information hidden underneath.
313
+ * **content** (required) `Function|String|Array<String>|JSX.Element` - content that will appear after click on the title.
314
+ * **extendClassNames** (optional) `String|Array<String>` - ability to add own css classes to the component.
315
+ * **onClick** (optional) `Function` - handler that will be called when the title is clicked.
276
316
 
277
317
  #### Extension points
278
318
 
package/lib/gui/server.js CHANGED
@@ -54,9 +54,10 @@ exports.start = async ({paths, hermione, guiApi, configs}) => {
54
54
  res.json(app.data);
55
55
  });
56
56
 
57
- server.post('/run', async (req, res) => {
57
+ server.post('/run', (req, res) => {
58
58
  try {
59
- await app.run(req.body);
59
+ // do not wait for completion so that response does not hang and browser does not restart it by timeout
60
+ app.run(req.body);
60
61
  res.sendStatus(OK);
61
62
  } catch (e) {
62
63
  res.status(INTERNAL_SERVER_ERROR).send(`Error while trying to run tests: ${e.message}`);
@@ -16,11 +16,15 @@ export default class Details extends Component {
16
16
  state = {isOpened: false};
17
17
 
18
18
  handleClick = () => {
19
- this.setState({isOpened: !this.state.isOpened});
19
+ this.setState((state, props) => {
20
+ const newState = {isOpened: !state.isOpened};
20
21
 
21
- if (this.props.onClick) {
22
- this.props.onClick();
23
- }
22
+ if (props.onClick) {
23
+ props.onClick(newState);
24
+ }
25
+
26
+ return newState;
27
+ });
24
28
  }
25
29
 
26
30
  render() {
@@ -430,6 +430,7 @@
430
430
  vertical-align: top;
431
431
  }
432
432
  .rc-tree-select-tree-indent-unit {
433
+ width: 16px;
433
434
  display: inline-block;
434
435
  padding-left: 18px;
435
436
  }