@cucumber/react-components 20.0.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/LICENSE +21 -0
- package/README.md +215 -0
- package/dist/src/CucumberQueryContext.d.ts +5 -0
- package/dist/src/CucumberQueryContext.d.ts.map +1 -0
- package/dist/src/CucumberQueryContext.js +9 -0
- package/dist/src/CucumberQueryContext.js.map +1 -0
- package/dist/src/EnvelopesQueryContext.d.ts +14 -0
- package/dist/src/EnvelopesQueryContext.d.ts.map +1 -0
- package/dist/src/EnvelopesQueryContext.js +36 -0
- package/dist/src/EnvelopesQueryContext.js.map +1 -0
- package/dist/src/GherkinQueryContext.d.ts +5 -0
- package/dist/src/GherkinQueryContext.d.ts.map +1 -0
- package/dist/src/GherkinQueryContext.js +9 -0
- package/dist/src/GherkinQueryContext.js.map +1 -0
- package/dist/src/SearchQueryContext.d.ts +34 -0
- package/dist/src/SearchQueryContext.d.ts.map +1 -0
- package/dist/src/SearchQueryContext.js +102 -0
- package/dist/src/SearchQueryContext.js.map +1 -0
- package/dist/src/UriContext.d.ts +4 -0
- package/dist/src/UriContext.d.ts.map +1 -0
- package/dist/src/UriContext.js +8 -0
- package/dist/src/UriContext.js.map +1 -0
- package/dist/src/ciCommitLink.d.ts +3 -0
- package/dist/src/ciCommitLink.d.ts.map +1 -0
- package/dist/src/ciCommitLink.js +18 -0
- package/dist/src/ciCommitLink.js.map +1 -0
- package/dist/src/components/CucumberReact.d.ts +10 -0
- package/dist/src/components/CucumberReact.d.ts.map +1 -0
- package/dist/src/components/CucumberReact.js +16 -0
- package/dist/src/components/CucumberReact.js.map +1 -0
- package/dist/src/components/CucumberReact.module.scss +35 -0
- package/dist/src/components/app/CICommitLink.d.ts +8 -0
- package/dist/src/components/app/CICommitLink.d.ts.map +1 -0
- package/dist/src/components/app/CICommitLink.js +25 -0
- package/dist/src/components/app/CICommitLink.js.map +1 -0
- package/dist/src/components/app/EnvelopesWrapper.d.ts +8 -0
- package/dist/src/components/app/EnvelopesWrapper.d.ts.map +1 -0
- package/dist/src/components/app/EnvelopesWrapper.js +47 -0
- package/dist/src/components/app/EnvelopesWrapper.js.map +1 -0
- package/dist/src/components/app/ExecutionSummary.d.ts +13 -0
- package/dist/src/components/app/ExecutionSummary.d.ts.map +1 -0
- package/dist/src/components/app/ExecutionSummary.js +82 -0
- package/dist/src/components/app/ExecutionSummary.js.map +1 -0
- package/dist/src/components/app/ExecutionSummary.module.scss +59 -0
- package/dist/src/components/app/FilteredResults.d.ts +7 -0
- package/dist/src/components/app/FilteredResults.d.ts.map +1 -0
- package/dist/src/components/app/FilteredResults.js +42 -0
- package/dist/src/components/app/FilteredResults.js.map +1 -0
- package/dist/src/components/app/FilteredResults.module.scss +7 -0
- package/dist/src/components/app/GherkinDocumentList.d.ts +9 -0
- package/dist/src/components/app/GherkinDocumentList.d.ts.map +1 -0
- package/dist/src/components/app/GherkinDocumentList.js +84 -0
- package/dist/src/components/app/GherkinDocumentList.js.map +1 -0
- package/dist/src/components/app/GherkinDocumentList.module.scss +45 -0
- package/dist/src/components/app/HighLight.d.ts +9 -0
- package/dist/src/components/app/HighLight.d.ts.map +1 -0
- package/dist/src/components/app/HighLight.js +38 -0
- package/dist/src/components/app/HighLight.js.map +1 -0
- package/dist/src/components/app/NoMatchResult.d.ts +7 -0
- package/dist/src/components/app/NoMatchResult.d.ts.map +1 -0
- package/dist/src/components/app/NoMatchResult.js +19 -0
- package/dist/src/components/app/NoMatchResult.js.map +1 -0
- package/dist/src/components/app/NoMatchResult.module.scss +13 -0
- package/dist/src/components/app/OSIcon.d.ts +5 -0
- package/dist/src/components/app/OSIcon.d.ts.map +1 -0
- package/dist/src/components/app/OSIcon.js +27 -0
- package/dist/src/components/app/OSIcon.js.map +1 -0
- package/dist/src/components/app/QueriesWrapper.d.ts +12 -0
- package/dist/src/components/app/QueriesWrapper.d.ts.map +1 -0
- package/dist/src/components/app/QueriesWrapper.js +15 -0
- package/dist/src/components/app/QueriesWrapper.js.map +1 -0
- package/dist/src/components/app/RuntimeIcon.d.ts +5 -0
- package/dist/src/components/app/RuntimeIcon.d.ts.map +1 -0
- package/dist/src/components/app/RuntimeIcon.js +27 -0
- package/dist/src/components/app/RuntimeIcon.js.map +1 -0
- package/dist/src/components/app/SearchBar.d.ts +12 -0
- package/dist/src/components/app/SearchBar.d.ts.map +1 -0
- package/dist/src/components/app/SearchBar.js +48 -0
- package/dist/src/components/app/SearchBar.js.map +1 -0
- package/dist/src/components/app/SearchBar.module.scss +74 -0
- package/dist/src/components/app/SearchWrapper.d.ts +4 -0
- package/dist/src/components/app/SearchWrapper.d.ts.map +1 -0
- package/dist/src/components/app/SearchWrapper.js +48 -0
- package/dist/src/components/app/SearchWrapper.js.map +1 -0
- package/dist/src/components/app/StatusesSummary.d.ts +8 -0
- package/dist/src/components/app/StatusesSummary.d.ts.map +1 -0
- package/dist/src/components/app/StatusesSummary.js +24 -0
- package/dist/src/components/app/StatusesSummary.js.map +1 -0
- package/dist/src/components/app/StatusesSummary.module.scss +34 -0
- package/dist/src/components/app/icons/CucumberLogo.d.ts +3 -0
- package/dist/src/components/app/icons/CucumberLogo.d.ts.map +1 -0
- package/dist/src/components/app/icons/CucumberLogo.js +16 -0
- package/dist/src/components/app/icons/CucumberLogo.js.map +1 -0
- package/dist/src/components/app/icons/Jvm.d.ts +3 -0
- package/dist/src/components/app/icons/Jvm.d.ts.map +1 -0
- package/dist/src/components/app/icons/Jvm.js +17 -0
- package/dist/src/components/app/icons/Jvm.js.map +1 -0
- package/dist/src/components/app/icons/Linux.d.ts +3 -0
- package/dist/src/components/app/icons/Linux.d.ts.map +1 -0
- package/dist/src/components/app/icons/Linux.js +27 -0
- package/dist/src/components/app/icons/Linux.js.map +1 -0
- package/dist/src/components/app/icons/MacOS.d.ts +3 -0
- package/dist/src/components/app/icons/MacOS.d.ts.map +1 -0
- package/dist/src/components/app/icons/MacOS.js +13 -0
- package/dist/src/components/app/icons/MacOS.js.map +1 -0
- package/dist/src/components/app/icons/NodeJs.d.ts +3 -0
- package/dist/src/components/app/icons/NodeJs.d.ts.map +1 -0
- package/dist/src/components/app/icons/NodeJs.js +43 -0
- package/dist/src/components/app/icons/NodeJs.js.map +1 -0
- package/dist/src/components/app/icons/Ruby.d.ts +3 -0
- package/dist/src/components/app/icons/Ruby.d.ts.map +1 -0
- package/dist/src/components/app/icons/Ruby.js +13 -0
- package/dist/src/components/app/icons/Ruby.js.map +1 -0
- package/dist/src/components/app/icons/Windows.d.ts +3 -0
- package/dist/src/components/app/icons/Windows.d.ts.map +1 -0
- package/dist/src/components/app/icons/Windows.js +13 -0
- package/dist/src/components/app/icons/Windows.js.map +1 -0
- package/dist/src/components/app/index.d.ts +12 -0
- package/dist/src/components/app/index.d.ts.map +1 -0
- package/dist/src/components/app/index.js +28 -0
- package/dist/src/components/app/index.js.map +1 -0
- package/dist/src/components/app/rehypePlugins.d.ts +4 -0
- package/dist/src/components/app/rehypePlugins.d.ts.map +1 -0
- package/dist/src/components/app/rehypePlugins.js +14 -0
- package/dist/src/components/app/rehypePlugins.js.map +1 -0
- package/dist/src/components/app/statuses.d.ts +4 -0
- package/dist/src/components/app/statuses.d.ts.map +1 -0
- package/dist/src/components/app/statuses.js +37 -0
- package/dist/src/components/app/statuses.js.map +1 -0
- package/dist/src/components/customise/customRendering.d.ts +122 -0
- package/dist/src/components/customise/customRendering.d.ts.map +1 -0
- package/dist/src/components/customise/customRendering.js +58 -0
- package/dist/src/components/customise/customRendering.js.map +1 -0
- package/dist/src/components/customise/index.d.ts +3 -0
- package/dist/src/components/customise/index.d.ts.map +1 -0
- package/dist/src/components/customise/index.js +19 -0
- package/dist/src/components/customise/index.js.map +1 -0
- package/dist/src/components/customise/theming.d.ts +2 -0
- package/dist/src/components/customise/theming.d.ts.map +1 -0
- package/dist/src/components/customise/theming.js +3 -0
- package/dist/src/components/customise/theming.js.map +1 -0
- package/dist/src/components/gherkin/Anchor.d.ts +4 -0
- package/dist/src/components/gherkin/Anchor.d.ts.map +1 -0
- package/dist/src/components/gherkin/Anchor.js +23 -0
- package/dist/src/components/gherkin/Anchor.js.map +1 -0
- package/dist/src/components/gherkin/Anchor.module.scss +20 -0
- package/dist/src/components/gherkin/Attachment.d.ts +5 -0
- package/dist/src/components/gherkin/Attachment.d.ts.map +1 -0
- package/dist/src/components/gherkin/Attachment.js +100 -0
- package/dist/src/components/gherkin/Attachment.js.map +1 -0
- package/dist/src/components/gherkin/Attachment.module.scss +23 -0
- package/dist/src/components/gherkin/Background.d.ts +4 -0
- package/dist/src/components/gherkin/Background.d.ts.map +1 -0
- package/dist/src/components/gherkin/Background.js +30 -0
- package/dist/src/components/gherkin/Background.js.map +1 -0
- package/dist/src/components/gherkin/Background.module.scss +12 -0
- package/dist/src/components/gherkin/Children.d.ts +4 -0
- package/dist/src/components/gherkin/Children.d.ts.map +1 -0
- package/dist/src/components/gherkin/Children.js +18 -0
- package/dist/src/components/gherkin/Children.js.map +1 -0
- package/dist/src/components/gherkin/Children.module.scss +6 -0
- package/dist/src/components/gherkin/DataTable.d.ts +4 -0
- package/dist/src/components/gherkin/DataTable.d.ts.map +1 -0
- package/dist/src/components/gherkin/DataTable.js +25 -0
- package/dist/src/components/gherkin/DataTable.js.map +1 -0
- package/dist/src/components/gherkin/DataTable.module.scss +41 -0
- package/dist/src/components/gherkin/Description.d.ts +4 -0
- package/dist/src/components/gherkin/Description.d.ts.map +1 -0
- package/dist/src/components/gherkin/Description.js +23 -0
- package/dist/src/components/gherkin/Description.js.map +1 -0
- package/dist/src/components/gherkin/Description.module.scss +10 -0
- package/dist/src/components/gherkin/DocString.d.ts +4 -0
- package/dist/src/components/gherkin/DocString.d.ts.map +1 -0
- package/dist/src/components/gherkin/DocString.js +20 -0
- package/dist/src/components/gherkin/DocString.js.map +1 -0
- package/dist/src/components/gherkin/DocString.module.scss +25 -0
- package/dist/src/components/gherkin/ErrorMessage.d.ts +4 -0
- package/dist/src/components/gherkin/ErrorMessage.d.ts.map +1 -0
- package/dist/src/components/gherkin/ErrorMessage.js +18 -0
- package/dist/src/components/gherkin/ErrorMessage.js.map +1 -0
- package/dist/src/components/gherkin/ErrorMessage.module.scss +13 -0
- package/dist/src/components/gherkin/Examples.d.ts +4 -0
- package/dist/src/components/gherkin/Examples.d.ts.map +1 -0
- package/dist/src/components/gherkin/Examples.js +33 -0
- package/dist/src/components/gherkin/Examples.js.map +1 -0
- package/dist/src/components/gherkin/Examples.module.scss +3 -0
- package/dist/src/components/gherkin/ExamplesTable.d.ts +4 -0
- package/dist/src/components/gherkin/ExamplesTable.d.ts.map +1 -0
- package/dist/src/components/gherkin/ExamplesTable.js +58 -0
- package/dist/src/components/gherkin/ExamplesTable.js.map +1 -0
- package/dist/src/components/gherkin/Feature.d.ts +4 -0
- package/dist/src/components/gherkin/Feature.d.ts.map +1 -0
- package/dist/src/components/gherkin/Feature.js +47 -0
- package/dist/src/components/gherkin/Feature.js.map +1 -0
- package/dist/src/components/gherkin/GherkinDocument.d.ts +4 -0
- package/dist/src/components/gherkin/GherkinDocument.d.ts.map +1 -0
- package/dist/src/components/gherkin/GherkinDocument.js +18 -0
- package/dist/src/components/gherkin/GherkinDocument.js.map +1 -0
- package/dist/src/components/gherkin/GherkinStep.d.ts +4 -0
- package/dist/src/components/gherkin/GherkinStep.d.ts.map +1 -0
- package/dist/src/components/gherkin/GherkinStep.js +89 -0
- package/dist/src/components/gherkin/GherkinStep.js.map +1 -0
- package/dist/src/components/gherkin/HookList.d.ts +8 -0
- package/dist/src/components/gherkin/HookList.d.ts.map +1 -0
- package/dist/src/components/gherkin/HookList.js +14 -0
- package/dist/src/components/gherkin/HookList.js.map +1 -0
- package/dist/src/components/gherkin/HookStep.d.ts +4 -0
- package/dist/src/components/gherkin/HookStep.d.ts.map +1 -0
- package/dist/src/components/gherkin/HookStep.js +72 -0
- package/dist/src/components/gherkin/HookStep.js.map +1 -0
- package/dist/src/components/gherkin/Keyword.d.ts +3 -0
- package/dist/src/components/gherkin/Keyword.d.ts.map +1 -0
- package/dist/src/components/gherkin/Keyword.js +18 -0
- package/dist/src/components/gherkin/Keyword.js.map +1 -0
- package/dist/src/components/gherkin/Keyword.module.scss +7 -0
- package/dist/src/components/gherkin/MDG.d.ts +8 -0
- package/dist/src/components/gherkin/MDG.d.ts.map +1 -0
- package/dist/src/components/gherkin/MDG.js +87 -0
- package/dist/src/components/gherkin/MDG.js.map +1 -0
- package/dist/src/components/gherkin/MDG.module.scss +12 -0
- package/dist/src/components/gherkin/Parameter.d.ts +4 -0
- package/dist/src/components/gherkin/Parameter.d.ts.map +1 -0
- package/dist/src/components/gherkin/Parameter.js +18 -0
- package/dist/src/components/gherkin/Parameter.js.map +1 -0
- package/dist/src/components/gherkin/Parameter.module.scss +6 -0
- package/dist/src/components/gherkin/Rule.d.ts +4 -0
- package/dist/src/components/gherkin/Rule.d.ts.map +1 -0
- package/dist/src/components/gherkin/Rule.js +43 -0
- package/dist/src/components/gherkin/Rule.js.map +1 -0
- package/dist/src/components/gherkin/Scenario.d.ts +4 -0
- package/dist/src/components/gherkin/Scenario.d.ts.map +1 -0
- package/dist/src/components/gherkin/Scenario.js +51 -0
- package/dist/src/components/gherkin/Scenario.js.map +1 -0
- package/dist/src/components/gherkin/Scenario.module.scss +12 -0
- package/dist/src/components/gherkin/StatusIcon.d.ts +4 -0
- package/dist/src/components/gherkin/StatusIcon.d.ts.map +1 -0
- package/dist/src/components/gherkin/StatusIcon.js +31 -0
- package/dist/src/components/gherkin/StatusIcon.js.map +1 -0
- package/dist/src/components/gherkin/StatusIcon.module.scss +16 -0
- package/dist/src/components/gherkin/StepItem.d.ts +7 -0
- package/dist/src/components/gherkin/StepItem.d.ts.map +1 -0
- package/dist/src/components/gherkin/StepItem.js +17 -0
- package/dist/src/components/gherkin/StepItem.js.map +1 -0
- package/dist/src/components/gherkin/StepItem.module.scss +22 -0
- package/dist/src/components/gherkin/StepList.d.ts +4 -0
- package/dist/src/components/gherkin/StepList.d.ts.map +1 -0
- package/dist/src/components/gherkin/StepList.js +19 -0
- package/dist/src/components/gherkin/StepList.js.map +1 -0
- package/dist/src/components/gherkin/Tags.d.ts +4 -0
- package/dist/src/components/gherkin/Tags.d.ts.map +1 -0
- package/dist/src/components/gherkin/Tags.js +23 -0
- package/dist/src/components/gherkin/Tags.js.map +1 -0
- package/dist/src/components/gherkin/Tags.module.scss +17 -0
- package/dist/src/components/gherkin/Title.d.ts +4 -0
- package/dist/src/components/gherkin/Title.d.ts.map +1 -0
- package/dist/src/components/gherkin/Title.js +20 -0
- package/dist/src/components/gherkin/Title.js.map +1 -0
- package/dist/src/components/gherkin/Title.module.scss +6 -0
- package/dist/src/components/gherkin/index.d.ts +26 -0
- package/dist/src/components/gherkin/index.d.ts.map +1 -0
- package/dist/src/components/gherkin/index.js +42 -0
- package/dist/src/components/gherkin/index.js.map +1 -0
- package/dist/src/components/gherkin/isNumber.d.ts +2 -0
- package/dist/src/components/gherkin/isNumber.d.ts.map +1 -0
- package/dist/src/components/gherkin/isNumber.js +9 -0
- package/dist/src/components/gherkin/isNumber.js.map +1 -0
- package/dist/src/components/gherkin/statusName.d.ts +4 -0
- package/dist/src/components/gherkin/statusName.d.ts.map +1 -0
- package/dist/src/components/gherkin/statusName.js +6 -0
- package/dist/src/components/gherkin/statusName.js.map +1 -0
- package/dist/src/components/index.d.ts +5 -0
- package/dist/src/components/index.d.ts.map +1 -0
- package/dist/src/components/index.js +34 -0
- package/dist/src/components/index.js.map +1 -0
- package/dist/src/countScenariosByStatuses.d.ts +10 -0
- package/dist/src/countScenariosByStatuses.d.ts.map +1 -0
- package/dist/src/countScenariosByStatuses.js +43 -0
- package/dist/src/countScenariosByStatuses.js.map +1 -0
- package/dist/src/filter/filterByStatus.d.ts +5 -0
- package/dist/src/filter/filterByStatus.d.ts.map +1 -0
- package/dist/src/filter/filterByStatus.js +20 -0
- package/dist/src/filter/filterByStatus.js.map +1 -0
- package/dist/src/hooks/index.d.ts +3 -0
- package/dist/src/hooks/index.d.ts.map +1 -0
- package/dist/src/hooks/index.js +19 -0
- package/dist/src/hooks/index.js.map +1 -0
- package/dist/src/hooks/useQueries.d.ts +11 -0
- package/dist/src/hooks/useQueries.d.ts.map +1 -0
- package/dist/src/hooks/useQueries.js +18 -0
- package/dist/src/hooks/useQueries.js.map +1 -0
- package/dist/src/hooks/useSearch.d.ts +3 -0
- package/dist/src/hooks/useSearch.d.ts.map +1 -0
- package/dist/src/hooks/useSearch.js +13 -0
- package/dist/src/hooks/useSearch.js.map +1 -0
- package/dist/src/index.d.ts +9 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +44 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/isTagExpression.d.ts +2 -0
- package/dist/src/isTagExpression.d.ts.map +1 -0
- package/dist/src/isTagExpression.js +8 -0
- package/dist/src/isTagExpression.js.map +1 -0
- package/dist/src/search/FeatureSearch.d.ts +8 -0
- package/dist/src/search/FeatureSearch.d.ts.map +1 -0
- package/dist/src/search/FeatureSearch.js +45 -0
- package/dist/src/search/FeatureSearch.js.map +1 -0
- package/dist/src/search/RuleSearch.d.ts +9 -0
- package/dist/src/search/RuleSearch.d.ts.map +1 -0
- package/dist/src/search/RuleSearch.js +42 -0
- package/dist/src/search/RuleSearch.js.map +1 -0
- package/dist/src/search/ScenarioSearch.d.ts +9 -0
- package/dist/src/search/ScenarioSearch.d.ts.map +1 -0
- package/dist/src/search/ScenarioSearch.js +42 -0
- package/dist/src/search/ScenarioSearch.js.map +1 -0
- package/dist/src/search/Search.d.ts +11 -0
- package/dist/src/search/Search.d.ts.map +1 -0
- package/dist/src/search/Search.js +32 -0
- package/dist/src/search/Search.js.map +1 -0
- package/dist/src/search/StepSearch.d.ts +11 -0
- package/dist/src/search/StepSearch.d.ts.map +1 -0
- package/dist/src/search/StepSearch.js +55 -0
- package/dist/src/search/StepSearch.js.map +1 -0
- package/dist/src/search/TagSearch.d.ts +12 -0
- package/dist/src/search/TagSearch.d.ts.map +1 -0
- package/dist/src/search/TagSearch.js +58 -0
- package/dist/src/search/TagSearch.js.map +1 -0
- package/dist/src/search/TextSearch.d.ts +12 -0
- package/dist/src/search/TextSearch.d.ts.map +1 -0
- package/dist/src/search/TextSearch.js +52 -0
- package/dist/src/search/TextSearch.js.map +1 -0
- package/dist/src/stories/custom-classes.scss +8 -0
- package/dist/src/styles/theming.scss +16 -0
- package/dist/src/toRepositoryId.d.ts +2 -0
- package/dist/src/toRepositoryId.d.ts.map +1 -0
- package/dist/src/toRepositoryId.js +14 -0
- package/dist/src/toRepositoryId.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/package.json +118 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Feature = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const HighLight_1 = require("../app/HighLight");
|
|
9
|
+
const customise_1 = require("../customise");
|
|
10
|
+
const Background_1 = require("./Background");
|
|
11
|
+
const Children_1 = require("./Children");
|
|
12
|
+
const Description_1 = require("./Description");
|
|
13
|
+
const Keyword_1 = require("./Keyword");
|
|
14
|
+
const Rule_1 = require("./Rule");
|
|
15
|
+
const Scenario_1 = require("./Scenario");
|
|
16
|
+
const Tags_1 = require("./Tags");
|
|
17
|
+
const Title_1 = require("./Title");
|
|
18
|
+
const DefaultRenderer = ({ feature }) => {
|
|
19
|
+
return (react_1.default.createElement("section", null,
|
|
20
|
+
react_1.default.createElement(Tags_1.Tags, { tags: feature.tags }),
|
|
21
|
+
react_1.default.createElement(Title_1.Title, { header: "h1", id: feature.name },
|
|
22
|
+
react_1.default.createElement(Keyword_1.Keyword, null,
|
|
23
|
+
feature.keyword,
|
|
24
|
+
":"),
|
|
25
|
+
react_1.default.createElement(HighLight_1.HighLight, { text: feature.name })),
|
|
26
|
+
react_1.default.createElement(Description_1.Description, { description: feature.description }),
|
|
27
|
+
react_1.default.createElement(Children_1.Children, null, (feature.children || []).map((child, index) => {
|
|
28
|
+
if (child.background) {
|
|
29
|
+
return react_1.default.createElement(Background_1.Background, { key: index, background: child.background });
|
|
30
|
+
}
|
|
31
|
+
else if (child.scenario) {
|
|
32
|
+
return react_1.default.createElement(Scenario_1.Scenario, { key: index, scenario: child.scenario });
|
|
33
|
+
}
|
|
34
|
+
else if (child.rule) {
|
|
35
|
+
return react_1.default.createElement(Rule_1.Rule, { key: index, rule: child.rule });
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
throw new Error('Expected background, scenario or rule');
|
|
39
|
+
}
|
|
40
|
+
}))));
|
|
41
|
+
};
|
|
42
|
+
const Feature = (props) => {
|
|
43
|
+
const ResolvedRenderer = (0, customise_1.useCustomRendering)('Feature', {}, DefaultRenderer);
|
|
44
|
+
return react_1.default.createElement(ResolvedRenderer, Object.assign({}, props));
|
|
45
|
+
};
|
|
46
|
+
exports.Feature = Feature;
|
|
47
|
+
//# sourceMappingURL=Feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Feature.js","sourceRoot":"","sources":["../../../../src/components/gherkin/Feature.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AAEzB,gDAA4C;AAC5C,4CAAiF;AACjF,6CAAyC;AACzC,yCAAqC;AACrC,+CAA2C;AAC3C,uCAAmC;AACnC,iCAA6B;AAC7B,yCAAqC;AACrC,iCAA6B;AAC7B,mCAA+B;AAE/B,MAAM,eAAe,GAAmC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE;IACtE,OAAO,CACL;QACE,8BAAC,WAAI,IAAC,IAAI,EAAE,OAAO,CAAC,IAAI,GAAI;QAC5B,8BAAC,aAAK,IAAC,MAAM,EAAC,IAAI,EAAC,EAAE,EAAE,OAAO,CAAC,IAAI;YACjC,8BAAC,iBAAO;gBAAE,O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EzB,OAAO,EAAE,oBAAoB,EAAsB,MAAM,cAAc,CAAA;AAOvE,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,iBAAiB,CAAC,oBAAoB,CAOzE,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.GherkinDocument = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const customise_1 = require("../customise");
|
|
9
|
+
const Feature_1 = require("./Feature");
|
|
10
|
+
const DefaultRenderer = ({ gherkinDocument }) => {
|
|
11
|
+
return gherkinDocument.feature ? react_1.default.createElement(Feature_1.Feature, { feature: gherkinDocument.feature }) : null;
|
|
12
|
+
};
|
|
13
|
+
const GherkinDocument = (props) => {
|
|
14
|
+
const ResolvedRenderer = (0, customise_1.useCustomRendering)('GherkinDocument', {}, DefaultRenderer);
|
|
15
|
+
return react_1.default.createElement(ResolvedRenderer, Object.assign({}, props));
|
|
16
|
+
};
|
|
17
|
+
exports.GherkinDocument = GherkinDocument;
|
|
18
|
+
//# sourceMappingURL=GherkinDocument.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GherkinDocument.js","sourceRoot":"","sources":["../../../../src/components/gherkin/GherkinDocument.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AAEzB,4CAAuE;AACvE,uCAAmC;AAEnC,MAAM,eAAe,GAAkD,CAAC,EAAE,eAAe,EAAE,EAAE,EAAE;IAC7F,OAAO,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,8BAAC,iBAAO,IAAC,OAAO,EAAE,eAAe,CAAC,OAAO,GAAI,CAAC,CAAC,CAAC,IAAI,CAAA;AACvF,CAAC,CAAA;AAEM,MAAM,eAAe,GAAkD,CAAC,KAAK,EAAE,EAAE;IACtF,MAAM,gBAAgB,GAAG,IAAA,8BAAkB,EACzC,iBAAiB,EACjB,EAAE,EACF,eAAe,CAChB,CAAA;IACD,OAAO,8BAAC,gBAAgB,oBAAK,KAAK,EAAI,CAAA;AACxC,CAAC,CAAA;AAPY,QAAA,eAAe,mBAO3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GherkinStep.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/GherkinStep.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,EAAoB,gBAAgB,EAAsB,MAAM,cAAc,CAAA;AAsFrF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAGjE,CAAA"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.GherkinStep = void 0;
|
|
7
|
+
const messages_1 = require("@cucumber/messages");
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
9
|
+
const CucumberQueryContext_1 = __importDefault(require("../../CucumberQueryContext"));
|
|
10
|
+
const GherkinQueryContext_1 = __importDefault(require("../../GherkinQueryContext"));
|
|
11
|
+
const HighLight_1 = require("../app/HighLight");
|
|
12
|
+
const customise_1 = require("../customise");
|
|
13
|
+
const Attachment_1 = require("./Attachment");
|
|
14
|
+
const DataTable_1 = require("./DataTable");
|
|
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");
|
|
21
|
+
const DefaultRenderer = ({ step, hasExamples }) => {
|
|
22
|
+
const gherkinQuery = react_1.default.useContext(GherkinQueryContext_1.default);
|
|
23
|
+
const cucumberQuery = react_1.default.useContext(CucumberQueryContext_1.default);
|
|
24
|
+
const pickleStepIds = gherkinQuery.getPickleStepIds(step.id);
|
|
25
|
+
const pickleStepTestStepResults = cucumberQuery.getPickleStepTestStepResults(pickleStepIds);
|
|
26
|
+
const testStepResult = (0, messages_1.getWorstTestStepResult)(pickleStepTestStepResults);
|
|
27
|
+
const attachments = cucumberQuery.getPickleStepAttachments(pickleStepIds);
|
|
28
|
+
const stepTextElements = [];
|
|
29
|
+
if (!hasExamples) {
|
|
30
|
+
const stepMatchArgumentsLists = pickleStepIds.length === 0
|
|
31
|
+
? // This can happen in rare cases for background steps in a document that only has step-less scenarios,
|
|
32
|
+
// because background steps are not added to the pickle when the scenario has no steps. In this case
|
|
33
|
+
// the background step will be rendered as undefined (even if there are matching step definitions). This
|
|
34
|
+
// is not ideal, but it is rare enough that we don't care about it for now.
|
|
35
|
+
[]
|
|
36
|
+
: cucumberQuery.getStepMatchArgumentsLists(pickleStepIds[0]) || [];
|
|
37
|
+
if (stepMatchArgumentsLists.length === 1) {
|
|
38
|
+
// Step is defined
|
|
39
|
+
const stepMatchArguments = stepMatchArgumentsLists[0].stepMatchArguments;
|
|
40
|
+
let offset = 0;
|
|
41
|
+
let plain;
|
|
42
|
+
stepMatchArguments.forEach((argument, index) => {
|
|
43
|
+
plain = step.text.slice(offset, argument.group.start);
|
|
44
|
+
if (plain.length > 0) {
|
|
45
|
+
stepTextElements.push(react_1.default.createElement(HighLight_1.HighLight, { key: `plain-${index}`, text: plain }));
|
|
46
|
+
}
|
|
47
|
+
const arg = argument.group.value;
|
|
48
|
+
if (arg) {
|
|
49
|
+
if (arg.length > 0) {
|
|
50
|
+
stepTextElements.push(react_1.default.createElement(Parameter_1.Parameter, { parameterTypeName: argument.parameterTypeName || 'anonymous', key: `param-${index}` },
|
|
51
|
+
react_1.default.createElement(HighLight_1.HighLight, { text: arg })));
|
|
52
|
+
}
|
|
53
|
+
offset += plain.length + arg.length;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
plain = step.text.slice(offset);
|
|
57
|
+
if (plain.length > 0) {
|
|
58
|
+
stepTextElements.push(react_1.default.createElement(HighLight_1.HighLight, { key: `plain-rest`, text: plain }));
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
else if (stepMatchArgumentsLists.length >= 2) {
|
|
62
|
+
// Step is ambiguous
|
|
63
|
+
stepTextElements.push(react_1.default.createElement(HighLight_1.HighLight, { key: `plain-ambiguous`, text: step.text }));
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
// Step is undefined
|
|
67
|
+
stepTextElements.push(react_1.default.createElement(HighLight_1.HighLight, { key: `plain-undefined`, text: step.text }));
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
// Step is from scenario with examples, and has <> placeholders.
|
|
72
|
+
stepTextElements.push(react_1.default.createElement(HighLight_1.HighLight, { key: `plain-placeholders`, text: step.text }));
|
|
73
|
+
}
|
|
74
|
+
return (react_1.default.createElement(StepItem_1.StepItem, { status: testStepResult.status },
|
|
75
|
+
react_1.default.createElement(Title_1.Title, { header: "h3", id: step.id },
|
|
76
|
+
react_1.default.createElement(Keyword_1.Keyword, null, step.keyword.trim()),
|
|
77
|
+
react_1.default.createElement("span", null, stepTextElements)),
|
|
78
|
+
step.dataTable && react_1.default.createElement(DataTable_1.DataTable, { dataTable: step.dataTable }),
|
|
79
|
+
step.docString && react_1.default.createElement(DocString_1.DocString, { docString: step.docString }),
|
|
80
|
+
!hasExamples && testStepResult.message && react_1.default.createElement(ErrorMessage_1.ErrorMessage, { message: testStepResult.message }),
|
|
81
|
+
!hasExamples &&
|
|
82
|
+
attachments.map((attachment, i) => react_1.default.createElement(Attachment_1.Attachment, { key: i, attachment: attachment }))));
|
|
83
|
+
};
|
|
84
|
+
const GherkinStep = (props) => {
|
|
85
|
+
const ResolvedRenderer = (0, customise_1.useCustomRendering)('GherkinStep', {}, DefaultRenderer);
|
|
86
|
+
return react_1.default.createElement(ResolvedRenderer, Object.assign({}, props));
|
|
87
|
+
};
|
|
88
|
+
exports.GherkinStep = GherkinStep;
|
|
89
|
+
//# sourceMappingURL=GherkinStep.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GherkinStep.js","sourceRoot":"","sources":["../../../../src/components/gherkin/GherkinStep.tsx"],"names":[],"mappings":";;;;;;AAAA,iDAA2D;AAC3D,kDAAyB;AAEzB,sFAA6D;AAC7D,oFAA2D;AAC3D,gDAA4C;AAC5C,4CAAqF;AACrF,6CAAyC;AACzC,2CAAuC;AACvC,2CAAuC;AACvC,iDAA6C;AAC7C,uCAAmC;AACnC,2CAAuC;AACvC,yCAAqC;AACrC,mCAA+B;AAE/B,MAAM,eAAe,GAAuC,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE;IACpF,MAAM,YAAY,GAAG,eAAK,CAAC,UAAU,CAAC,6BAAmB,CAAC,CAAA;IAC1D,MAAM,aAAa,GAAG,eAAK,CAAC,UAAU,CAAC,8BAAoB,CAAC,CAAA;IAE5D,MAAM,aAAa,GAAG,YAAY,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IAC5D,MAAM,yBAAyB,GAAG,aAAa,CAAC,4BAA4B,CAAC,aAAa,CAAC,CAAA;IAC3F,MAAM,cAAc,GAAG,IAAA,iCAAsB,EAAC,yBAAyB,CAAC,CAAA;IACxE,MAAM,WAAW,GAAG,aAAa,CAAC,wBAAwB,CAAC,aAAa,CAAC,CAAA;IAEzE,MAAM,gBAAgB,GAAkB,EAAE,CAAA;IAE1C,IAAI,CAAC,WAAW,EAAE;QAChB,MAAM,uBAAuB,GAC3B,aAAa,CAAC,MAAM,KAAK,CAAC;YACxB,CAAC,CAAC,sGAAsG;gBACtG,oG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AW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,CAAC,EAAE,EAAE,CAAC,8BAAC,uBAAU,IAAC,GAAG,EAAE,CAAC,EAAE,UAAU,EAAE,UAAU,GAAI,CAAC,CAC3E,CACZ,CAAA;AACH,CAAC,CAAA;AAEM,MAAM,WAAW,GAA8C,CAAC,KAAK,EAAE,EAAE;IAC9E,MAAM,gBAAgB,GAAG,IAAA,8BAAkB,EAAmB,aAAa,EAAE,EAAE,EAAE,eAAe,CAAC,CAAA;IACjG,OAAO,8BAAC,gBAAgB,oBAAK,KAAK,EAAI,CAAA;AACxC,CAAC,CAAA;AAHY,QAAA,WAAW,eAGvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HookList.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/HookList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,oBAAoB,CAAA;AAC9C,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,UAAU,MAAM;IACd,SAAS,EAAE,SAAS,QAAQ,CAAC,QAAQ,EAAE,CAAA;CACxC;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,iBAAiB,CAAC,MAAM,CAUpD,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.HookList = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const HookStep_1 = require("./HookStep");
|
|
9
|
+
const HookList = ({ 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.HookList = HookList;
|
|
14
|
+
//# sourceMappingURL=HookList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HookList.js","sourceRoot":"","sources":["../../../../src/components/gherkin/HookList.tsx"],"names":[],"mappings":";;;;;;AACA,kDAAyB;AAEzB,yCAAqC;AAM9B,MAAM,QAAQ,GAAoC,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE;IACzE,OAAO,CACL,8DACG,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAC9B,sCAAI,GAAG,EAAE,KAAK;QACZ,8BAAC,mBAAQ,IAAC,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,GAAI,CACjC,CACN,CAAC,CACD,CACJ,CAAA;AACH,CAAC,CAAA;AAVY,QAAA,QAAQ,YAUpB"}
|
|
@@ -0,0 +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,cAAc,CAAA;AAgDhE,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,iBAAiB,CAAC,aAAa,CAG3D,CAAA"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
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");
|
|
39
|
+
const DefaultRenderer = ({ step }) => {
|
|
40
|
+
if (!step.hookId)
|
|
41
|
+
throw new Error('Expected step to have a hookId');
|
|
42
|
+
const cucumberQuery = react_1.default.useContext(CucumberQueryContext_1.default);
|
|
43
|
+
const stepResult = (0, messages_1.getWorstTestStepResult)(cucumberQuery.getTestStepResults(step.id));
|
|
44
|
+
const hook = cucumberQuery.getHook(step.hookId);
|
|
45
|
+
const attachments = cucumberQuery.getTestStepsAttachments([step.id]);
|
|
46
|
+
if (stepResult.status === messages.TestStepResultStatus.FAILED) {
|
|
47
|
+
let location = 'Unknown location';
|
|
48
|
+
if (hook === null || hook === void 0 ? void 0 : hook.sourceReference.location) {
|
|
49
|
+
location = `${hook.sourceReference.uri}:${hook.sourceReference.location.line}`;
|
|
50
|
+
}
|
|
51
|
+
else if (hook === null || hook === void 0 ? void 0 : hook.sourceReference.javaMethod) {
|
|
52
|
+
location = `${hook.sourceReference.javaMethod.className}.${hook.sourceReference.javaMethod.methodName}`;
|
|
53
|
+
}
|
|
54
|
+
return (react_1.default.createElement(StepItem_1.StepItem, { status: stepResult.status },
|
|
55
|
+
react_1.default.createElement(Title_1.Title, { header: "h3", id: step.id },
|
|
56
|
+
(hook === null || hook === void 0 ? void 0 : hook.name) ? `Hook "${hook.name}"` : 'Hook',
|
|
57
|
+
" failed: ",
|
|
58
|
+
location),
|
|
59
|
+
stepResult.message && react_1.default.createElement(ErrorMessage_1.ErrorMessage, { message: stepResult.message }),
|
|
60
|
+
attachments.map((attachment, i) => (react_1.default.createElement(Attachment_1.Attachment, { key: i, attachment: attachment })))));
|
|
61
|
+
}
|
|
62
|
+
if (attachments) {
|
|
63
|
+
return (react_1.default.createElement(StepItem_1.StepItem, null, attachments.map((attachment, i) => (react_1.default.createElement(Attachment_1.Attachment, { key: i, attachment: attachment })))));
|
|
64
|
+
}
|
|
65
|
+
return null;
|
|
66
|
+
};
|
|
67
|
+
const HookStep = (props) => {
|
|
68
|
+
const ResolvedRenderer = (0, customise_1.useCustomRendering)('HookStep', {}, DefaultRenderer);
|
|
69
|
+
return react_1.default.createElement(ResolvedRenderer, Object.assign({}, props));
|
|
70
|
+
};
|
|
71
|
+
exports.HookStep = HookStep;
|
|
72
|
+
//# sourceMappingURL=HookStep.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HookStep.js","sourceRoot":"","sources":["../../../../src/components/gherkin/HookStep.tsx"],"names":[],"mappings":";;;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,KAAK,CAAC,iBAO3B,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
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"));
|
|
10
|
+
const DefaultRenderer = ({ children, styles, }) => {
|
|
11
|
+
return react_1.default.createElement("span", { className: styles.keyword }, children);
|
|
12
|
+
};
|
|
13
|
+
const Keyword = ({ children }) => {
|
|
14
|
+
const ResolvedRenderer = (0, customise_1.useCustomRendering)('Keyword', Keyword_module_scss_1.default, DefaultRenderer);
|
|
15
|
+
return react_1.default.createElement(ResolvedRenderer, null, children);
|
|
16
|
+
};
|
|
17
|
+
exports.Keyword = Keyword;
|
|
18
|
+
//# sourceMappingURL=Keyword.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Keyword.js","sourceRoot":"","sources":["../../../../src/components/gherkin/Keyword.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AAEzB,4CAAmF;AACnF,gFAAiD;AAEjD,MAAM,eAAe,GAA4D,CAAC,EAChF,QAAQ,EACR,MAAM,GACP,EAAE,EAAE;IACH,OAAO,wCAAM,SAAS,EAAE,MAAM,CAAC,OAAO,IAAG,QAAQ,CAAQ,CAAA;AAC3D,CAAC,CAAA;AAEM,MAAM,OAAO,GAA4B,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC/D,MAAM,gBAAgB,GAAG,IAAA,8BAAkB,EACzC,SAAS,EACT,6BAAa,EACb,eAAe,CAChB,CAAA;IACD,OAAO,8BAAC,gBAAgB,QAAE,QAAQ,CAAoB,CAAA;AACxD,CAAC,CAAA;AAPY,QAAA,OAAO,WAOnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MDG.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/MDG.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAezB,UAAU,MAAM;IACd,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,eAAO,MAAM,GAAG,EAAE,KAAK,CAAC,iBAAiB,CAAC,MAAM,CAgF/C,CAAA"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.MDG = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const react_markdown_1 = __importDefault(require("react-markdown"));
|
|
9
|
+
const GherkinQueryContext_1 = __importDefault(require("../../GherkinQueryContext"));
|
|
10
|
+
const HighLight_1 = require("../app/HighLight");
|
|
11
|
+
const rehypePlugins_1 = __importDefault(require("../app/rehypePlugins"));
|
|
12
|
+
const DataTable_module_scss_1 = __importDefault(require("./DataTable.module.scss"));
|
|
13
|
+
const ExamplesTable_1 = require("./ExamplesTable");
|
|
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);
|
|
20
|
+
let hasExamples = false;
|
|
21
|
+
let examples = undefined;
|
|
22
|
+
function header(line, level, children) {
|
|
23
|
+
const scenario = gherkinQuery.getScenario(uri, line);
|
|
24
|
+
hasExamples = !!scenario && scenario.examples.length > 0;
|
|
25
|
+
examples = gherkinQuery.getExamples(uri, line);
|
|
26
|
+
const titleAstNode = scenario ||
|
|
27
|
+
gherkinQuery.getBackground(uri, line) ||
|
|
28
|
+
gherkinQuery.getRule(uri, line) ||
|
|
29
|
+
examples;
|
|
30
|
+
if (titleAstNode) {
|
|
31
|
+
const header = `h${level}`;
|
|
32
|
+
return (react_1.default.createElement(Title_1.Title, { header: header, id: titleAstNode.id },
|
|
33
|
+
react_1.default.createElement(Keyword_1.Keyword, null,
|
|
34
|
+
titleAstNode.keyword,
|
|
35
|
+
":"),
|
|
36
|
+
react_1.default.createElement(HighLight_1.HighLight, { text: titleAstNode.name })));
|
|
37
|
+
}
|
|
38
|
+
return react_1.default.createElement("h3", null, children);
|
|
39
|
+
}
|
|
40
|
+
return (react_1.default.createElement(react_markdown_1.default, { rehypePlugins: rehypePlugins_1.default, components: {
|
|
41
|
+
h1({ node, level, children }) {
|
|
42
|
+
return header(line(node), level, children);
|
|
43
|
+
},
|
|
44
|
+
h2({ node, level, children }) {
|
|
45
|
+
return header(line(node), level, children);
|
|
46
|
+
},
|
|
47
|
+
h3({ node, level, children }) {
|
|
48
|
+
return header(line(node), level, children);
|
|
49
|
+
},
|
|
50
|
+
h4({ node, level, children }) {
|
|
51
|
+
return header(line(node), level, children);
|
|
52
|
+
},
|
|
53
|
+
h5({ node, level, children }) {
|
|
54
|
+
return header(line(node), level, children);
|
|
55
|
+
},
|
|
56
|
+
table({ node, children }) {
|
|
57
|
+
if (examples && examples.tableHeader && line(node) >= 3) {
|
|
58
|
+
return (react_1.default.createElement(ExamplesTable_1.ExamplesTable, { tableHeader: examples.tableHeader, tableBody: examples.tableBody }));
|
|
59
|
+
}
|
|
60
|
+
return react_1.default.createElement("table", { className: DataTable_module_scss_1.default.table }, children);
|
|
61
|
+
},
|
|
62
|
+
ul({ node, children }) {
|
|
63
|
+
const step = gherkinQuery.getStep(uri, line(node));
|
|
64
|
+
if (!step) {
|
|
65
|
+
// Non-Gherkin list
|
|
66
|
+
return react_1.default.createElement("ul", null, children);
|
|
67
|
+
}
|
|
68
|
+
return react_1.default.createElement("ul", { className: MDG_module_scss_1.default.steps }, children);
|
|
69
|
+
},
|
|
70
|
+
li({ node, children }) {
|
|
71
|
+
const step = gherkinQuery.getStep(uri, line(node));
|
|
72
|
+
if (!step) {
|
|
73
|
+
// Non-Gherkin list item
|
|
74
|
+
return react_1.default.createElement("li", null, children);
|
|
75
|
+
}
|
|
76
|
+
return (react_1.default.createElement("li", null,
|
|
77
|
+
react_1.default.createElement(GherkinStep_1.GherkinStep, { step: step, hasExamples: hasExamples })));
|
|
78
|
+
},
|
|
79
|
+
} }, children));
|
|
80
|
+
};
|
|
81
|
+
exports.MDG = MDG;
|
|
82
|
+
function line(node) {
|
|
83
|
+
if (node.position === undefined)
|
|
84
|
+
throw new Error(`undefined position in ${JSON.stringify(node)}`);
|
|
85
|
+
return node.position.start.line;
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=MDG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MDG.js","sourceRoot":"","sources":["../../../../src/components/gherkin/MDG.tsx"],"names":[],"mappings":";;;;;;AACA,kDAAyB;AACzB,oEAA0C;AAG1C,oFAA2D;AAC3D,gDAA4C;AAC5C,yEAAgD;AAEhD,oFAAqD;AACrD,mDAA+C;AAC/C,+CAA2C;AAC3C,uCAAmC;AACnC,wEAAsC;AACtC,mCAA+B;AAOxB,MAAM,GAAG,GAAoC,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE;IACxE,MAAM,YAAY,GAAG,eAAK,CAAC,UAAU,CAAC,6BAAmB,CAAC,CAAA;IAE1D,IAAI,WAAW,GAAG,KAAK,CAAA;IACvB,IAAI,QAAQ,GAAkC,SAAS,CAAA;IAEvD,SAAS,MAAM,CAAC,IAAY,EAAE,KAAa,EAAE,QAAgB;QAC3D,MAAM,QAA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,CAAC,IAAI,EAAE;oBACT,wBAAwB;oBACxB,OAAO,0CAAK,QAAQ,CAAM,CAAA;iBAC3B;gBACD,OAAO,CACL;oBACE,8BAAC,yBAAW,IAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,GAAI,CAClD,CACN,CAAA;YACH,CAAC;SACF,IAEA,QAAQ,CACK,CACjB,CAAA;AACH,CAAC,CAAA;AAhFY,QAAA,GAAG,OAgFf;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"}
|
|
@@ -0,0 +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,cAAc,CAAA;AAerB,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAO7D,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
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"));
|
|
10
|
+
const DefaultRenderer = ({ parameterTypeName, children, styles, }) => {
|
|
11
|
+
return (react_1.default.createElement("span", { title: parameterTypeName, className: styles.parameter }, children));
|
|
12
|
+
};
|
|
13
|
+
const Parameter = (props) => {
|
|
14
|
+
const ResolvedRenderer = (0, customise_1.useCustomRendering)('Parameter', Parameter_module_scss_1.default, DefaultRenderer);
|
|
15
|
+
return react_1.default.createElement(ResolvedRenderer, Object.assign({}, props));
|
|
16
|
+
};
|
|
17
|
+
exports.Parameter = Parameter;
|
|
18
|
+
//# sourceMappingURL=Parameter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Parameter.js","sourceRoot":"","sources":["../../../../src/components/gherkin/Parameter.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AAEzB,4CAKqB;AACrB,oFAAmD;AAEnD,MAAM,eAAe,GAAuD,CAAC,EAC3E,iBAAiB,EACjB,QAAQ,EACR,MAAM,GACP,EAAE,EAAE;IACH,OAAO,CACL,wCAAM,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,IACxD,QAAQ,CACJ,CACR,CAAA;AACH,CAAC,CAAA;AAEM,MAAM,SAAS,GAA4C,CAAC,KAAK,EAAE,EAAE;IAC1E,MAAM,gBAAgB,GAAG,IAAA,8BAAkB,EACzC,WAAW,EACX,+BAAa,EACb,eAAe,CAChB,CAAA;IACD,OAAO,8BAAC,gBAAgB,oBAAK,KAAK,EAAI,CAAA;AACxC,CAAC,CAAA;AAPY,QAAA,SAAS,aAOrB"}
|
|
@@ -0,0 +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,cAAc,CAAA;AAiC9E,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,iBAAiB,CAAC,SAAS,CAGnD,CAAA"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Rule = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const HighLight_1 = require("../app/HighLight");
|
|
9
|
+
const customise_1 = require("../customise");
|
|
10
|
+
const Background_1 = require("./Background");
|
|
11
|
+
const Children_1 = require("./Children");
|
|
12
|
+
const Description_1 = require("./Description");
|
|
13
|
+
const Keyword_1 = require("./Keyword");
|
|
14
|
+
const Scenario_1 = require("./Scenario");
|
|
15
|
+
const Tags_1 = require("./Tags");
|
|
16
|
+
const Title_1 = require("./Title");
|
|
17
|
+
const DefaultRenderer = ({ rule }) => {
|
|
18
|
+
return (react_1.default.createElement("section", null,
|
|
19
|
+
react_1.default.createElement(Tags_1.Tags, { tags: rule.tags }),
|
|
20
|
+
react_1.default.createElement(Title_1.Title, { header: "h2", id: rule.id },
|
|
21
|
+
react_1.default.createElement(Keyword_1.Keyword, null,
|
|
22
|
+
rule.keyword,
|
|
23
|
+
":"),
|
|
24
|
+
react_1.default.createElement(HighLight_1.HighLight, { text: rule.name })),
|
|
25
|
+
react_1.default.createElement(Description_1.Description, { description: rule.description }),
|
|
26
|
+
react_1.default.createElement(Children_1.Children, null, (rule.children || []).map((child, index) => {
|
|
27
|
+
if (child.background) {
|
|
28
|
+
return react_1.default.createElement(Background_1.Background, { key: index, background: child.background });
|
|
29
|
+
}
|
|
30
|
+
else if (child.scenario) {
|
|
31
|
+
return react_1.default.createElement(Scenario_1.Scenario, { key: index, scenario: child.scenario });
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
throw new Error('Expected background or scenario');
|
|
35
|
+
}
|
|
36
|
+
}))));
|
|
37
|
+
};
|
|
38
|
+
const Rule = (props) => {
|
|
39
|
+
const ResolvedRenderer = (0, customise_1.useCustomRendering)('Rule', {}, DefaultRenderer);
|
|
40
|
+
return react_1.default.createElement(ResolvedRenderer, Object.assign({}, props));
|
|
41
|
+
};
|
|
42
|
+
exports.Rule = Rule;
|
|
43
|
+
//# sourceMappingURL=Rule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Rule.js","sourceRoot":"","sources":["../../../../src/components/gherkin/Rule.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AAEzB,gDAA4C;AAC5C,4CAA8E;AAC9E,6CAAyC;AACzC,yCAAqC;AACrC,+CAA2C;AAC3C,uCAAmC;AACnC,yCAAqC;AACrC,iCAA6B;AAC7B,mCAA+B;AAE/B,MAAM,eAAe,GAAgC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IAChE,OAAO,CACL;QACE,8BAAC,WAAI,IAAC,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI;QACzB,8BAAC,aAAK,IAAC,MAAM,EAAC,IAAI,EAAC,EAAE,EAAE,IAAI,CAAC,EAAE;YAC5B,8BAAC,iBAAO;gBAAE,IAAI,CAAC,OAAO;oBAAY;YAClC,8BAAC,qBAAS,IAAC,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI,CACxB;QACR,8BAAC,yBAAW,IAAC,WAAW,EAAE,IAAI,CAAC,WAAW,GAAI;QAC9C,8BAAC,mBAAQ,QACN,CAAC,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;YAC1C,IAAI,KAAK,CAAC,UAAU,EAAE;gBACpB,OAAO,8BAAC,uBAAU,IAAC,GAAG,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU,GAAI,CAAA;aAChE;iBAAM,IAAI,KAAK,CAAC,QAAQ,EAAE;gBACzB,OAAO,8BAAC,mBAAQ,IAAC,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,GAAI,CAAA;aAC1D;iBAAM;gBACL,MAAM,IAAI,K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