@cucumber/react-components 22.4.2 → 23.1.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.
- package/README.md +35 -139
- package/dist/src/SearchContext.d.ts +12 -0
- package/dist/src/SearchContext.d.ts.map +1 -0
- package/dist/src/SearchContext.js +7 -0
- package/dist/src/SearchContext.js.map +1 -0
- package/dist/src/ciCommitLink.d.ts +2 -2
- package/dist/src/ciCommitLink.d.ts.map +1 -1
- package/dist/src/ciCommitLink.js +1 -1
- package/dist/src/ciCommitLink.js.map +1 -1
- package/dist/src/components/app/CICommitLink.d.ts +5 -7
- package/dist/src/components/app/CICommitLink.d.ts.map +1 -1
- package/dist/src/components/app/CICommitLink.js +12 -9
- package/dist/src/components/app/CICommitLink.js.map +1 -1
- package/dist/src/components/app/CIJobLink.d.ts +5 -7
- package/dist/src/components/app/CIJobLink.d.ts.map +1 -1
- package/dist/src/components/app/CIJobLink.js +8 -9
- package/dist/src/components/app/CIJobLink.js.map +1 -1
- package/dist/src/components/app/ControlledSearchProvider.d.ts +9 -0
- package/dist/src/components/app/ControlledSearchProvider.d.ts.map +1 -0
- package/dist/src/components/app/ControlledSearchProvider.js +15 -0
- package/dist/src/components/app/ControlledSearchProvider.js.map +1 -0
- package/dist/src/components/app/CopyButton.d.ts +5 -0
- package/dist/src/components/app/CopyButton.d.ts.map +1 -0
- package/dist/src/components/app/CopyButton.js +23 -0
- package/dist/src/components/app/CopyButton.js.map +1 -0
- package/dist/src/components/app/CopyButton.module.scss +14 -0
- package/dist/src/components/app/EnvelopesProvider.d.ts +8 -0
- package/dist/src/components/app/EnvelopesProvider.d.ts.map +1 -0
- package/dist/src/components/app/EnvelopesProvider.js +17 -0
- package/dist/src/components/app/EnvelopesProvider.js.map +1 -0
- package/dist/src/components/app/ExecutionSummary.d.ts +2 -12
- package/dist/src/components/app/ExecutionSummary.d.ts.map +1 -1
- package/dist/src/components/app/ExecutionSummary.js +66 -65
- package/dist/src/components/app/ExecutionSummary.js.map +1 -1
- package/dist/src/components/app/ExecutionSummary.module.scss +3 -58
- package/dist/src/components/app/FilteredDocuments.d.ts +3 -0
- package/dist/src/components/app/FilteredDocuments.d.ts.map +1 -0
- package/dist/src/components/app/FilteredDocuments.js +15 -0
- package/dist/src/components/app/FilteredDocuments.js.map +1 -0
- package/dist/src/components/app/GherkinDocumentList.d.ts +4 -4
- package/dist/src/components/app/GherkinDocumentList.d.ts.map +1 -1
- package/dist/src/components/app/GherkinDocumentList.js +26 -25
- package/dist/src/components/app/GherkinDocumentList.js.map +1 -1
- package/dist/src/components/app/GherkinDocumentList.module.scss +6 -6
- package/dist/src/components/app/Header.d.ts +5 -0
- package/dist/src/components/app/Header.d.ts.map +1 -0
- package/dist/src/components/app/Header.js +12 -0
- package/dist/src/components/app/Header.js.map +1 -0
- package/dist/src/components/app/Header.module.scss +43 -0
- package/dist/src/components/app/HealthChart.d.ts +3 -0
- package/dist/src/components/app/HealthChart.d.ts.map +1 -0
- package/dist/src/components/app/HealthChart.js +15 -0
- package/dist/src/components/app/HealthChart.js.map +1 -0
- package/dist/src/components/app/HealthChart.module.scss +9 -0
- package/dist/src/components/app/HighLight.js +2 -2
- package/dist/src/components/app/HighLight.js.map +1 -1
- package/dist/src/components/app/ImplementationIcon.d.ts +6 -0
- package/dist/src/components/app/ImplementationIcon.d.ts.map +1 -0
- package/dist/src/components/app/ImplementationIcon.js +10 -0
- package/dist/src/components/app/ImplementationIcon.js.map +1 -0
- package/dist/src/components/app/InMemorySearchProvider.d.ts +9 -0
- package/dist/src/components/app/InMemorySearchProvider.d.ts.map +1 -0
- package/dist/src/components/app/InMemorySearchProvider.js +10 -0
- package/dist/src/components/app/InMemorySearchProvider.js.map +1 -0
- package/dist/src/components/app/NavigationButton.module.scss +2 -2
- package/dist/src/components/app/NoMatchResult.d.ts +2 -6
- package/dist/src/components/app/NoMatchResult.d.ts.map +1 -1
- package/dist/src/components/app/NoMatchResult.js +2 -4
- package/dist/src/components/app/NoMatchResult.js.map +1 -1
- package/dist/src/components/app/OSIcon.d.ts +4 -3
- package/dist/src/components/app/OSIcon.d.ts.map +1 -1
- package/dist/src/components/app/OSIcon.js +3 -5
- package/dist/src/components/app/OSIcon.js.map +1 -1
- package/dist/src/components/app/QueriesProvider.d.ts +10 -0
- package/dist/src/components/app/QueriesProvider.d.ts.map +1 -0
- package/dist/src/components/app/QueriesProvider.js +6 -0
- package/dist/src/components/app/QueriesProvider.js.map +1 -0
- package/dist/src/components/app/RuntimeIcon.d.ts +4 -3
- package/dist/src/components/app/RuntimeIcon.d.ts.map +1 -1
- package/dist/src/components/app/RuntimeIcon.js +3 -5
- package/dist/src/components/app/RuntimeIcon.js.map +1 -1
- package/dist/src/components/app/SearchBar.d.ts +2 -11
- package/dist/src/components/app/SearchBar.d.ts.map +1 -1
- package/dist/src/components/app/SearchBar.js +35 -30
- package/dist/src/components/app/SearchBar.js.map +1 -1
- package/dist/src/components/app/SearchBar.module.scss +55 -56
- package/dist/src/components/app/StatusesSummary.d.ts +2 -7
- package/dist/src/components/app/StatusesSummary.d.ts.map +1 -1
- package/dist/src/components/app/StatusesSummary.js +4 -2
- package/dist/src/components/app/StatusesSummary.js.map +1 -1
- package/dist/src/components/app/StatusesSummary.module.scss +2 -9
- package/dist/src/components/app/UriProvider.d.ts +5 -0
- package/dist/src/components/app/UriProvider.d.ts.map +1 -0
- package/dist/src/components/app/UriProvider.js +6 -0
- package/dist/src/components/app/UriProvider.js.map +1 -0
- package/dist/src/components/app/UrlSearchProvider.d.ts +8 -0
- package/dist/src/components/app/UrlSearchProvider.d.ts.map +1 -0
- package/dist/src/components/app/UrlSearchProvider.js +26 -0
- package/dist/src/components/app/UrlSearchProvider.js.map +1 -0
- package/dist/src/components/app/icons/CucumberLogo.d.ts +2 -2
- package/dist/src/components/app/icons/CucumberLogo.d.ts.map +1 -1
- package/dist/src/components/app/icons/CucumberLogo.js +1 -1
- package/dist/src/components/app/icons/CucumberLogo.js.map +1 -1
- package/dist/src/components/app/icons/Jvm.d.ts +2 -2
- package/dist/src/components/app/icons/Jvm.d.ts.map +1 -1
- package/dist/src/components/app/icons/Jvm.js +1 -1
- package/dist/src/components/app/icons/Jvm.js.map +1 -1
- package/dist/src/components/app/icons/Linux.d.ts +2 -2
- package/dist/src/components/app/icons/Linux.d.ts.map +1 -1
- package/dist/src/components/app/icons/Linux.js +1 -1
- package/dist/src/components/app/icons/Linux.js.map +1 -1
- package/dist/src/components/app/icons/MacOS.d.ts +2 -2
- package/dist/src/components/app/icons/MacOS.d.ts.map +1 -1
- package/dist/src/components/app/icons/MacOS.js +1 -1
- package/dist/src/components/app/icons/MacOS.js.map +1 -1
- package/dist/src/components/app/icons/NodeJs.d.ts +2 -2
- package/dist/src/components/app/icons/NodeJs.d.ts.map +1 -1
- package/dist/src/components/app/icons/NodeJs.js +4 -32
- package/dist/src/components/app/icons/NodeJs.js.map +1 -1
- package/dist/src/components/app/icons/Ruby.d.ts +2 -2
- package/dist/src/components/app/icons/Ruby.d.ts.map +1 -1
- package/dist/src/components/app/icons/Ruby.js +1 -1
- package/dist/src/components/app/icons/Ruby.js.map +1 -1
- package/dist/src/components/app/icons/Windows.d.ts +2 -2
- package/dist/src/components/app/icons/Windows.d.ts.map +1 -1
- package/dist/src/components/app/icons/Windows.js +1 -1
- package/dist/src/components/app/icons/Windows.js.map +1 -1
- package/dist/src/components/app/index.d.ts +7 -4
- package/dist/src/components/app/index.d.ts.map +1 -1
- package/dist/src/components/app/index.js +7 -4
- package/dist/src/components/app/index.js.map +1 -1
- package/dist/src/components/app/makeSetupString.d.ts +3 -0
- package/dist/src/components/app/makeSetupString.d.ts.map +1 -0
- package/dist/src/components/app/makeSetupString.js +21 -0
- package/dist/src/components/app/makeSetupString.js.map +1 -0
- package/dist/src/components/customise/{customRendering.d.ts → CustomRendering.d.ts} +5 -2
- package/dist/src/components/customise/CustomRendering.d.ts.map +1 -0
- package/dist/src/components/customise/{customRendering.js → CustomRendering.js} +4 -1
- package/dist/src/components/customise/{customRendering.js.map → CustomRendering.js.map} +1 -1
- package/dist/src/components/{CucumberReact.module.scss → customise/CustomRendering.stories.scss} +10 -20
- package/dist/src/components/customise/index.d.ts +1 -1
- package/dist/src/components/customise/index.js +1 -1
- package/dist/src/components/gherkin/Anchor.module.scss +2 -2
- package/dist/src/components/gherkin/Children.module.scss +1 -1
- package/dist/src/components/gherkin/DataTable.module.scss +2 -2
- package/dist/src/components/gherkin/Description.module.scss +2 -2
- package/dist/src/components/gherkin/DocString.module.scss +2 -3
- package/dist/src/components/gherkin/ErrorMessage.module.scss +3 -4
- package/dist/src/components/gherkin/ExampleDetail.module.scss +1 -1
- package/dist/src/components/gherkin/Examples.module.scss +1 -1
- package/dist/src/components/gherkin/ExamplesTable.module.scss +3 -3
- package/dist/src/components/gherkin/Keyword.module.scss +3 -3
- package/dist/src/components/gherkin/Parameter.module.scss +2 -2
- package/dist/src/components/gherkin/StatusIcon.module.scss +4 -11
- package/dist/src/components/gherkin/StepItem.module.scss +0 -1
- package/dist/src/components/gherkin/Tags.module.scss +2 -2
- package/dist/src/components/gherkin/Title.module.scss +2 -2
- package/dist/src/components/gherkin/attachment/Attachment.module.scss +5 -6
- package/dist/src/components/index.d.ts +3 -4
- package/dist/src/components/index.d.ts.map +1 -1
- package/dist/src/components/index.js +3 -4
- package/dist/src/components/index.js.map +1 -1
- package/dist/src/countScenariosByStatuses.d.ts +1 -5
- package/dist/src/countScenariosByStatuses.d.ts.map +1 -1
- package/dist/src/countScenariosByStatuses.js +14 -31
- package/dist/src/countScenariosByStatuses.js.map +1 -1
- package/dist/src/filter/filterByStatus.d.ts +1 -2
- package/dist/src/filter/filterByStatus.d.ts.map +1 -1
- package/dist/src/filter/filterByStatus.js +5 -2
- package/dist/src/filter/filterByStatus.js.map +1 -1
- package/dist/src/formatExecutionDistance.d.ts +2 -0
- package/dist/src/formatExecutionDistance.d.ts.map +1 -0
- package/dist/src/formatExecutionDistance.js +7 -0
- package/dist/src/formatExecutionDistance.js.map +1 -0
- package/dist/src/formatExecutionDuration.d.ts +2 -0
- package/dist/src/formatExecutionDuration.d.ts.map +1 -0
- package/dist/src/formatExecutionDuration.js +12 -0
- package/dist/src/formatExecutionDuration.js.map +1 -0
- package/dist/src/formatStatusRate.d.ts +2 -0
- package/dist/src/formatStatusRate.d.ts.map +1 -0
- package/dist/src/formatStatusRate.js +9 -0
- package/dist/src/formatStatusRate.js.map +1 -0
- package/dist/src/hooks/useFilteredDocuments.d.ts +2 -2
- package/dist/src/hooks/useFilteredDocuments.d.ts.map +1 -1
- package/dist/src/hooks/useFilteredDocuments.js +7 -5
- package/dist/src/hooks/useFilteredDocuments.js.map +1 -1
- package/dist/src/hooks/useQueries.d.ts +2 -6
- package/dist/src/hooks/useQueries.d.ts.map +1 -1
- package/dist/src/hooks/useQueries.js +1 -3
- package/dist/src/hooks/useQueries.js.map +1 -1
- package/dist/src/hooks/useResultStatistics.js +2 -2
- package/dist/src/hooks/useResultStatistics.js.map +1 -1
- package/dist/src/hooks/useSearch.d.ts +2 -2
- package/dist/src/hooks/useSearch.d.ts.map +1 -1
- package/dist/src/hooks/useSearch.js +1 -1
- package/dist/src/hooks/useSearch.js.map +1 -1
- package/dist/src/index.d.ts +3 -8
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +3 -8
- package/dist/src/index.js.map +1 -1
- package/dist/src/statuses.d.ts +4 -0
- package/dist/src/statuses.d.ts.map +1 -0
- package/dist/src/statuses.js +12 -0
- package/dist/src/statuses.js.map +1 -0
- package/dist/src/styles/statuses.scss +14 -0
- package/dist/src/styles/tables.scss +3 -3
- package/dist/src/styles/theming.scss +15 -18
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +16 -18
- package/dist/src/EnvelopesQueryContext.d.ts +0 -15
- package/dist/src/EnvelopesQueryContext.d.ts.map +0 -1
- package/dist/src/EnvelopesQueryContext.js +0 -28
- package/dist/src/EnvelopesQueryContext.js.map +0 -1
- package/dist/src/SearchQueryContext.d.ts +0 -34
- package/dist/src/SearchQueryContext.d.ts.map +0 -1
- package/dist/src/SearchQueryContext.js +0 -73
- package/dist/src/SearchQueryContext.js.map +0 -1
- package/dist/src/components/CucumberReact.d.ts +0 -10
- package/dist/src/components/CucumberReact.d.ts.map +0 -1
- package/dist/src/components/CucumberReact.js +0 -9
- package/dist/src/components/CucumberReact.js.map +0 -1
- package/dist/src/components/app/EnvelopesWrapper.d.ts +0 -8
- package/dist/src/components/app/EnvelopesWrapper.d.ts.map +0 -1
- package/dist/src/components/app/EnvelopesWrapper.js +0 -20
- package/dist/src/components/app/EnvelopesWrapper.js.map +0 -1
- package/dist/src/components/app/FilteredResults.d.ts +0 -7
- package/dist/src/components/app/FilteredResults.d.ts.map +0 -1
- package/dist/src/components/app/FilteredResults.js +0 -23
- package/dist/src/components/app/FilteredResults.js.map +0 -1
- package/dist/src/components/app/FilteredResults.module.scss +0 -7
- package/dist/src/components/app/QueriesWrapper.d.ts +0 -12
- package/dist/src/components/app/QueriesWrapper.d.ts.map +0 -1
- package/dist/src/components/app/QueriesWrapper.js +0 -8
- package/dist/src/components/app/QueriesWrapper.js.map +0 -1
- package/dist/src/components/app/SearchWrapper.d.ts +0 -4
- package/dist/src/components/app/SearchWrapper.d.ts.map +0 -1
- package/dist/src/components/app/SearchWrapper.js +0 -6
- package/dist/src/components/app/SearchWrapper.js.map +0 -1
- package/dist/src/components/app/statuses.d.ts +0 -4
- package/dist/src/components/app/statuses.d.ts.map +0 -1
- package/dist/src/components/app/statuses.js +0 -12
- package/dist/src/components/app/statuses.js.map +0 -1
- package/dist/src/components/customise/custom-classes.stories.scss +0 -8
- package/dist/src/components/customise/customRendering.d.ts.map +0 -1
- package/dist/src/styles/fonts.scss +0 -18
package/README.md
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
> A set of React components for rendering Gherkin documents and Cucumber results.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Preview and examples:
|
|
6
|
+
https://cucumber-react-preview.netlify.app/
|
|
6
7
|
|
|
7
8
|

