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

Configuration layer overhaul #36

Merged
merged 50 commits into from
May 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
3606875
refactor: metadata squashing
noomorph Feb 21, 2024
8997611
feat: allure.fullName(string)
noomorph Mar 1, 2024
d0cee56
feat: allure.displayName(string)
noomorph Mar 1, 2024
258bf82
fix: restore docblock parsing partially
noomorph Mar 8, 2024
6c830a1
feat: add typescript parsing
noomorph Mar 11, 2024
29773c4
refactor: almost there
noomorph Mar 15, 2024
5bb0d0f
refactor: start work on docblock
noomorph Mar 15, 2024
aa02155
refactor: move autoIndent
noomorph Mar 15, 2024
83a81bd
refactor: simplify plugins system
noomorph Mar 16, 2024
94ca838
more fixes
noomorph Mar 16, 2024
a973c56
minor fixes
noomorph Mar 16, 2024
142c242
resurrect docblock :happy:
noomorph Mar 16, 2024
c1b1abe
demolishing plugins...
noomorph Mar 22, 2024
bf0323b
refactored options
noomorph Mar 22, 2024
4bf382f
simplification of types
noomorph Mar 23, 2024
0e849bb
advance my path to testStep customizing
noomorph Mar 23, 2024
54ca3ea
wip wip wip
noomorph Mar 29, 2024
0c7343d
wip and wipper
noomorph Mar 30, 2024
9e2d164
wip: add initial labels and links implementations
noomorph Mar 31, 2024
680cb36
wip: return part of the plugins to helpers
noomorph Apr 4, 2024
1fd0e46
wip: more regular types
noomorph Apr 5, 2024
052e5f3
wip
noomorph Apr 5, 2024
df2da81
achieve compile+tests passing
noomorph Apr 6, 2024
1f776a4
quick and dirty changes to make it run
noomorph Apr 6, 2024
c6c184f
so it runs
noomorph Apr 6, 2024
290615b
restore code parsing
noomorph Apr 8, 2024
db3b52c
docs: update docusaurus website
noomorph Apr 9, 2024
40c7567
omg: it works
noomorph Apr 12, 2024
7f71b60
fix lint
noomorph Apr 12, 2024
977d831
more nice fixes and features
noomorph Apr 13, 2024
35d6b43
added more annotations
noomorph Apr 14, 2024
2160b99
make decorators both TS and ES-compliant
noomorph Apr 14, 2024
63d452a
chore: remove coffee plugin to e2e project
noomorph Apr 14, 2024
31732ae
fix: handle multiple tags in tag
noomorph Apr 14, 2024
72f69b7
test: add e2e coverage and fix found issues
noomorph Apr 15, 2024
701f62f
add more tests
noomorph Apr 16, 2024
d4b9533
test: found bug with nested steps
noomorph Apr 25, 2024
8cc3624
fixing issues
noomorph Apr 26, 2024
67763ee
more convenient labels-links
noomorph Apr 26, 2024
1b64c44
error fixes
noomorph Apr 26, 2024
f9e236c
test(e2e): add timeout test
noomorph Apr 26, 2024
7854362
add much more tests
noomorph Apr 26, 2024
1d10b4b
cover with basic set of tests
noomorph Apr 26, 2024
7814c05
fix nested steps bug
noomorph Apr 27, 2024
10fa983
tests: enable coffee
noomorph Apr 27, 2024
6687802
bare descriptions, uuid support, extendability support
noomorph May 3, 2024
1f1a0bd
add first two micro-presets
noomorph May 3, 2024
d96cbc1
fix unhandled error
noomorph May 3, 2024
0ce4335
add fallback mechanism for source locations
noomorph May 3, 2024
2cc5357
numerous fixes and logging
noomorph May 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 0 additions & 7 deletions docs/docs/api/01-descriptions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ import TabItem from '@theme/TabItem';

# Descriptions

:::caution

This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
Please use GitHub docs for the latest stable version, `1.x.x`.

