Skip to content

Commit b4dd29b

Browse files
authored
Configuration layer overhaul (#36)
1 parent 515559e commit b4dd29b

File tree

366 files changed

+10402
-3598
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

366 files changed

+10402
-3598
lines changed

docs/docs/api/01-descriptions.mdx

-7
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@ import TabItem from '@theme/TabItem';
77

88
# Descriptions
99

10-
:::caution
11-
12-
This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
13-
Please use GitHub docs for the latest stable version, `1.x.x`.
14-
15-
:::
16-
1710
A well-written description can enhance the usefulness of a test by providing clear context and expected outcomes.
1811
Anyone who sees your test for the first time may benefit from a rich description.
1912

docs/docs/api/02-steps.mdx

-7
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@ import TabItem from '@theme/TabItem';
77

88
# Steps
99

10-
:::caution
11-
12-
This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
13-
Please use GitHub docs for the latest stable version, `1.x.x`.
14-
15-
:::
16-
1710
Steps are the building blocks of your tests.
1811

1912
Each test is composed of one or more steps, and each step can have its own [status](../config/02-statuses.mdx),

docs/docs/api/03-attachments.mdx

-7
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@ import TabItem from '@theme/TabItem';
77

88
# Attachments
99

10-
:::caution
11-
12-
This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
13-
Please use GitHub docs for the latest stable version, `1.x.x`.
14-
15-
:::
16-
1710
Attachments are a powerful feature of Allure reports that can help make your tests much more informative. You can attach text logs, screenshots, configuration details, CSV files, and much more to your tests. These attachments can help you diagnose and debug failing tests.
1811

1912
There are several ways to add attachments to a test:

docs/docs/api/04-parameters.mdx

-7
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@ description: Parametrize your tests and steps
44

55
# Parameters
66

7-
:::caution
8-
9-
This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
10-
Please use GitHub docs for the latest stable version, `1.x.x`.
11-
12-
:::
13-
147
Utilize parameterized testing to avoid code duplication and reduce your maintenance costs:
158

169
```js

docs/docs/api/05-people.mdx

-7
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@ import TabItem from '@theme/TabItem';
77

88
# People
99

10-
:::caution
11-
12-
This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
13-
Please use GitHub docs for the latest stable version, `1.x.x`.
14-
15-
:::
16-
1710
In Allure reports, you can indicate who is the **owner** of any given test case.
1811
This allows for better organization, responsibility allocation, and communication within your team.
1912
Advanced solutions can leverage this information to notify the relevant people about test failures

docs/docs/api/06-severity.mdx

-7
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@ import TabItem from '@theme/TabItem';
77

88
# Severity
99

10-
:::caution
11-
12-
This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
13-
Please use GitHub docs for the latest stable version, `1.x.x`.
14-
15-
:::
16-
1710
In Allure reports, you can determine the **severity** of each test case.
1811
This helps you to prioritize the test cases and to determine the impact of a failed test case.
1912
The severity can be one of the following values: _blocker_, _critical_, _normal_, _minor_, _trivial_.

docs/docs/api/07-links.mdx

-7
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@ import TabItem from '@theme/TabItem';
77

88
# Links
99

10-
:::caution
11-
12-
This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
13-
Please use GitHub docs for the latest stable version, `1.x.x`.
14-
15-
:::
16-
1710
In Allure reports, you can add different types of links to your test cases for better context and traceability, e.g.:
1811

1912
* links to **issues** in your issue tracker (e.g. JIRA, GitHub, etc.);

docs/docs/api/08-labels.mdx

-7
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@ description: Tag your tests to provide additional context and detail.
44

55
# Labels
66

7-
:::caution
8-
9-
This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
10-
Please use GitHub docs for the latest stable version, `1.x.x`.
11-
12-
:::
13-
147
Any, or most of the labels can be attached both to test suites and test cases. Practically, this means a cascade-like inheritance of labels from the test suite to the test case level.
158

169
Attach various labels to your tests such as custom tags (value), custom labels (key=value), JIRA, TMS, or any other custom labels to provide additional context and detail.

docs/docs/config/01-grouping/01-by-suite.mdx

-7
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@ import TabItem from '@theme/TabItem';
77

88
# By Suite
99

10-
:::caution
11-
12-
This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
13-
Please use GitHub docs for the latest stable version, `1.x.x`.
14-
15-
:::
16-
1710
This is perhaps the most common way to group test results, and it makes the most sense for projects using Jest.
1811

1912
![Grouping by suite](../../../img/screenshots/config-01-grouping-01.jpg)

docs/docs/config/01-grouping/02-by-story.mdx

-7
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@ import TabItem from '@theme/TabItem';
77

88
# By Story
99

10-
:::caution
11-
12-
This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
13-
Please use GitHub docs for the latest stable version, `1.x.x`.
14-
15-
:::
16-
1710

1811
This grouping option is a concept that comes from the [Behavior-Driven Development](https://en.wikipedia.org/wiki/Behavior-driven_development) (BDD) methodology.
1912
Unlike the [suite-based grouping](01-by-suite.mdx), which is based on the technical structure of your test suite, the story-based grouping

docs/docs/config/01-grouping/03-by-package.mdx

-7
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,6 @@ import TabItem from '@theme/TabItem';
88

99
# By Package
1010

11-
:::caution
12-
13-
This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
14-
Please use GitHub docs for the latest stable version, `1.x.x`.
15-
16-
:::
17-
1811
![Grouping by package](../../../img/screenshots/config-01-grouping-08.jpg)
1912

2013
This grouping feature is the least helpful outside of Java world, where packages are used to organize the codebase.

docs/docs/config/01-grouping/04-by-category.mdx

-7
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@ import TabItem from '@theme/TabItem';
77

88
# By Category
99

10-
:::caution
11-
12-
This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
13-
Please use GitHub docs for the latest stable version, `1.x.x`.
14-
15-
:::
16-
1710
![Defect categories](../../../img/screenshots/config-03-errors-01.jpg)
1811

1912
One of the most important things when your builds start failing is to understand _what exactly is broken_.

docs/docs/config/01-grouping/index.mdx

-7
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@ import DocCardList from '@theme/DocCardList';
22

33
# Grouping
44

5-
:::caution
6-
7-
This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
8-
Please use GitHub docs for the latest stable version, `1.x.x`.
9-
10-
:::
11-
125
**Grouping** is a feature that allows you to view test results from different perspectives and gain insights quickly.
136

147
The more thought you put into organizing your test results, the more value the members of your team will get from the reports,

docs/docs/config/02-statuses.mdx

+5-12
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
11
---
22
description: Have an informative overview of your test results.
3+
verified: true
34
---
45

5-
import Tabs from '@theme/Tabs';
6-
import TabItem from '@theme/TabItem';
7-
86
# Statuses
97

10-
:::caution
11-
12-
This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
13-
Please use GitHub docs for the latest stable version, `1.x.x`.
14-
15-
:::
16-
178
Jest Allure 2 Reporter supports all the standard statuses defined by the Allure Framework.
189

1910
It provides a clear indication whether your test cases have [`passed`], [`failed`], were [`broken`],
@@ -71,8 +62,10 @@ module.exports = {
7162
reporters: [
7263
// ...
7364
['jest-allure2-reporter', {
74-
// highlight-next-line
75-
status: ({ value }) => value === 'broken' ? 'failed' : value,
65+
testCase: {
66+
// highlight-next-line
67+
status: ({ value }) => value === 'broken' ? 'failed' : value,
68+
},
7669
}],
7770
],
7871
};

docs/docs/config/04-environment.mdx

+3-10
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@ import TabItem from '@theme/TabItem';
77

88
# Environment
99

10-
:::caution
11-
12-
This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
13-
Please use GitHub docs for the latest stable version, `1.x.x`.
14-
15-
:::
16-
1710
**Environment** is a feature that allows you to capture and display specific details related to the test execution environment, such as the operating system, browser version, device information, or any other global information that is relevant to the entire test run.
1811

1912
Such information can be especially insightful when you're troubleshooting test failures in a heterogeneous environment, e.g. when tests fail on CI but pass locally, or when you're trying to pinpoint the cause of a test failure on a specific platform or a version of some software.
@@ -39,9 +32,9 @@ module.exports = {
3932
reporters: [
4033
// ...
4134
['jest-allure2-reporter', {
42-
environment: ({ _, package }) => ({
43-
'package.name': package.name,
44-
'package.version': package.version,
35+
environment: async ({ manifest }) => ({
36+
'package.name': await manifest((p) => p.name),
37+
'package.version': await manifest((p) => p.version),
4538
'os.type': os.type(),
4639

4740
..._

docs/docs/config/05-executor.mdx

-7
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@ import TabItem from '@theme/TabItem';
77

88
# Executor
99

10-
:::caution
11-
12-
This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
13-
Please use GitHub docs for the latest stable version, `1.x.x`.
14-
15-
:::
16-
1710
**Executor** information is crucial as it allows you to identify the entity or system that executed the tests.
1811
Typically, this would be a build agent on your CI/CD server, but, in a way, a developer's host machine is also an executor.
1912

docs/docs/config/06-history.mdx

-7
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,6 @@ description: Monitor long-term trends in your test execution.
55

66
# History
77

8-
:::caution
9-
10-
This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
11-
Please use GitHub docs for the latest stable version, `1.x.x`.
12-
13-
:::
14-
158
![History](../../img/screenshots/config-history-01.jpg)
169

1710
One of notable features of Allure 2 is the ability to monitor _test retries_ and _long-term trends_ in your test execution.

docs/docs/config/07-errors.mdx

-7
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@ description: Distinguish between types of test failures.
44

55
# Error handling 🚧
66

7-
:::caution
8-
9-
This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
10-
Please use GitHub docs for the latest stable version, `1.x.x`.
11-
12-
:::
13-
147
:::danger
158

169
This article is just a draft. It is not yet complete, and you should not read it meanwhile :)

docs/docs/config/index.mdx

+3-10
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,17 @@
11
---
22
sidebar_position: 2
3+
verified: true
34
---
45

5-
import DocCardList from '@theme/DocCardList';
6-
76
# Config
87

9-
:::caution
10-
11-
This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
12-
Please use GitHub docs for the latest stable version, `1.x.x`.
13-
14-
:::
15-
168
Configure once and enjoy these features in all your tests.
179

1810
This section discusses those features of `jest-allure2-reporter` that are configurable
1911
globally, opposed to the [API section][API], which focuses on the more intrusive features
2012
of the reporter, which are configurable on a per-test basis.
2113

22-
<DocCardList />
14+
:::component{name="DocCardList"}
15+
:::
2316

2417
[API]: ../api/index.mdx

0 commit comments

Comments
 (0)