|
|
8
9
|
|
|
@@ -11,35 +12,21 @@
|
|
|
11
12
|
- This package is distributed in ES module format only.
|
|
12
13
|
- React 18 or above is required.
|
|
13
14
|
|
|
14
|
-
The source code for
|
|
15
|
+
The source code for the screenshot above is:
|
|
15
16
|
|
|
16
17
|
```jsx
|
|
17
|
-
|
|
18
|
-
<GherkinDocumentList />
|
|
19
|
-
</EnvelopesWrapper>
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
The [`<GherkinDocumentList>`](src/components/app/GherkinDocumentList.tsx) React component,
|
|
23
|
-
is an accordion of [`<GherkinDocument>`](src/components/gherkin/GherkinDocument.tsx).
|
|
24
|
-
|
|
25
|
-
The `<GherkinDocument>` React component and any component nested within it (such as [`<Scenario>`](src/components/gherkin/Scenario.tsx)) can be rendered standalone.
|
|
18
|
+
import { EnvelopesProvider, FilteredDocuments } from '@cucumber/react-components'
|
|
26
19
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
You can use the [Gherkin](../../gherkin) parser to generate a `GherkinDocument` object.
|
|
32
|
-
|
|
33
|
-
By default the `<GherkinDocument>` component will not display any coloured results, as the `GherkinDocument`
|
|
34
|
-
message object does not contain results, only the [AST](https://en.wikipedia.org/wiki/Abstract_syntax_tree) of the document.
|
|
35
|
-
This is fine for simple use cases where results are not important.
|
|
20
|
+
<EnvelopesProvider envelopes={envelopes}>
|
|
21
|
+
<FilteredDocuments />
|
|
22
|
+
</EnvelopesProvider>
|
|
23
|
+
```
|
|
36
24
|
|
|
37
|
-
|
|
38
|
-
[`<Wrapper>`](src/components/app/Wrapper.tsx) component.
|
|
25
|
+
`envelopes` should be an array of [Cucumber Messages](https://github.com/cucumber/messages) that came from a test run. You can obtain these from most Cucumber implementations by using a "Message" formatter.
|
|
39
26
|
|
|
40
27
|
## Attachments
|
|
41
28
|
|
|
42
|
-
Attachments from test runs are shown with their corresponding steps. The baseline
|
|
29
|
+
Attachments from test runs are shown with their corresponding steps. The baseline behavior for attachments is a download button. However, we have some special handling for common MIME types to make them more useful without leaving the report:
|
|
43
30
|
|
|
44
31
|
- `image/*` - images are rendered with an `<img/>` tag
|
|
45
32
|
- `video/*` - videos are rendered with a `<video/` tag
|
|
@@ -50,40 +37,26 @@ Attachments from test runs are shown with their corresponding steps. The baselin
|
|
|
50
37
|
|
|
51
38
|
## Styling
|
|
52
39
|
|
|
53
|
-
The standard styling comes
|
|
40
|
+
The standard styling comes without any extra providers or configuration. There are several ways you can apply different styling to the components.
|
|
54
41
|
|
|
55
|
-
###
|
|
42
|
+
### Theming
|
|
56
43
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
- `light` (default)
|
|
60
|
-
- `dark`
|
|
61
|
-
- `auto` (honours your operating system preference for either light or dark)
|
|
62
|
-
|
|
63
|
-
You can activate one of these by passing the `theme` prop to the `CucumberReact` component:
|
|
44
|
+
You can provide your own theme with a small amount of CSS. Target the element above your highest-level usage of the components:
|
|
64
45
|
|
|
65
46
|
```jsx
|
|
66
|
-
<
|
|
67
|
-
<
|
|
68
|
-
|
|
47
|
+
<div className="dark-theme">
|
|
48
|
+
<EnvelopesProvider envelopes={envelopes}>
|
|
49
|
+
<FilteredDocuments />
|
|
50
|
+
</EnvelopesProvider>
|
|
51
|
+
</div>
|
|
69
52
|
```
|
|
70
53
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
You can also provide your own theme with a small amount of CSS. Pass the `CucumberReact` component a class name instead of a theme name:
|
|
74
|
-
|
|
75
|
-
```jsx
|
|
76
|
-
<CucumberReact className="acme-widgets">
|
|
77
|
-
<GherkinDocument />
|
|
78
|
-
</CucumberReact>
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
In your CSS for the `acme-widgets` class, you can override the supported [custom property](https://developer.mozilla.org/en-US/docs/Web/CSS/--*) values as desired. Here's the CSS that drives the built-in "dark" theme:
|
|
54
|
+
In your CSS, you can set the background and text colors, and override the supported [custom property](https://developer.mozilla.org/en-US/docs/Web/CSS/--*) values as desired:
|
|
82
55
|
|
|
83
56
|
```css
|
|
84
|
-
.
|
|
85
|
-
|
|
86
|
-
|
|
57
|
+
.dark-theme {
|
|
58
|
+
background-color: #1d1d26;
|
|
59
|
+
color: #c9c9d1;
|
|
87
60
|
--cucumber-anchor-color: #4caaee;
|
|
88
61
|
--cucumber-keyword-color: #d89077;
|
|
89
62
|
--cucumber-parameter-color: #4caaee;
|
|
@@ -99,13 +72,6 @@ In your CSS for the `acme-widgets` class, you can override the supported [custom
|
|
|
99
72
|
}
|
|
100
73
|
```
|
|
101
74
|
|
|
102
|
-
### Fonts
|
|
103
|
-
|
|
104
|
-
By default, web-safe default font stacks are used, but you can override these so the components use your preferred fonts. These custom properties are supported:
|
|
105
|
-
|
|
106
|
-
- `--cucumber-sans-font-family` - the font used for the text
|
|
107
|
-
- `--cucumber-mono-font-family` - the font used for doc strings and attachments
|
|
108
|
-
|
|
109
75
|
### Custom styles
|
|
110
76
|
|
|
111
77
|
For more control over the styling, you can override the CSS used by individual components.
|
|
@@ -123,16 +89,18 @@ Let's say you want to do something totally different with the typography of doc
|
|
|
123
89
|
}
|
|
124
90
|
```
|
|
125
91
|
|
|
126
|
-
Then, you can provide
|
|
92
|
+
Then, you can provide an `overrides` prop to the `CustomRendering` component, in the form of an object that declares which class names you're going to override and what with:
|
|
127
93
|
|
|
128
94
|
```jsx
|
|
129
|
-
<
|
|
95
|
+
<CustomRendering overrides={{
|
|
130
96
|
DocString: {
|
|
131
97
|
docString: 'acme-docstring'
|
|
132
98
|
}
|
|
133
99
|
}}>
|
|
134
|
-
<
|
|
135
|
-
|
|
100
|
+
<EnvelopesProvider envelopes={envelopes}>
|
|
101
|
+
<FilteredDocuments />
|
|
102
|
+
</EnvelopesProvider>
|
|
103
|
+
</CustomRendering>
|
|
136
104
|
```
|
|
137
105
|
|
|
138
106
|
Some components have multiple styling hooks - e.g. the `<Tags>` component has the `tags` class name for the list, and the `tag` class name for each item. In these cases, you can provide custom class names for just the ones you want to change, and any you omit will pick up the built-in styling like normal.
|
|
@@ -141,10 +109,10 @@ Some components have multiple styling hooks - e.g. the `<Tags>` component has th
|
|
|
141
109
|
|
|
142
110
|
To change the rendering of some components entirely, you can selectively provide your own component implementations to be used instead of the built-in ones.
|
|
143
111
|
|
|
144
|
-
Staying with the doc string example, you can use the same `
|
|
112
|
+
Staying with the doc string example, you can use the same `overrides` prop, but this time instead of an object with class names, you provide a React functional component, giving you full control over the rendering:
|
|
145
113
|
|
|
146
114
|
```jsx
|
|
147
|
-
<
|
|
115
|
+
<CustomRendering overrides={{
|
|
148
116
|
DocString: (props) => (
|
|
149
117
|
<>
|
|
150
118
|
<p>I am going to render this doc string in a textarea:</p>
|
|
@@ -152,85 +120,13 @@ Staying with the doc string example, you can use the same `customRendering` prop
|
|
|
152
120
|
</>
|
|
153
121
|
)
|
|
154
122
|
}}>
|
|
155
|
-
<
|
|
156
|
-
|
|
123
|
+
<EnvelopesProvider envelopes={envelopes}>
|
|
124
|
+
<FilteredDocuments />
|
|
125
|
+
</EnvelopesProvider>
|
|
126
|
+
</CustomRendering>
|
|
157
127
|
```
|
|
158
128
|
|
|
159
129
|
In each case where you provide your own component, it will receive the same props as the default component, plus two more:
|
|
160
130
|
|
|
161
131
|
- `styles` - class names for the default styling, so you can still apply these to your custom component if it makes sense
|
|
162
|
-
- `DefaultRenderer` - the default React component, useful if you only want to provide your own rendering for certain cases, and otherwise fall back to the default rendering (don't forget to pass it the props)
|
|
163
|
-
|
|
164
|
-
## Build / hack
|
|
165
|
-
|
|
166
|
-
Install dependencies
|
|
167
|
-
|
|
168
|
-
npm install
|
|
169
|
-
|
|
170
|
-
Run tests
|
|
171
|
-
|
|
172
|
-
npm test
|
|
173
|
-
|
|
174
|
-
Interactive development
|
|
175
|
-
|
|
176
|
-
npm start
|
|
177
|
-
|
|
178
|
-
## Ideas
|
|
179
|
-
|
|
180
|
-
### `ScenarioList` component
|
|
181
|
-
|
|
182
|
-
A component that renders a list of scenarios (possibly from multiple files, filtered by e.g. tag).
|
|
183
|
-
|
|
184
|
-
This component could be used to render relevant scenarios in 3rd-party tools, such as
|
|
185
|
-
JIRA, Confluence and various issue trackers that support plugins.
|
|
186
|
-
|
|
187
|
-
### Link to JIRA
|
|
188
|
-
|
|
189
|
-
Configure with a regexp and url function, and tags will be rendered as JIRA issue links
|
|
190
|
-
|
|
191
|
-
### Search
|
|
192
|
-
|
|
193
|
-
Search by tag, but also by text. Could use http://elasticlunr.com/
|
|
194
|
-
or https://lunrjs.com/ - or it could simply perform filtering on an array of `GherkinDocument` messages.
|
|
195
|
-
|
|
196
|
-
### Search results
|
|
197
|
-
|
|
198
|
-
Each scenario displayed underneath each other, grouped by feature file. The feature description is "collapsed",
|
|
199
|
-
(unless it contains the search term) but can be opened.
|
|
200
|
-
|
|
201
|
-
### Filtering / sorting
|
|
202
|
-
|
|
203
|
-
* by tag
|
|
204
|
-
* by duration (find slow ones)
|
|
205
|
-
* by status
|
|
206
|
-
* by recency (update timestamp) - exclude old ones
|
|
207
|
-
* by flickeriness
|
|
208
|
-
|
|
209
|
-
### Tag search
|
|
210
|
-
|
|
211
|
-
* Render a tag cloud for all tags
|
|
212
|
-
* Size: count
|
|
213
|
-
* Color: pass/fail/undefined
|
|
214
|
-
|
|
215
|
-
### On-demand data
|
|
216
|
-
|
|
217
|
-
For large reports (especially with screenshots) it may be too heavy to store it all in the browser.
|
|
218
|
-
The GUI should request data for the current document on demand. The GUI should also be able to filter
|
|
219
|
-
what kind of events it wants. For example, to render the initial screen.
|
|
220
|
-
|
|
221
|
-
### Server / App
|
|
222
|
-
|
|
223
|
-
It should be easy to use. Just run the app (Electron). It will create a named pipe where
|
|
224
|
-
it will listen. What's written here gets written straight to the React app (no websocket,
|
|
225
|
-
it's in the same process). This app can be fairly small.
|
|
226
|
-
|
|
227
|
-
### Rerun tests
|
|
228
|
-
|
|
229
|
-
Add a message to represent a config+cwd+env for a run, so the GUI can rerun it.
|
|
230
|
-
The config is essentially command line options. They can be modified in the gui.
|
|
231
|
-
Rerun on file change can also be set up. This just makes the whole DX simple.
|
|
232
|
-
|
|
233
|
-
### Alerts
|
|
234
|
-
|
|
235
|
-
The app could use the OS to send screen messages (autotest like)
|
|
236
|
-
|
|
132
|
+
- `DefaultRenderer` - the default React component, useful if you only want to provide your own rendering for certain cases, and otherwise fall back to the default rendering (don't forget to pass it the props)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TestStepResultStatus as Status } from '@cucumber/messages';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface SearchState {
|
|
4
|
+
readonly query: string;
|
|
5
|
+
readonly hideStatuses: readonly Status[];
|
|
6
|
+
}
|
|
7
|
+
export interface SearchContextValue extends SearchState {
|
|
8
|
+
update: (changes: Partial<SearchState>) => void;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: React.Context<SearchContextValue>;
|
|
11
|
+
export default _default;
|
|
12
|
+
//# sourceMappingURL=SearchContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchContext.d.ts","sourceRoot":"","sources":["../../src/SearchContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,IAAI,MAAM,EAAE,MAAM,oBAAoB,CAAA;AACnE,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAA;CACzC;AAED,MAAM,WAAW,kBAAmB,SAAQ,WAAW;IACrD,MAAM,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,KAAK,IAAI,CAAA;CAChD;;AAED,wBAIE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchContext.js","sourceRoot":"","sources":["../../src/SearchContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAWzB,eAAe,KAAK,CAAC,aAAa,CAAqB;IACrD,KAAK,EAAE,EAAE;IACT,YAAY,EAAE,EAAE;IAChB,MAAM,EAAE,GAAG,EAAE,GAAE,CAAC;CACjB,CAAC,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
export default function ciCommitLink(ci:
|
|
1
|
+
import { Ci } from '@cucumber/messages';
|
|
2
|
+
export default function ciCommitLink(ci: Ci): string | undefined;
|
|
3
3
|
//# sourceMappingURL=ciCommitLink.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ciCommitLink.d.ts","sourceRoot":"","sources":["../../src/ciCommitLink.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ciCommitLink.d.ts","sourceRoot":"","sources":["../../src/ciCommitLink.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AAKvC,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAE,EAAE,EAAE,GAAG,MAAM,GAAG,SAAS,CAQ/D"}
|
package/dist/src/ciCommitLink.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import toRepositoryId from './toRepositoryId.js';
|
|
2
|
+
// TODO move upstream to create-meta
|
|
2
3
|
export default function ciCommitLink(ci) {
|
|
3
4
|
if (ci.git && ci.git.remote) {
|
|
4
5
|
const repositoryId = toRepositoryId(ci.git.remote);
|
|
@@ -7,6 +8,5 @@ export default function ciCommitLink(ci) {
|
|
|
7
8
|
return `https://${repositoryId}/commit/${ci.git.revision}`;
|
|
8
9
|
}
|
|
9
10
|
}
|
|
10
|
-
return null;
|
|
11
11
|
}
|
|
12
12
|
//# sourceMappingURL=ciCommitLink.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ciCommitLink.js","sourceRoot":"","sources":["../../src/ciCommitLink.ts"],"names":[],"mappings":"AAEA,OAAO,cAAc,MAAM,qBAAqB,CAAA;AAEhD,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,
|
|
1
|
+
{"version":3,"file":"ciCommitLink.js","sourceRoot":"","sources":["../../src/ciCommitLink.ts"],"names":[],"mappings":"AAEA,OAAO,cAAc,MAAM,qBAAqB,CAAA;AAEhD,oCAAoC;AACpC,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAM;IACzC,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,CAAC,MAAM,EAAE;QAC3B,MAAM,YAAY,GAAG,cAAc,CAAC,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;QAClD,MAAM,MAAM,GAAG,YAAY,CAAC,UAAU,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,IAAI,KAAK,gBAAgB,CAAA;QACpF,IAAI,EAAE,CAAC,GAAG,CAAC,QAAQ,IAAI,MAAM,EAAE;YAC7B,OAAO,WAAW,YAAY,WAAW,EAAE,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAA;SAC3D;KACF;AACH,CAAC"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
ci:
|
|
5
|
-
}
|
|
6
|
-
export declare const CICommitLink: React.FunctionComponent<IProps>;
|
|
7
|
-
export {};
|
|
1
|
+
import { Ci } from '@cucumber/messages';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
export declare const CICommitLink: FC<{
|
|
4
|
+
ci: Ci;
|
|
5
|
+
}>;
|
|
8
6
|
//# sourceMappingURL=CICommitLink.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CICommitLink.d.ts","sourceRoot":"","sources":["../../../../src/components/app/CICommitLink.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"CICommitLink.d.ts","sourceRoot":"","sources":["../../../../src/components/app/CICommitLink.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AAGvC,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAIjC,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC;IAC5B,EAAE,EAAE,EAAE,CAAA;CACP,CAwBA,CAAA"}
|
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { faCodeCommit } from '@fortawesome/free-solid-svg-icons';
|
|
2
2
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import ciCommitLink from '../../ciCommitLink.js';
|
|
5
|
-
export const CICommitLink = ({ ci
|
|
5
|
+
export const CICommitLink = ({ ci }) => {
|
|
6
|
+
if (!ci.git) {
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
const shortHash = ci.git.revision.substring(0, 7);
|
|
6
10
|
const commitLink = ciCommitLink(ci);
|
|
7
|
-
if (commitLink
|
|
11
|
+
if (commitLink) {
|
|
8
12
|
return (React.createElement(React.Fragment, null,
|
|
9
|
-
React.createElement(FontAwesomeIcon, { icon:
|
|
10
|
-
"
|
|
11
|
-
|
|
13
|
+
React.createElement(FontAwesomeIcon, { "aria-hidden": "true", style: { opacity: 0.75 }, icon: faCodeCommit }),
|
|
14
|
+
React.createElement("a", { href: commitLink, target: "_blank", rel: "noreferrer" },
|
|
15
|
+
React.createElement("code", null, shortHash))));
|
|
12
16
|
}
|
|
13
17
|
return (React.createElement(React.Fragment, null,
|
|
14
|
-
React.createElement(FontAwesomeIcon, { icon:
|
|
15
|
-
"
|
|
16
|
-
ci.git?.revision.substring(0, 7)));
|
|
18
|
+
React.createElement(FontAwesomeIcon, { "aria-hidden": "true", style: { opacity: 0.75 }, icon: faCodeCommit }),
|
|
19
|
+
React.createElement("code", null, shortHash)));
|
|
17
20
|
};
|
|
18
21
|
//# sourceMappingURL=CICommitLink.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CICommitLink.js","sourceRoot":"","sources":["../../../../src/components/app/CICommitLink.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"CICommitLink.js","sourceRoot":"","sources":["../../../../src/components/app/CICommitLink.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAA;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,KAAa,MAAM,OAAO,CAAA;AAEjC,OAAO,YAAY,MAAM,uBAAuB,CAAA;AAEhD,MAAM,CAAC,MAAM,YAAY,GAEpB,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;IACd,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE;QACX,OAAO,IAAI,CAAA;KACZ;IAED,MAAM,SAAS,GAAG,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IACjD,MAAM,UAAU,GAAG,YAAY,CAAC,EAAE,CAAC,CAAA;IAEnC,IAAI,UAAU,EAAE;QACd,OAAO,CACL;YACE,oBAAC,eAAe,mBAAa,MAAM,EAAC,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,YAAY,GAAI;YACpF,2BAAG,IAAI,EAAE,UAAU,EAAE,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,YAAY;gBACnD,kCAAO,SAAS,CAAQ,CACtB,CACH,CACJ,CAAA;KACF;IACD,OAAO,CACL;QACE,oBAAC,eAAe,mBAAa,MAAM,EAAC,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,YAAY,GAAI;QACpF,kCAAO,SAAS,CAAQ,CACvB,CACJ,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
ci:
|
|
5
|
-
}
|
|
6
|
-
export declare const CIJobLink: React.FunctionComponent<IProps>;
|
|
7
|
-
export {};
|
|
1
|
+
import { Ci } from '@cucumber/messages';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
export declare const CIJobLink: FC<{
|
|
4
|
+
ci: Ci;
|
|
5
|
+
}>;
|
|
8
6
|
//# sourceMappingURL=CIJobLink.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CIJobLink.d.ts","sourceRoot":"","sources":["../../../../src/components/app/CIJobLink.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"CIJobLink.d.ts","sourceRoot":"","sources":["../../../../src/components/app/CIJobLink.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AAGvC,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAEjC,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC;IACzB,EAAE,EAAE,EAAE,CAAA;CACP,CAiBA,CAAA"}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { faServer } from '@fortawesome/free-solid-svg-icons';
|
|
2
2
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
export const CIJobLink = ({ ci
|
|
5
|
-
if (ci.url
|
|
4
|
+
export const CIJobLink = ({ ci }) => {
|
|
5
|
+
if (ci.url) {
|
|
6
6
|
return (React.createElement(React.Fragment, null,
|
|
7
|
-
React.createElement(FontAwesomeIcon, { icon:
|
|
8
|
-
"
|
|
9
|
-
React.createElement("a", { href: ci.url },
|
|
10
|
-
" ",
|
|
11
|
-
ci.buildNumber)));
|
|
7
|
+
React.createElement(FontAwesomeIcon, { "aria-hidden": "true", style: { opacity: 0.75 }, icon: faServer }),
|
|
8
|
+
React.createElement("a", { href: ci.url, target: "_blank", rel: "noreferrer" }, ci.name)));
|
|
12
9
|
}
|
|
13
|
-
return React.createElement(React.Fragment, null
|
|
10
|
+
return (React.createElement(React.Fragment, null,
|
|
11
|
+
React.createElement(FontAwesomeIcon, { "aria-hidden": "true", style: { opacity: 0.75 }, icon: faServer }),
|
|
12
|
+
React.createElement("span", null, ci.name)));
|
|
14
13
|
};
|
|
15
14
|
//# sourceMappingURL=CIJobLink.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CIJobLink.js","sourceRoot":"","sources":["../../../../src/components/app/CIJobLink.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"CIJobLink.js","sourceRoot":"","sources":["../../../../src/components/app/CIJobLink.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAA;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,KAAa,MAAM,OAAO,CAAA;AAEjC,MAAM,CAAC,MAAM,SAAS,GAEjB,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;IACd,IAAI,EAAE,CAAC,GAAG,EAAE;QACV,OAAO,CACL;YACE,oBAAC,eAAe,mBAAa,MAAM,EAAC,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,GAAI;YAChF,2BAAG,IAAI,EAAE,EAAE,CAAC,GAAG,EAAE,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,YAAY,IAC9C,EAAE,CAAC,IAAI,CACN,CACH,CACJ,CAAA;KACF;IACD,OAAO,CACL;QACE,oBAAC,eAAe,mBAAa,MAAM,EAAC,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,GAAI;QAChF,kCAAO,EAAE,CAAC,IAAI,CAAQ,CACrB,CACJ,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FC, PropsWithChildren } from 'react';
|
|
2
|
+
import { SearchState } from '../../SearchContext.js';
|
|
3
|
+
interface Props {
|
|
4
|
+
value: SearchState;
|
|
5
|
+
onChange: (newValue: SearchState) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const ControlledSearchProvider: FC<PropsWithChildren<Props>>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=ControlledSearchProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ControlledSearchProvider.d.ts","sourceRoot":"","sources":["../../../../src/components/app/ControlledSearchProvider.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,iBAAiB,EAAW,MAAM,OAAO,CAAA;AAE7D,OAA2B,EAAsB,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAE5F,UAAU,KAAK;IACb,KAAK,EAAE,WAAW,CAAA;IAClB,QAAQ,EAAE,CAAC,QAAQ,EAAE,WAAW,KAAK,IAAI,CAAA;CAC1C;AAED,eAAO,MAAM,wBAAwB,EAAE,EAAE,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAejE,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import SearchQueryContext from '../../SearchContext.js';
|
|
3
|
+
export const ControlledSearchProvider = ({ value, onChange, children, }) => {
|
|
4
|
+
const contextValue = useMemo(() => {
|
|
5
|
+
return {
|
|
6
|
+
query: value.query,
|
|
7
|
+
hideStatuses: value.hideStatuses,
|
|
8
|
+
update: (newValues) => {
|
|
9
|
+
onChange({ ...value, ...newValues });
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
}, [value, onChange]);
|
|
13
|
+
return React.createElement(SearchQueryContext.Provider, { value: contextValue }, children);
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=ControlledSearchProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ControlledSearchProvider.js","sourceRoot":"","sources":["../../../../src/components/app/ControlledSearchProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAyB,OAAO,EAAE,MAAM,OAAO,CAAA;AAE7D,OAAO,kBAAuD,MAAM,wBAAwB,CAAA;AAO5F,MAAM,CAAC,MAAM,wBAAwB,GAAiC,CAAC,EACrE,KAAK,EACL,QAAQ,EACR,QAAQ,GACT,EAAE,EAAE;IACH,MAAM,YAAY,GAAuB,OAAO,CAAC,GAAG,EAAE;QACpD,OAAO;YACL,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,YAAY,EAAE,KAAK,CAAC,YAAY;YAChC,MAAM,EAAE,CAAC,SAA+B,EAAE,EAAE;gBAC1C,QAAQ,CAAC,EAAE,GAAG,KAAK,EAAE,GAAG,SAAS,EAAE,CAAC,CAAA;YACtC,CAAC;SACF,CAAA;IACH,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAA;IACrB,OAAO,oBAAC,kBAAkB,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,IAAG,QAAQ,CAA+B,CAAA;AACnG,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CopyButton.d.ts","sourceRoot":"","sources":["../../../../src/components/app/CopyButton.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,EAAE,EAAY,MAAM,OAAO,CAAA;AAI3C,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CA2B3C,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { faCheck, faCopy } from '@fortawesome/free-solid-svg-icons';
|
|
2
|
+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
3
|
+
import React, { useState } from 'react';
|
|
4
|
+
import styles from './CopyButton.module.scss';
|
|
5
|
+
export const CopyButton = ({ text }) => {
|
|
6
|
+
const [copied, setCopied] = useState(false);
|
|
7
|
+
const handleCopy = () => {
|
|
8
|
+
navigator.clipboard
|
|
9
|
+
.writeText(text)
|
|
10
|
+
.then(() => {
|
|
11
|
+
setCopied(true);
|
|
12
|
+
setTimeout(() => {
|
|
13
|
+
setCopied(false);
|
|
14
|
+
}, 3000);
|
|
15
|
+
})
|
|
16
|
+
.catch((err) => {
|
|
17
|
+
console.error('Failed to copy', err);
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
return (React.createElement("button", { onClick: handleCopy, "aria-label": copied ? 'Copied' : 'Copy', disabled: copied, className: styles.button },
|
|
21
|
+
React.createElement(FontAwesomeIcon, { icon: copied ? faCheck : faCopy })));
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=CopyButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CopyButton.js","sourceRoot":"","sources":["../../../../src/components/app/CopyButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,KAAK,EAAE,EAAM,QAAQ,EAAE,MAAM,OAAO,CAAA;AAE3C,OAAO,MAAM,MAAM,0BAA0B,CAAA;AAE7C,MAAM,CAAC,MAAM,UAAU,GAAyB,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IAC3D,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IAE3C,MAAM,UAAU,GAAG,GAAG,EAAE;QACtB,SAAS,CAAC,SAAS;aAChB,SAAS,CAAC,IAAI,CAAC;aACf,IAAI,CAAC,GAAG,EAAE;YACT,SAAS,CAAC,IAAI,CAAC,CAAA;YACf,UAAU,CAAC,GAAG,EAAE;gBACd,SAAS,CAAC,KAAK,CAAC,CAAA;YAClB,CAAC,EAAE,IAAI,CAAC,CAAA;QACV,CAAC,CAAC;aACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;YACb,OAAO,CAAC,KAAK,CAAC,gBAAgB,EAAE,GAAG,CAAC,CAAA;QACtC,CAAC,CAAC,CAAA;IACN,CAAC,CAAA;IAED,OAAO,CACL,gCACE,OAAO,EAAE,UAAU,gBACP,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EACtC,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,CAAC,MAAM;QAExB,oBAAC,eAAe,IAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,GAAI,CAC7C,CACV,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Envelope } from '@cucumber/messages';
|
|
2
|
+
import { FC, PropsWithChildren } from 'react';
|
|
3
|
+
interface Props {
|
|
4
|
+
envelopes: readonly Envelope[];
|
|
5
|
+
}
|
|
6
|
+
export declare const EnvelopesProvider: FC<PropsWithChildren<Props>>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=EnvelopesProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnvelopesProvider.d.ts","sourceRoot":"","sources":["../../../../src/components/app/EnvelopesProvider.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAE7C,OAAc,EAAE,EAAE,EAAE,iBAAiB,EAAW,MAAM,OAAO,CAAA;AAI7D,UAAU,KAAK;IACb,SAAS,EAAE,SAAS,QAAQ,EAAE,CAAA;CAC/B;AAED,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAe1D,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Query as GherkinQuery } from '@cucumber/gherkin-utils';
|
|
2
|
+
import { Query as CucumberQuery } from '@cucumber/query';
|
|
3
|
+
import React, { useMemo } from 'react';
|
|
4
|
+
import { QueriesProvider } from './QueriesProvider.js';
|
|
5
|
+
export const EnvelopesProvider = ({ envelopes, children }) => {
|
|
6
|
+
const { gherkinQuery, cucumberQuery } = useMemo(() => {
|
|
7
|
+
const gherkinQuery = new GherkinQuery();
|
|
8
|
+
const cucumberQuery = new CucumberQuery();
|
|
9
|
+
for (const envelope of envelopes) {
|
|
10
|
+
gherkinQuery.update(envelope);
|
|
11
|
+
cucumberQuery.update(envelope);
|
|
12
|
+
}
|
|
13
|
+
return { gherkinQuery, cucumberQuery };
|
|
14
|
+
}, [envelopes]);
|
|
15
|
+
return (React.createElement(QueriesProvider, { gherkinQuery: gherkinQuery, cucumberQuery: cucumberQuery }, children));
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=EnvelopesProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnvelopesProvider.js","sourceRoot":"","sources":["../../../../src/components/app/EnvelopesProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAE/D,OAAO,EAAE,KAAK,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,KAAK,EAAE,EAAyB,OAAO,EAAE,MAAM,OAAO,CAAA;AAE7D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAMtD,MAAM,CAAC,MAAM,iBAAiB,GAAiC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE;IACzF,MAAM,EAAE,YAAY,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE;QACnD,MAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAA;QACvC,MAAM,aAAa,GAAG,IAAI,aAAa,EAAE,CAAA;QACzC,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE;YAChC,YAAY,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;YAC7B,aAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;SAC/B;QACD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,CAAA;IACxC,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAA;IACf,OAAO,CACL,oBAAC,eAAe,IAAC,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,aAAa,IACtE,QAAQ,CACO,CACnB,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
export interface IExecutionSummaryProps {
|
|
5
|
-
scenarioCountByStatus: Record<messages.TestStepResultStatus, number>;
|
|
6
|
-
totalScenarioCount: number;
|
|
7
|
-
testRunStarted?: TestRunStarted;
|
|
8
|
-
testRunFinished?: TestRunFinished;
|
|
9
|
-
referenceDate?: Date;
|
|
10
|
-
meta?: messages.Meta;
|
|
11
|
-
}
|
|
12
|
-
export declare const ExecutionSummary: React.FunctionComponent<IExecutionSummaryProps>;
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export declare const ExecutionSummary: FC;
|
|
13
3
|
//# sourceMappingURL=ExecutionSummary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExecutionSummary.d.ts","sourceRoot":"","sources":["../../../../src/components/app/ExecutionSummary.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExecutionSummary.d.ts","sourceRoot":"","sources":["../../../../src/components/app/ExecutionSummary.tsx"],"names":[],"mappings":"AAGA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAkBjC,eAAO,MAAM,gBAAgB,EAAE,EA+F9B,CAAA"}
|