:::

A well-written description can enhance the usefulness of a test by providing clear context and expected outcomes.
Anyone who sees your test for the first time may benefit from a rich description.

Expand Down
7 changes: 0 additions & 7 deletions docs/docs/api/02-steps.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ import TabItem from '@theme/TabItem';

# Steps

:::caution

This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
Please use GitHub docs for the latest stable version, `1.x.x`.

:::

Steps are the building blocks of your tests.

Each test is composed of one or more steps, and each step can have its own [status](../config/02-statuses.mdx),
Expand Down
7 changes: 0 additions & 7 deletions docs/docs/api/03-attachments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ import TabItem from '@theme/TabItem';

# Attachments

:::caution

This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
Please use GitHub docs for the latest stable version, `1.x.x`.

:::

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.

There are several ways to add attachments to a test:
Expand Down
7 changes: 0 additions & 7 deletions docs/docs/api/04-parameters.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@ description: Parametrize your tests and steps

# Parameters

:::caution

This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
Please use GitHub docs for the latest stable version, `1.x.x`.

:::

Utilize parameterized testing to avoid code duplication and reduce your maintenance costs:

```js
Expand Down
7 changes: 0 additions & 7 deletions docs/docs/api/05-people.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ import TabItem from '@theme/TabItem';

# People

:::caution

This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
Please use GitHub docs for the latest stable version, `1.x.x`.

:::

In Allure reports, you can indicate who is the **owner** of any given test case.
This allows for better organization, responsibility allocation, and communication within your team.
Advanced solutions can leverage this information to notify the relevant people about test failures
Expand Down
7 changes: 0 additions & 7 deletions docs/docs/api/06-severity.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ import TabItem from '@theme/TabItem';

# Severity

:::caution

This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
Please use GitHub docs for the latest stable version, `1.x.x`.

:::

In Allure reports, you can determine the **severity** of each test case.
This helps you to prioritize the test cases and to determine the impact of a failed test case.
The severity can be one of the following values: _blocker_, _critical_, _normal_, _minor_, _trivial_.
Expand Down
7 changes: 0 additions & 7 deletions docs/docs/api/07-links.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ import TabItem from '@theme/TabItem';

# Links

:::caution

This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
Please use GitHub docs for the latest stable version, `1.x.x`.

:::

In Allure reports, you can add different types of links to your test cases for better context and traceability, e.g.:

* links to **issues** in your issue tracker (e.g. JIRA, GitHub, etc.);
Expand Down
7 changes: 0 additions & 7 deletions docs/docs/api/08-labels.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@ description: Tag your tests to provide additional context and detail.

# Labels

:::caution

This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
Please use GitHub docs for the latest stable version, `1.x.x`.

:::

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.

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.
Expand Down
7 changes: 0 additions & 7 deletions docs/docs/config/01-grouping/01-by-suite.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ import TabItem from '@theme/TabItem';

# By Suite

:::caution

This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
Please use GitHub docs for the latest stable version, `1.x.x`.

:::

This is perhaps the most common way to group test results, and it makes the most sense for projects using Jest.

![Grouping by suite](../../../img/screenshots/config-01-grouping-01.jpg)
Expand Down
7 changes: 0 additions & 7 deletions docs/docs/config/01-grouping/02-by-story.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ import TabItem from '@theme/TabItem';

# By Story

:::caution

This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
Please use GitHub docs for the latest stable version, `1.x.x`.

:::


This grouping option is a concept that comes from the [Behavior-Driven Development](https://en.wikipedia.org/wiki/Behavior-driven_development) (BDD) methodology.
Unlike the [suite-based grouping](01-by-suite.mdx), which is based on the technical structure of your test suite, the story-based grouping
Expand Down
7 changes: 0 additions & 7 deletions docs/docs/config/01-grouping/03-by-package.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@ import TabItem from '@theme/TabItem';

# By Package

:::caution

This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
Please use GitHub docs for the latest stable version, `1.x.x`.

:::

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

This grouping feature is the least helpful outside of Java world, where packages are used to organize the codebase.
Expand Down
7 changes: 0 additions & 7 deletions docs/docs/config/01-grouping/04-by-category.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ import TabItem from '@theme/TabItem';

# By Category

:::caution

This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
Please use GitHub docs for the latest stable version, `1.x.x`.

:::

![Defect categories](../../../img/screenshots/config-03-errors-01.jpg)

One of the most important things when your builds start failing is to understand _what exactly is broken_.
Expand Down
7 changes: 0 additions & 7 deletions docs/docs/config/01-grouping/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@ import DocCardList from '@theme/DocCardList';

# Grouping

:::caution

This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
Please use GitHub docs for the latest stable version, `1.x.x`.

:::

**Grouping** is a feature that allows you to view test results from different perspectives and gain insights quickly.

The more thought you put into organizing your test results, the more value the members of your team will get from the reports,
Expand Down
17 changes: 5 additions & 12 deletions docs/docs/config/02-statuses.mdx
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
---
description: Have an informative overview of your test results.
verified: true
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Statuses

:::caution

This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
Please use GitHub docs for the latest stable version, `1.x.x`.

:::

Jest Allure 2 Reporter supports all the standard statuses defined by the Allure Framework.

It provides a clear indication whether your test cases have [`passed`], [`failed`], were [`broken`],
Expand Down Expand Up @@ -71,8 +62,10 @@ module.exports = {
reporters: [
// ...
['jest-allure2-reporter', {
// highlight-next-line
status: ({ value }) => value === 'broken' ? 'failed' : value,
testCase: {
// highlight-next-line
status: ({ value }) => value === 'broken' ? 'failed' : value,
},
}],
],
};
Expand Down
13 changes: 3 additions & 10 deletions docs/docs/config/04-environment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ import TabItem from '@theme/TabItem';

# Environment

:::caution

This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
Please use GitHub docs for the latest stable version, `1.x.x`.

:::

**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.

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.
Expand All @@ -39,9 +32,9 @@ module.exports = {
reporters: [
// ...
['jest-allure2-reporter', {
environment: ({ _, package }) => ({
'package.name': package.name,
'package.version': package.version,
environment: async ({ manifest }) => ({
'package.name': await manifest((p) => p.name),
'package.version': await manifest((p) => p.version),
'os.type': os.type(),

..._
Expand Down
7 changes: 0 additions & 7 deletions docs/docs/config/05-executor.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ import TabItem from '@theme/TabItem';

# Executor

:::caution

This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
Please use GitHub docs for the latest stable version, `1.x.x`.

:::

**Executor** information is crucial as it allows you to identify the entity or system that executed the tests.
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.

Expand Down
7 changes: 0 additions & 7 deletions docs/docs/config/06-history.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@ description: Monitor long-term trends in your test execution.

# History

:::caution

This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
Please use GitHub docs for the latest stable version, `1.x.x`.

:::

![History](../../img/screenshots/config-history-01.jpg)

One of notable features of Allure 2 is the ability to monitor _test retries_ and _long-term trends_ in your test execution.
Expand Down
7 changes: 0 additions & 7 deletions docs/docs/config/07-errors.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@ description: Distinguish between types of test failures.

# Error handling 🚧

:::caution

This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
Please use GitHub docs for the latest stable version, `1.x.x`.

:::

:::danger

This article is just a draft. It is not yet complete, and you should not read it meanwhile :)
Expand Down
13 changes: 3 additions & 10 deletions docs/docs/config/index.mdx
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
---
sidebar_position: 2
verified: true
---

import DocCardList from '@theme/DocCardList';

# Config

:::caution

This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
Please use GitHub docs for the latest stable version, `1.x.x`.

:::

Configure once and enjoy these features in all your tests.

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

<DocCardList />
:::component{name="DocCardList"}
:::

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