@cucumber/react-components 21.1.1 → 22.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 +2 -1
- package/dist/src/CucumberQueryContext.js +3 -8
- package/dist/src/CucumberQueryContext.js.map +1 -1
- package/dist/src/EnvelopesQueryContext.js +8 -20
- package/dist/src/EnvelopesQueryContext.js.map +1 -1
- package/dist/src/GherkinQueryContext.js +3 -8
- package/dist/src/GherkinQueryContext.js.map +1 -1
- package/dist/src/SearchQueryContext.js +24 -53
- package/dist/src/SearchQueryContext.js.map +1 -1
- package/dist/src/UriContext.js +2 -7
- package/dist/src/UriContext.js.map +1 -1
- package/dist/src/ciCommitLink.js +3 -9
- package/dist/src/ciCommitLink.js.map +1 -1
- package/dist/src/components/CucumberReact.d.ts +1 -1
- package/dist/src/components/CucumberReact.d.ts.map +1 -1
- package/dist/src/components/CucumberReact.js +7 -14
- package/dist/src/components/CucumberReact.js.map +1 -1
- package/dist/src/components/app/CICommitLink.js +14 -22
- package/dist/src/components/app/CICommitLink.js.map +1 -1
- package/dist/src/components/app/CIJobLink.js +8 -15
- package/dist/src/components/app/CIJobLink.js.map +1 -1
- package/dist/src/components/app/EnvelopesWrapper.js +11 -38
- package/dist/src/components/app/EnvelopesWrapper.js.map +1 -1
- package/dist/src/components/app/ExecutionSummary.js +54 -61
- package/dist/src/components/app/ExecutionSummary.js.map +1 -1
- package/dist/src/components/app/FilteredResults.d.ts.map +1 -1
- package/dist/src/components/app/FilteredResults.js +21 -39
- package/dist/src/components/app/FilteredResults.js.map +1 -1
- package/dist/src/components/app/GherkinDocumentList.js +27 -57
- package/dist/src/components/app/GherkinDocumentList.js.map +1 -1
- package/dist/src/components/app/HighLight.js +14 -21
- package/dist/src/components/app/HighLight.js.map +1 -1
- package/dist/src/components/app/NavigationButton.js +4 -23
- package/dist/src/components/app/NavigationButton.js.map +1 -1
- package/dist/src/components/app/NoMatchResult.js +8 -15
- package/dist/src/components/app/NoMatchResult.js.map +1 -1
- package/dist/src/components/app/OSIcon.js +10 -17
- package/dist/src/components/app/OSIcon.js.map +1 -1
- package/dist/src/components/app/QueriesWrapper.d.ts +1 -1
- package/dist/src/components/app/QueriesWrapper.d.ts.map +1 -1
- package/dist/src/components/app/QueriesWrapper.js +7 -14
- package/dist/src/components/app/QueriesWrapper.js.map +1 -1
- package/dist/src/components/app/RuntimeIcon.js +10 -17
- package/dist/src/components/app/RuntimeIcon.js.map +1 -1
- package/dist/src/components/app/SearchBar.d.ts.map +1 -1
- package/dist/src/components/app/SearchBar.js +25 -30
- package/dist/src/components/app/SearchBar.js.map +1 -1
- package/dist/src/components/app/SearchWrapper.d.ts +1 -1
- package/dist/src/components/app/SearchWrapper.d.ts.map +1 -1
- package/dist/src/components/app/SearchWrapper.js +4 -46
- package/dist/src/components/app/SearchWrapper.js.map +1 -1
- package/dist/src/components/app/StatusesSummary.js +8 -15
- package/dist/src/components/app/StatusesSummary.js.map +1 -1
- package/dist/src/components/app/icons/CucumberLogo.d.ts +1 -1
- package/dist/src/components/app/icons/CucumberLogo.js +7 -14
- package/dist/src/components/app/icons/CucumberLogo.js.map +1 -1
- package/dist/src/components/app/icons/Jvm.d.ts +1 -1
- package/dist/src/components/app/icons/Jvm.js +8 -15
- package/dist/src/components/app/icons/Jvm.js.map +1 -1
- package/dist/src/components/app/icons/Linux.js +18 -25
- package/dist/src/components/app/icons/Linux.js.map +1 -1
- package/dist/src/components/app/icons/MacOS.d.ts +1 -1
- package/dist/src/components/app/icons/MacOS.js +4 -11
- package/dist/src/components/app/icons/MacOS.js.map +1 -1
- package/dist/src/components/app/icons/NodeJs.d.ts +1 -1
- package/dist/src/components/app/icons/NodeJs.js +34 -41
- package/dist/src/components/app/icons/NodeJs.js.map +1 -1
- package/dist/src/components/app/icons/Ruby.d.ts +1 -1
- package/dist/src/components/app/icons/Ruby.js +4 -11
- package/dist/src/components/app/icons/Ruby.js.map +1 -1
- package/dist/src/components/app/icons/Windows.js +4 -11
- package/dist/src/components/app/icons/Windows.js.map +1 -1
- package/dist/src/components/app/index.d.ts +11 -11
- package/dist/src/components/app/index.d.ts.map +1 -1
- package/dist/src/components/app/index.js +11 -27
- package/dist/src/components/app/index.js.map +1 -1
- package/dist/src/components/app/rehypePlugins.d.ts.map +1 -1
- package/dist/src/components/app/rehypePlugins.js +8 -13
- package/dist/src/components/app/rehypePlugins.js.map +1 -1
- package/dist/src/components/app/remarkPlugins.js +3 -8
- package/dist/src/components/app/remarkPlugins.js.map +1 -1
- package/dist/src/components/app/statuses.js +2 -27
- package/dist/src/components/app/statuses.js.map +1 -1
- package/dist/src/components/customise/customRendering.d.ts +2 -1
- package/dist/src/components/customise/customRendering.d.ts.map +1 -1
- package/dist/src/components/customise/customRendering.js +6 -33
- package/dist/src/components/customise/customRendering.js.map +1 -1
- package/dist/src/components/customise/index.d.ts +2 -2
- package/dist/src/components/customise/index.d.ts.map +1 -1
- package/dist/src/components/customise/index.js +2 -18
- package/dist/src/components/customise/index.js.map +1 -1
- package/dist/src/components/customise/theming.js +1 -2
- package/dist/src/components/gherkin/Anchor.d.ts +1 -1
- package/dist/src/components/gherkin/Anchor.d.ts.map +1 -1
- package/dist/src/components/gherkin/Anchor.js +11 -18
- package/dist/src/components/gherkin/Anchor.js.map +1 -1
- package/dist/src/components/gherkin/Attachment.d.ts +1 -1
- package/dist/src/components/gherkin/Attachment.d.ts.map +1 -1
- package/dist/src/components/gherkin/Attachment.js +43 -77
- package/dist/src/components/gherkin/Attachment.js.map +1 -1
- package/dist/src/components/gherkin/Background.d.ts +1 -1
- package/dist/src/components/gherkin/Background.d.ts.map +1 -1
- package/dist/src/components/gherkin/Background.js +17 -24
- package/dist/src/components/gherkin/Background.js.map +1 -1
- package/dist/src/components/gherkin/Children.d.ts +1 -1
- package/dist/src/components/gherkin/Children.d.ts.map +1 -1
- package/dist/src/components/gherkin/Children.js +7 -14
- package/dist/src/components/gherkin/Children.js.map +1 -1
- package/dist/src/components/gherkin/DataTable.d.ts +1 -1
- package/dist/src/components/gherkin/DataTable.d.ts.map +1 -1
- package/dist/src/components/gherkin/DataTable.js +12 -19
- package/dist/src/components/gherkin/DataTable.js.map +1 -1
- package/dist/src/components/gherkin/Description.d.ts +1 -1
- package/dist/src/components/gherkin/Description.d.ts.map +1 -1
- package/dist/src/components/gherkin/Description.js +9 -16
- package/dist/src/components/gherkin/Description.js.map +1 -1
- package/dist/src/components/gherkin/DocString.d.ts +1 -1
- package/dist/src/components/gherkin/DocString.d.ts.map +1 -1
- package/dist/src/components/gherkin/DocString.js +9 -16
- package/dist/src/components/gherkin/DocString.js.map +1 -1
- package/dist/src/components/gherkin/ErrorMessage.d.ts +3 -3
- package/dist/src/components/gherkin/ErrorMessage.d.ts.map +1 -1
- package/dist/src/components/gherkin/ErrorMessage.js +8 -15
- package/dist/src/components/gherkin/ErrorMessage.js.map +1 -1
- package/dist/src/components/gherkin/ExampleDetail.js +31 -61
- package/dist/src/components/gherkin/ExampleDetail.js.map +1 -1
- package/dist/src/components/gherkin/Examples.d.ts +1 -1
- package/dist/src/components/gherkin/Examples.d.ts.map +1 -1
- package/dist/src/components/gherkin/Examples.js +20 -27
- package/dist/src/components/gherkin/Examples.js.map +1 -1
- package/dist/src/components/gherkin/ExamplesContext.d.ts +1 -1
- package/dist/src/components/gherkin/ExamplesContext.js +2 -5
- package/dist/src/components/gherkin/ExamplesContext.js.map +1 -1
- package/dist/src/components/gherkin/ExamplesTable.d.ts +1 -1
- package/dist/src/components/gherkin/ExamplesTable.d.ts.map +1 -1
- package/dist/src/components/gherkin/ExamplesTable.js +29 -59
- package/dist/src/components/gherkin/ExamplesTable.js.map +1 -1
- package/dist/src/components/gherkin/Feature.d.ts +1 -1
- package/dist/src/components/gherkin/Feature.d.ts.map +1 -1
- package/dist/src/components/gherkin/Feature.js +24 -31
- package/dist/src/components/gherkin/Feature.js.map +1 -1
- package/dist/src/components/gherkin/GherkinDocument.d.ts +1 -1
- package/dist/src/components/gherkin/GherkinDocument.d.ts.map +1 -1
- package/dist/src/components/gherkin/GherkinDocument.js +7 -14
- package/dist/src/components/gherkin/GherkinDocument.js.map +1 -1
- package/dist/src/components/gherkin/GherkinStep.d.ts +1 -1
- package/dist/src/components/gherkin/GherkinStep.d.ts.map +1 -1
- package/dist/src/components/gherkin/GherkinStep.js +38 -46
- package/dist/src/components/gherkin/GherkinStep.js.map +1 -1
- package/dist/src/components/gherkin/GherkinSteps.d.ts +1 -1
- package/dist/src/components/gherkin/GherkinSteps.d.ts.map +1 -1
- package/dist/src/components/gherkin/GherkinSteps.js +10 -17
- package/dist/src/components/gherkin/GherkinSteps.js.map +1 -1
- package/dist/src/components/gherkin/HookStep.d.ts +1 -1
- package/dist/src/components/gherkin/HookStep.d.ts.map +1 -1
- package/dist/src/components/gherkin/HookStep.js +22 -52
- package/dist/src/components/gherkin/HookStep.js.map +1 -1
- package/dist/src/components/gherkin/HookSteps.js +5 -12
- package/dist/src/components/gherkin/HookSteps.js.map +1 -1
- package/dist/src/components/gherkin/Keyword.d.ts +1 -1
- package/dist/src/components/gherkin/Keyword.d.ts.map +1 -1
- package/dist/src/components/gherkin/Keyword.js +7 -14
- package/dist/src/components/gherkin/Keyword.js.map +1 -1
- package/dist/src/components/gherkin/MDG.js +25 -32
- package/dist/src/components/gherkin/MDG.js.map +1 -1
- package/dist/src/components/gherkin/Parameter.d.ts +1 -1
- package/dist/src/components/gherkin/Parameter.d.ts.map +1 -1
- package/dist/src/components/gherkin/Parameter.js +7 -14
- package/dist/src/components/gherkin/Parameter.js.map +1 -1
- package/dist/src/components/gherkin/Rule.d.ts +1 -1
- package/dist/src/components/gherkin/Rule.d.ts.map +1 -1
- package/dist/src/components/gherkin/Rule.js +22 -29
- package/dist/src/components/gherkin/Rule.js.map +1 -1
- package/dist/src/components/gherkin/Scenario.d.ts +1 -1
- package/dist/src/components/gherkin/Scenario.d.ts.map +1 -1
- package/dist/src/components/gherkin/Scenario.js +35 -65
- package/dist/src/components/gherkin/Scenario.js.map +1 -1
- package/dist/src/components/gherkin/StatusIcon.d.ts +1 -1
- package/dist/src/components/gherkin/StatusIcon.d.ts.map +1 -1
- package/dist/src/components/gherkin/StatusIcon.js +16 -23
- package/dist/src/components/gherkin/StatusIcon.js.map +1 -1
- package/dist/src/components/gherkin/StepItem.js +7 -14
- package/dist/src/components/gherkin/StepItem.js.map +1 -1
- package/dist/src/components/gherkin/StepsList.js +4 -11
- package/dist/src/components/gherkin/StepsList.js.map +1 -1
- package/dist/src/components/gherkin/Tags.d.ts +1 -1
- package/dist/src/components/gherkin/Tags.d.ts.map +1 -1
- package/dist/src/components/gherkin/Tags.js +9 -16
- package/dist/src/components/gherkin/Tags.js.map +1 -1
- package/dist/src/components/gherkin/Title.d.ts +1 -1
- package/dist/src/components/gherkin/Title.d.ts.map +1 -1
- package/dist/src/components/gherkin/Title.js +9 -16
- package/dist/src/components/gherkin/Title.js.map +1 -1
- package/dist/src/components/gherkin/attachmentFilename.js +3 -10
- package/dist/src/components/gherkin/attachmentFilename.js.map +1 -1
- package/dist/src/components/gherkin/index.d.ts +25 -25
- package/dist/src/components/gherkin/index.d.ts.map +1 -1
- package/dist/src/components/gherkin/index.js +25 -41
- package/dist/src/components/gherkin/index.js.map +1 -1
- package/dist/src/components/gherkin/isNumber.js +1 -4
- package/dist/src/components/gherkin/isNumber.js.map +1 -1
- package/dist/src/components/gherkin/statusName.js +1 -3
- package/dist/src/components/gherkin/statusName.js.map +1 -1
- package/dist/src/components/index.d.ts +4 -4
- package/dist/src/components/index.d.ts.map +1 -1
- package/dist/src/components/index.js +4 -33
- package/dist/src/components/index.js.map +1 -1
- package/dist/src/components/results/TestStepResultDetails.d.ts +4 -0
- package/dist/src/components/results/TestStepResultDetails.d.ts.map +1 -0
- package/dist/src/components/results/TestStepResultDetails.js +16 -0
- package/dist/src/components/results/TestStepResultDetails.js.map +1 -0
- package/dist/src/components/results/index.d.ts +2 -0
- package/dist/src/components/results/index.d.ts.map +1 -0
- package/dist/src/components/results/index.js +2 -0
- package/dist/src/components/results/index.js.map +1 -0
- package/dist/src/countScenariosByStatuses.d.ts +2 -1
- package/dist/src/countScenariosByStatuses.d.ts.map +1 -1
- package/dist/src/countScenariosByStatuses.js +26 -33
- package/dist/src/countScenariosByStatuses.js.map +1 -1
- package/dist/src/filter/filterByStatus.d.ts +2 -1
- package/dist/src/filter/filterByStatus.d.ts.map +1 -1
- package/dist/src/filter/filterByStatus.js +9 -9
- package/dist/src/filter/filterByStatus.js.map +1 -1
- package/dist/src/hooks/index.d.ts +2 -2
- package/dist/src/hooks/index.d.ts.map +1 -1
- package/dist/src/hooks/index.js +2 -18
- package/dist/src/hooks/index.js.map +1 -1
- package/dist/src/hooks/useFilteredDocuments.d.ts +3 -0
- package/dist/src/hooks/useFilteredDocuments.d.ts.map +1 -0
- package/dist/src/hooks/useFilteredDocuments.js +27 -0
- package/dist/src/hooks/useFilteredDocuments.js.map +1 -0
- package/dist/src/hooks/useQueries.d.ts +1 -1
- package/dist/src/hooks/useQueries.d.ts.map +1 -1
- package/dist/src/hooks/useQueries.js +8 -15
- package/dist/src/hooks/useQueries.js.map +1 -1
- package/dist/src/hooks/useResultStatistics.d.ts +6 -0
- package/dist/src/hooks/useResultStatistics.d.ts.map +1 -0
- package/dist/src/hooks/useResultStatistics.js +7 -0
- package/dist/src/hooks/useResultStatistics.js.map +1 -0
- package/dist/src/hooks/useSearch.d.ts +1 -1
- package/dist/src/hooks/useSearch.d.ts.map +1 -1
- package/dist/src/hooks/useSearch.js +4 -11
- package/dist/src/hooks/useSearch.js.map +1 -1
- package/dist/src/index.d.ts +7 -7
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +8 -43
- package/dist/src/index.js.map +1 -1
- package/dist/src/isTagExpression.js +1 -4
- package/dist/src/isTagExpression.js.map +1 -1
- package/dist/src/search/FeatureSearch.d.ts +3 -7
- package/dist/src/search/FeatureSearch.d.ts.map +1 -1
- package/dist/src/search/FeatureSearch.js +31 -31
- package/dist/src/search/FeatureSearch.js.map +1 -1
- package/dist/src/search/ScenarioLikeSearch.d.ts +25 -0
- package/dist/src/search/ScenarioLikeSearch.d.ts.map +1 -0
- package/dist/src/search/ScenarioLikeSearch.js +41 -0
- package/dist/src/search/ScenarioLikeSearch.js.map +1 -0
- package/dist/src/search/Search.d.ts +9 -9
- package/dist/src/search/Search.d.ts.map +1 -1
- package/dist/src/search/Search.js +34 -20
- package/dist/src/search/Search.js.map +1 -1
- package/dist/src/search/StepSearch.d.ts +16 -8
- package/dist/src/search/StepSearch.d.ts.map +1 -1
- package/dist/src/search/StepSearch.js +33 -44
- package/dist/src/search/StepSearch.js.map +1 -1
- package/dist/src/search/TagSearch.d.ts +2 -10
- package/dist/src/search/TagSearch.d.ts.map +1 -1
- package/dist/src/search/TagSearch.js +17 -18
- package/dist/src/search/TagSearch.js.map +1 -1
- package/dist/src/search/TextSearch.d.ts +2 -11
- package/dist/src/search/TextSearch.d.ts.map +1 -1
- package/dist/src/search/TextSearch.js +47 -36
- package/dist/src/search/TextSearch.js.map +1 -1
- package/dist/src/search/index.d.ts +3 -0
- package/dist/src/search/index.d.ts.map +1 -0
- package/dist/src/search/index.js +3 -0
- package/dist/src/search/index.js.map +1 -0
- package/dist/src/search/types.d.ts +14 -0
- package/dist/src/search/types.d.ts.map +1 -0
- package/dist/src/search/types.js +2 -0
- package/dist/src/search/types.js.map +1 -0
- package/dist/src/toRepositoryId.js +1 -4
- package/dist/src/toRepositoryId.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +35 -27
- package/dist/src/search/RuleSearch.d.ts +0 -9
- package/dist/src/search/RuleSearch.d.ts.map +0 -1
- package/dist/src/search/RuleSearch.js +0 -42
- package/dist/src/search/RuleSearch.js.map +0 -1
- package/dist/src/search/ScenarioSearch.d.ts +0 -9
- package/dist/src/search/ScenarioSearch.d.ts.map +0 -1
- package/dist/src/search/ScenarioSearch.js +0 -42
- package/dist/src/search/ScenarioSearch.js.map +0 -1
|
@@ -1,40 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const DocString_1 = require("./DocString");
|
|
16
|
-
const ErrorMessage_1 = require("./ErrorMessage");
|
|
17
|
-
const Keyword_1 = require("./Keyword");
|
|
18
|
-
const Parameter_1 = require("./Parameter");
|
|
19
|
-
const StepItem_1 = require("./StepItem");
|
|
20
|
-
const Title_1 = require("./Title");
|
|
1
|
+
import { getWorstTestStepResult, } from '@cucumber/messages';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import CucumberQueryContext from '../../CucumberQueryContext.js';
|
|
4
|
+
import GherkinQueryContext from '../../GherkinQueryContext.js';
|
|
5
|
+
import { HighLight } from '../app/HighLight.js';
|
|
6
|
+
import { useCustomRendering } from '../customise/index.js';
|
|
7
|
+
import { TestStepResultDetails } from '../results/index.js';
|
|
8
|
+
import { Attachment } from './Attachment.js';
|
|
9
|
+
import { DataTable as DataTableComponent } from './DataTable.js';
|
|
10
|
+
import { DocString as DocStringComponent } from './DocString.js';
|
|
11
|
+
import { Keyword } from './Keyword.js';
|
|
12
|
+
import { Parameter } from './Parameter.js';
|
|
13
|
+
import { StepItem } from './StepItem.js';
|
|
14
|
+
import { Title } from './Title.js';
|
|
21
15
|
function resolveStep(gherkinStep, pickleStep) {
|
|
22
|
-
|
|
23
|
-
const step = Object.assign({}, gherkinStep);
|
|
16
|
+
const step = { ...gherkinStep };
|
|
24
17
|
if (pickleStep) {
|
|
25
18
|
step.text = pickleStep.text;
|
|
26
|
-
step.dataTable =
|
|
27
|
-
step.docString =
|
|
19
|
+
step.dataTable = pickleStep.argument?.dataTable;
|
|
20
|
+
step.docString = pickleStep.argument?.docString;
|
|
28
21
|
}
|
|
29
22
|
return step;
|
|
30
23
|
}
|
|
31
24
|
const DefaultRenderer = ({ step: gherkinStep, pickleStep, hasExamples, }) => {
|
|
32
25
|
const step = resolveStep(gherkinStep, pickleStep);
|
|
33
|
-
const gherkinQuery =
|
|
34
|
-
const cucumberQuery =
|
|
26
|
+
const gherkinQuery = React.useContext(GherkinQueryContext);
|
|
27
|
+
const cucumberQuery = React.useContext(CucumberQueryContext);
|
|
35
28
|
const pickleStepIds = pickleStep ? [pickleStep.id] : gherkinQuery.getPickleStepIds(step.id);
|
|
36
29
|
const pickleStepTestStepResults = cucumberQuery.getPickleStepTestStepResults(pickleStepIds);
|
|
37
|
-
const testStepResult =
|
|
30
|
+
const testStepResult = getWorstTestStepResult(pickleStepTestStepResults);
|
|
38
31
|
const attachments = cucumberQuery.getPickleStepAttachments(pickleStepIds);
|
|
39
32
|
const stepTextElements = [];
|
|
40
33
|
if (!hasExamples) {
|
|
@@ -53,48 +46,47 @@ const DefaultRenderer = ({ step: gherkinStep, pickleStep, hasExamples, }) => {
|
|
|
53
46
|
stepMatchArguments.forEach((argument, index) => {
|
|
54
47
|
plain = step.text.slice(offset, argument.group.start);
|
|
55
48
|
if (plain.length > 0) {
|
|
56
|
-
stepTextElements.push(
|
|
49
|
+
stepTextElements.push(React.createElement(HighLight, { key: `plain-${index}`, text: plain }));
|
|
57
50
|
}
|
|
58
51
|
const arg = argument.group.value;
|
|
59
52
|
if (arg) {
|
|
60
53
|
if (arg.length > 0) {
|
|
61
|
-
stepTextElements.push(
|
|
62
|
-
|
|
54
|
+
stepTextElements.push(React.createElement(Parameter, { parameterTypeName: argument.parameterTypeName || 'anonymous', value: arg, key: `param-${index}` },
|
|
55
|
+
React.createElement(HighLight, { text: arg })));
|
|
63
56
|
}
|
|
64
57
|
offset += plain.length + arg.length;
|
|
65
58
|
}
|
|
66
59
|
});
|
|
67
60
|
plain = step.text.slice(offset);
|
|
68
61
|
if (plain.length > 0) {
|
|
69
|
-
stepTextElements.push(
|
|
62
|
+
stepTextElements.push(React.createElement(HighLight, { key: `plain-rest`, text: plain }));
|
|
70
63
|
}
|
|
71
64
|
}
|
|
72
65
|
else if (stepMatchArgumentsLists.length >= 2) {
|
|
73
66
|
// Step is ambiguous
|
|
74
|
-
stepTextElements.push(
|
|
67
|
+
stepTextElements.push(React.createElement(HighLight, { key: `plain-ambiguous`, text: step.text }));
|
|
75
68
|
}
|
|
76
69
|
else {
|
|
77
70
|
// Step is undefined
|
|
78
|
-
stepTextElements.push(
|
|
71
|
+
stepTextElements.push(React.createElement(HighLight, { key: `plain-undefined`, text: step.text }));
|
|
79
72
|
}
|
|
80
73
|
}
|
|
81
74
|
else {
|
|
82
75
|
// Step is from scenario with examples, and has <> placeholders.
|
|
83
|
-
stepTextElements.push(
|
|
76
|
+
stepTextElements.push(React.createElement(HighLight, { key: `plain-placeholders`, text: step.text }));
|
|
84
77
|
}
|
|
85
|
-
return (
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
step.dataTable &&
|
|
90
|
-
step.docString &&
|
|
91
|
-
!hasExamples &&
|
|
78
|
+
return (React.createElement(StepItem, { status: testStepResult.status },
|
|
79
|
+
React.createElement(Title, { header: "h3", id: step.id },
|
|
80
|
+
React.createElement(Keyword, null, step.keyword.trim()),
|
|
81
|
+
React.createElement("span", null, stepTextElements)),
|
|
82
|
+
step.dataTable && React.createElement(DataTableComponent, { dataTable: step.dataTable }),
|
|
83
|
+
step.docString && React.createElement(DocStringComponent, { docString: step.docString }),
|
|
84
|
+
!hasExamples && React.createElement(TestStepResultDetails, { ...testStepResult }),
|
|
92
85
|
!hasExamples &&
|
|
93
|
-
attachments.map((attachment, i) =>
|
|
86
|
+
attachments.map((attachment, i) => React.createElement(Attachment, { key: i, attachment: attachment }))));
|
|
94
87
|
};
|
|
95
|
-
const GherkinStep = (props) => {
|
|
96
|
-
const ResolvedRenderer =
|
|
97
|
-
return
|
|
88
|
+
export const GherkinStep = (props) => {
|
|
89
|
+
const ResolvedRenderer = useCustomRendering('GherkinStep', {}, DefaultRenderer);
|
|
90
|
+
return React.createElement(ResolvedRenderer, { ...props });
|
|
98
91
|
};
|
|
99
|
-
exports.GherkinStep = GherkinStep;
|
|
100
92
|
//# sourceMappingURL=GherkinStep.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GherkinStep.js","sourceRoot":"","sources":["../../../../src/components/gherkin/GherkinStep.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GherkinStep.js","sourceRoot":"","sources":["../../../../src/components/gherkin/GherkinStep.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,sBAAsB,GAKvB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,oBAAoB,MAAM,+BAA+B,CAAA;AAChE,OAAO,mBAAmB,MAAM,8BAA8B,CAAA;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAsC,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAC9F,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAChE,OAAO,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAUlC,SAAS,WAAW,CAAC,WAAiB,EAAE,UAAuB;IAC7D,MAAM,IAAI,GAAmB,EAAE,GAAG,WAAW,EAAE,CAAA;IAC/C,IAAI,UAAU,EAAE;QACd,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,CAAA;QAC3B,I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aAAa,EAAE,EAAE,EAAE,eAAe,CAAC,CAAA;IACjG,OAAO,oBAAC,gBAAgB,OAAK,KAAK,GAAI,CAAA;AACxC,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GherkinSteps.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/GherkinSteps.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAoB,iBAAiB,EAAsB,MAAM,
|
|
1
|
+
{"version":3,"file":"GherkinSteps.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/GherkinSteps.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAoB,iBAAiB,EAAsB,MAAM,uBAAuB,CAAA;AAuB/F,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAOnE,CAAA"}
|
|
@@ -1,22 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.GherkinSteps = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const customise_1 = require("../customise");
|
|
9
|
-
const GherkinStep_1 = require("./GherkinStep");
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useCustomRendering } from '../customise/index.js';
|
|
3
|
+
import { GherkinStep } from './GherkinStep.js';
|
|
10
4
|
const DefaultRenderer = ({ steps, pickle, hasExamples }) => {
|
|
11
|
-
return (
|
|
12
|
-
const pickleStep = pickle
|
|
13
|
-
return (
|
|
14
|
-
|
|
5
|
+
return (React.createElement(React.Fragment, null, steps.map((step, index) => {
|
|
6
|
+
const pickleStep = pickle?.steps.find((item) => item.astNodeIds.includes(step.id));
|
|
7
|
+
return (React.createElement("li", { key: index },
|
|
8
|
+
React.createElement(GherkinStep, { key: index, step: step, pickleStep: pickleStep, hasExamples: hasExamples })));
|
|
15
9
|
})));
|
|
16
10
|
};
|
|
17
|
-
const GherkinSteps = (props) => {
|
|
18
|
-
const ResolvedRenderer =
|
|
19
|
-
return
|
|
11
|
+
export const GherkinSteps = (props) => {
|
|
12
|
+
const ResolvedRenderer = useCustomRendering('GherkinSteps', {}, DefaultRenderer);
|
|
13
|
+
return React.createElement(ResolvedRenderer, { ...props });
|
|
20
14
|
};
|
|
21
|
-
exports.GherkinSteps = GherkinSteps;
|
|
22
15
|
//# sourceMappingURL=GherkinSteps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GherkinSteps.js","sourceRoot":"","sources":["../../../../src/components/gherkin/GherkinSteps.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GherkinSteps.js","sourceRoot":"","sources":["../../../../src/components/gherkin/GherkinSteps.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAuC,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAC/F,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,MAAM,eAAe,GAAwC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,EAAE;IAC9F,OAAO,CACL,0CACG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;QACzB,MAAM,UAAU,GAAG,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAA;QAClF,OAAO,CACL,4BAAI,GAAG,EAAE,KAAK;YACZ,oBAAC,WAAW,IACV,GAAG,EAAE,KAAK,EACV,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,WAAW,GACxB,CACC,CACN,CAAA;IACH,CAAC,CAAC,CACD,CACJ,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,YAAY,GAA+C,CAAC,KAAK,EAAE,EAAE;IAChF,MAAM,gBAAgB,GAAG,kBAAkB,CACzC,cAAc,EACd,EAAE,EACF,eAAe,CAChB,CAAA;IACD,OAAO,oBAAC,gBAAgB,OAAK,KAAK,GAAI,CAAA;AACxC,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HookStep.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/HookStep.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,aAAa,EAAsB,MAAM,
|
|
1
|
+
{"version":3,"file":"HookStep.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/HookStep.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,aAAa,EAAsB,MAAM,uBAAuB,CAAA;AAgDzE,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,iBAAiB,CAAC,aAAa,CAG3D,CAAA"}
|
|
@@ -1,72 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.HookStep = void 0;
|
|
30
|
-
const messages = __importStar(require("@cucumber/messages"));
|
|
31
|
-
const messages_1 = require("@cucumber/messages");
|
|
32
|
-
const react_1 = __importDefault(require("react"));
|
|
33
|
-
const CucumberQueryContext_1 = __importDefault(require("../../CucumberQueryContext"));
|
|
34
|
-
const customise_1 = require("../customise");
|
|
35
|
-
const Attachment_1 = require("./Attachment");
|
|
36
|
-
const ErrorMessage_1 = require("./ErrorMessage");
|
|
37
|
-
const StepItem_1 = require("./StepItem");
|
|
38
|
-
const Title_1 = require("./Title");
|
|
1
|
+
import * as messages from '@cucumber/messages';
|
|
2
|
+
import { getWorstTestStepResult } from '@cucumber/messages';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import CucumberQueryContext from '../../CucumberQueryContext.js';
|
|
5
|
+
import { useCustomRendering } from '../customise/index.js';
|
|
6
|
+
import { TestStepResultDetails } from '../results/index.js';
|
|
7
|
+
import { Attachment } from './Attachment.js';
|
|
8
|
+
import { StepItem } from './StepItem.js';
|
|
9
|
+
import { Title } from './Title.js';
|
|
39
10
|
const DefaultRenderer = ({ step }) => {
|
|
40
11
|
if (!step.hookId)
|
|
41
12
|
throw new Error('Expected step to have a hookId');
|
|
42
|
-
const cucumberQuery =
|
|
43
|
-
const stepResult =
|
|
13
|
+
const cucumberQuery = React.useContext(CucumberQueryContext);
|
|
14
|
+
const stepResult = getWorstTestStepResult(cucumberQuery.getTestStepResults(step.id));
|
|
44
15
|
const hook = cucumberQuery.getHook(step.hookId);
|
|
45
16
|
const attachments = cucumberQuery.getTestStepsAttachments([step.id]);
|
|
46
17
|
if (stepResult.status === messages.TestStepResultStatus.FAILED) {
|
|
47
18
|
let location = 'Unknown location';
|
|
48
|
-
if (hook
|
|
19
|
+
if (hook?.sourceReference.location) {
|
|
49
20
|
location = `${hook.sourceReference.uri}:${hook.sourceReference.location.line}`;
|
|
50
21
|
}
|
|
51
|
-
else if (hook
|
|
22
|
+
else if (hook?.sourceReference.javaMethod) {
|
|
52
23
|
location = `${hook.sourceReference.javaMethod.className}.${hook.sourceReference.javaMethod.methodName}`;
|
|
53
24
|
}
|
|
54
|
-
return (
|
|
55
|
-
|
|
56
|
-
|
|
25
|
+
return (React.createElement(StepItem, { status: stepResult.status },
|
|
26
|
+
React.createElement(Title, { header: "h3", id: step.id },
|
|
27
|
+
hook?.name ? `Hook "${hook.name}"` : 'Hook',
|
|
57
28
|
" failed: ",
|
|
58
29
|
location),
|
|
59
|
-
|
|
60
|
-
attachments.map((attachment, i) => (
|
|
30
|
+
React.createElement(TestStepResultDetails, { ...stepResult }),
|
|
31
|
+
attachments.map((attachment, i) => (React.createElement(Attachment, { key: i, attachment: attachment })))));
|
|
61
32
|
}
|
|
62
33
|
if (attachments) {
|
|
63
|
-
return (
|
|
34
|
+
return (React.createElement(StepItem, null, attachments.map((attachment, i) => (React.createElement(Attachment, { key: i, attachment: attachment })))));
|
|
64
35
|
}
|
|
65
36
|
return null;
|
|
66
37
|
};
|
|
67
|
-
const HookStep = (props) => {
|
|
68
|
-
const ResolvedRenderer =
|
|
69
|
-
return
|
|
38
|
+
export const HookStep = (props) => {
|
|
39
|
+
const ResolvedRenderer = useCustomRendering('HookStep', {}, DefaultRenderer);
|
|
40
|
+
return React.createElement(ResolvedRenderer, { ...props });
|
|
70
41
|
};
|
|
71
|
-
exports.HookStep = HookStep;
|
|
72
42
|
//# sourceMappingURL=HookStep.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HookStep.js","sourceRoot":"","sources":["../../../../src/components/gherkin/HookStep.tsx"],"names":[],"mappings":"
|
|
1
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|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { HookStep } from './HookStep.js';
|
|
3
|
+
export const HookSteps = ({ hookSteps }) => {
|
|
4
|
+
return (React.createElement(React.Fragment, null, hookSteps.map((step, index) => (React.createElement("li", { key: index },
|
|
5
|
+
React.createElement(HookStep, { key: index, step: step }))))));
|
|
4
6
|
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.HookSteps = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const HookStep_1 = require("./HookStep");
|
|
9
|
-
const HookSteps = ({ hookSteps }) => {
|
|
10
|
-
return (react_1.default.createElement(react_1.default.Fragment, null, hookSteps.map((step, index) => (react_1.default.createElement("li", { key: index },
|
|
11
|
-
react_1.default.createElement(HookStep_1.HookStep, { key: index, step: step }))))));
|
|
12
|
-
};
|
|
13
|
-
exports.HookSteps = HookSteps;
|
|
14
7
|
//# sourceMappingURL=HookSteps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HookSteps.js","sourceRoot":"","sources":["../../../../src/components/gherkin/HookSteps.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HookSteps.js","sourceRoot":"","sources":["../../../../src/components/gherkin/HookSteps.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAMxC,MAAM,CAAC,MAAM,SAAS,GAAoC,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE;IAC1E,OAAO,CACL,0CACG,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAC9B,4BAAI,GAAG,EAAE,KAAK;QACZ,oBAAC,QAAQ,IAAC,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,GAAI,CACjC,CACN,CAAC,CACD,CACJ,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Keyword.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/Keyword.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAEhD,OAAO,
|
|
1
|
+
{"version":3,"file":"Keyword.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/Keyword.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAEhD,OAAO,EAGL,YAAY,EAEb,MAAM,uBAAuB,CAAA;AAO9B,eAAO,MAAM,OAAO,EAAE,iBAAiB,CAAC,YAAY,CAOnD,CAAA"}
|
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Keyword = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const customise_1 = require("../customise");
|
|
9
|
-
const Keyword_module_scss_1 = __importDefault(require("./Keyword.module.scss"));
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useCustomRendering, } from '../customise/index.js';
|
|
3
|
+
import defaultStyles from './Keyword.module.scss';
|
|
10
4
|
const DefaultRenderer = ({ children, styles }) => {
|
|
11
|
-
return
|
|
5
|
+
return React.createElement("span", { className: styles.keyword }, children);
|
|
12
6
|
};
|
|
13
|
-
const Keyword = ({ children }) => {
|
|
14
|
-
const ResolvedRenderer =
|
|
15
|
-
return
|
|
7
|
+
export const Keyword = ({ children }) => {
|
|
8
|
+
const ResolvedRenderer = useCustomRendering('Keyword', defaultStyles, DefaultRenderer);
|
|
9
|
+
return React.createElement(ResolvedRenderer, null, children);
|
|
16
10
|
};
|
|
17
|
-
exports.Keyword = Keyword;
|
|
18
11
|
//# sourceMappingURL=Keyword.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Keyword.js","sourceRoot":"","sources":["../../../../src/components/gherkin/Keyword.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Keyword.js","sourceRoot":"","sources":["../../../../src/components/gherkin/Keyword.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAA;AAEhD,OAAO,EAIL,kBAAkB,GACnB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,aAAa,MAAM,uBAAuB,CAAA;AAEjD,MAAM,eAAe,GAAmD,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE;IAC/F,OAAO,8BAAM,SAAS,EAAE,MAAM,CAAC,OAAO,IAAG,QAAQ,CAAQ,CAAA;AAC3D,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAoC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACvE,MAAM,gBAAgB,GAAG,kBAAkB,CACzC,SAAS,EACT,aAAa,EACb,eAAe,CAChB,CAAA;IACD,OAAO,oBAAC,gBAAgB,QAAE,QAAQ,CAAoB,CAAA;AACxD,CAAC,CAAA"}
|
|
@@ -1,22 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const GherkinStep_1 = require("./GherkinStep");
|
|
15
|
-
const Keyword_1 = require("./Keyword");
|
|
16
|
-
const MDG_module_scss_1 = __importDefault(require("./MDG.module.scss"));
|
|
17
|
-
const Title_1 = require("./Title");
|
|
18
|
-
const MDG = ({ uri, children }) => {
|
|
19
|
-
const gherkinQuery = react_1.default.useContext(GherkinQueryContext_1.default);
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ReactMarkdown from 'react-markdown';
|
|
3
|
+
import GherkinQueryContext from '../../GherkinQueryContext.js';
|
|
4
|
+
import { HighLight } from '../app/HighLight.js';
|
|
5
|
+
import rehypePlugins from '../app/rehypePlugins.js';
|
|
6
|
+
import dataTableStyles from './DataTable.module.scss';
|
|
7
|
+
import { ExamplesTable } from './ExamplesTable.js';
|
|
8
|
+
import { GherkinStep } from './GherkinStep.js';
|
|
9
|
+
import { Keyword } from './Keyword.js';
|
|
10
|
+
import styles from './MDG.module.scss';
|
|
11
|
+
import { Title } from './Title.js';
|
|
12
|
+
export const MDG = ({ uri, children }) => {
|
|
13
|
+
const gherkinQuery = React.useContext(GherkinQueryContext);
|
|
20
14
|
let hasExamples = false;
|
|
21
15
|
let examples = undefined;
|
|
22
16
|
function header(line, level, children) {
|
|
@@ -29,15 +23,15 @@ const MDG = ({ uri, children }) => {
|
|
|
29
23
|
examples;
|
|
30
24
|
if (titleAstNode) {
|
|
31
25
|
const header = `h${level}`;
|
|
32
|
-
return (
|
|
33
|
-
|
|
26
|
+
return (React.createElement(Title, { header: header, id: titleAstNode.id },
|
|
27
|
+
React.createElement(Keyword, null,
|
|
34
28
|
titleAstNode.keyword,
|
|
35
29
|
":"),
|
|
36
|
-
|
|
30
|
+
React.createElement(HighLight, { text: titleAstNode.name })));
|
|
37
31
|
}
|
|
38
|
-
return
|
|
32
|
+
return React.createElement("h3", null, children);
|
|
39
33
|
}
|
|
40
|
-
return (
|
|
34
|
+
return (React.createElement(ReactMarkdown, { rehypePlugins: rehypePlugins, components: {
|
|
41
35
|
h1({ node, level, children }) {
|
|
42
36
|
return header(line(node), level, children);
|
|
43
37
|
},
|
|
@@ -55,30 +49,29 @@ const MDG = ({ uri, children }) => {
|
|
|
55
49
|
},
|
|
56
50
|
table({ node, children }) {
|
|
57
51
|
if (examples && examples.tableHeader && line(node) >= 3) {
|
|
58
|
-
return (
|
|
52
|
+
return (React.createElement(ExamplesTable, { tableHeader: examples.tableHeader, tableBody: examples.tableBody }));
|
|
59
53
|
}
|
|
60
|
-
return
|
|
54
|
+
return React.createElement("table", { className: dataTableStyles.table }, children);
|
|
61
55
|
},
|
|
62
56
|
ul({ node, children }) {
|
|
63
57
|
const step = gherkinQuery.getStep(uri, line(node));
|
|
64
58
|
if (!step) {
|
|
65
59
|
// Non-Gherkin list
|
|
66
|
-
return
|
|
60
|
+
return React.createElement("ul", null, children);
|
|
67
61
|
}
|
|
68
|
-
return
|
|
62
|
+
return React.createElement("ul", { className: styles.steps }, children);
|
|
69
63
|
},
|
|
70
64
|
li({ node, children }) {
|
|
71
65
|
const step = gherkinQuery.getStep(uri, line(node));
|
|
72
66
|
if (!step) {
|
|
73
67
|
// Non-Gherkin list item
|
|
74
|
-
return
|
|
68
|
+
return React.createElement("li", null, children);
|
|
75
69
|
}
|
|
76
|
-
return (
|
|
77
|
-
|
|
70
|
+
return (React.createElement("li", null,
|
|
71
|
+
React.createElement(GherkinStep, { step: step, hasExamples: hasExamples })));
|
|
78
72
|
},
|
|
79
73
|
} }, children));
|
|
80
74
|
};
|
|
81
|
-
exports.MDG = MDG;
|
|
82
75
|
function line(node) {
|
|
83
76
|
if (node.position === undefined)
|
|
84
77
|
throw new Error(`undefined position in ${JSON.stringify(node)}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MDG.js","sourceRoot":"","sources":["../../../../src/components/gherkin/MDG.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MDG.js","sourceRoot":"","sources":["../../../../src/components/gherkin/MDG.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,aAAa,MAAM,gBAAgB,CAAA;AAG1C,OAAO,mBAAmB,MAAM,8BAA8B,CAAA;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,aAAa,MAAM,yBAAyB,CAAA;AAEnD,OAAO,eAAe,MAAM,yBAAyB,CAAA;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;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YACD,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACnB,MAAM,IAAI,GAAG,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;gBAClD,IAAI,CAAC,IAAI,EAAE;oBACT,mBAAmB;oBACnB,OAAO,gCAAK,QAAQ,CAAM,CAAA;iBAC3B;gBACD,OAAO,4BAAI,SAAS,EAAE,MAAM,CAAC,KAAK,IAAG,QAAQ,CAAM,CAAA;YACrD,CAAC;YACD,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACnB,MAAM,IAAI,GAAG,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;gBAClD,IAAI,CAAC,IAAI,EAAE;oBACT,wBAAwB;oBACxB,OAAO,gCAAK,QAAQ,CAAM,CAAA;iBAC3B;gBACD,OAAO,CACL;oBACE,oBAAC,WAAW,IAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,GAAI,CAClD,CACN,CAAA;YACH,CAAC;SACF,IAEA,QAAQ,CACK,CACjB,CAAA;AACH,CAAC,CAAA;AAED,SAAS,IAAI,CAAC,IAAa;IACzB,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,yBAAyB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IACjG,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAA;AACjC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Parameter.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/Parameter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAGL,cAAc,EAEf,MAAM,
|
|
1
|
+
{"version":3,"file":"Parameter.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/Parameter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAGL,cAAc,EAEf,MAAM,uBAAuB,CAAA;AAgB9B,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAO7D,CAAA"}
|
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Parameter = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const customise_1 = require("../customise");
|
|
9
|
-
const Parameter_module_scss_1 = __importDefault(require("./Parameter.module.scss"));
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useCustomRendering, } from '../customise/index.js';
|
|
3
|
+
import defaultStyles from './Parameter.module.scss';
|
|
10
4
|
const DefaultRenderer = ({ parameterTypeName, value, children, styles, }) => {
|
|
11
|
-
return (
|
|
5
|
+
return (React.createElement("span", { title: parameterTypeName, "aria-label": value, className: styles.parameter }, children));
|
|
12
6
|
};
|
|
13
|
-
const Parameter = (props) => {
|
|
14
|
-
const ResolvedRenderer =
|
|
15
|
-
return
|
|
7
|
+
export const Parameter = (props) => {
|
|
8
|
+
const ResolvedRenderer = useCustomRendering('Parameter', defaultStyles, DefaultRenderer);
|
|
9
|
+
return React.createElement(ResolvedRenderer, { ...props });
|
|
16
10
|
};
|
|
17
|
-
exports.Parameter = Parameter;
|
|
18
11
|
//# sourceMappingURL=Parameter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Parameter.js","sourceRoot":"","sources":["../../../../src/components/gherkin/Parameter.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Parameter.js","sourceRoot":"","sources":["../../../../src/components/gherkin/Parameter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAIL,kBAAkB,GACnB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,aAAa,MAAM,yBAAyB,CAAA;AAEnD,MAAM,eAAe,GAAuD,CAAC,EAC3E,iBAAiB,EACjB,KAAK,EACL,QAAQ,EACR,MAAM,GACP,EAAE,EAAE;IACH,OAAO,CACL,8BAAM,KAAK,EAAE,iBAAiB,gBAAc,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,IAC3E,QAAQ,CACJ,CACR,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,SAAS,GAA4C,CAAC,KAAK,EAAE,EAAE;IAC1E,MAAM,gBAAgB,GAAG,kBAAkB,CACzC,WAAW,EACX,aAAa,EACb,eAAe,CAChB,CAAA;IACD,OAAO,oBAAC,gBAAgB,OAAK,KAAK,GAAI,CAAA;AACxC,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Rule.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/Rule.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAoB,SAAS,EAAsB,MAAM,
|
|
1
|
+
{"version":3,"file":"Rule.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/Rule.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAoB,SAAS,EAAsB,MAAM,uBAAuB,CAAA;AAiCvF,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,iBAAiB,CAAC,SAAS,CAGnD,CAAA"}
|