@cucumber/react-components 21.1.1 → 22.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/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.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 +1 -1
- package/dist/src/components/gherkin/ErrorMessage.d.ts.map +1 -1
- package/dist/src/components/gherkin/ErrorMessage.js +7 -14
- 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/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 +26 -17
- 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,20 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const CICommitLink_1 = require("./CICommitLink");
|
|
13
|
-
const CIJobLink_1 = require("./CIJobLink");
|
|
14
|
-
const ExecutionSummary_module_scss_1 = __importDefault(require("./ExecutionSummary.module.scss"));
|
|
15
|
-
const CucumberLogo_1 = require("./icons/CucumberLogo");
|
|
16
|
-
const OSIcon_1 = require("./OSIcon");
|
|
17
|
-
const RuntimeIcon_1 = require("./RuntimeIcon");
|
|
1
|
+
import { TestStepResultStatus, TimeConversion, } from '@cucumber/messages';
|
|
2
|
+
import { faCodeBranch, faTag } from '@fortawesome/free-solid-svg-icons';
|
|
3
|
+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
4
|
+
import { formatDistanceStrict, formatDuration, intervalToDuration } from 'date-fns';
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { CICommitLink } from './CICommitLink.js';
|
|
7
|
+
import { CIJobLink } from './CIJobLink.js';
|
|
8
|
+
import styles from './ExecutionSummary.module.scss';
|
|
9
|
+
import { CucumberLogo } from './icons/CucumberLogo.js';
|
|
10
|
+
import { OSIcon } from './OSIcon.js';
|
|
11
|
+
import { RuntimeIcon } from './RuntimeIcon.js';
|
|
18
12
|
function formatDurationNicely(startDate, finishDate) {
|
|
19
13
|
const inMilllis = finishDate.getTime() - startDate.getTime();
|
|
20
14
|
// if under 10s, use 0.01s precision, otherwise 1s is fine
|
|
@@ -23,63 +17,62 @@ function formatDurationNicely(startDate, finishDate) {
|
|
|
23
17
|
maximumFractionDigits: 2,
|
|
24
18
|
}).format(inMilllis / 1000)} seconds`;
|
|
25
19
|
}
|
|
26
|
-
return
|
|
20
|
+
return formatDuration(intervalToDuration({ start: startDate, end: finishDate }), {});
|
|
27
21
|
}
|
|
28
|
-
const ExecutionSummary = ({ scenarioCountByStatus, totalScenarioCount, testRunStarted, testRunFinished, referenceDate, meta, }) => {
|
|
22
|
+
export const ExecutionSummary = ({ scenarioCountByStatus, totalScenarioCount, testRunStarted, testRunFinished, referenceDate, meta, }) => {
|
|
29
23
|
const percentagePassed = new Intl.NumberFormat(undefined, {
|
|
30
24
|
style: 'percent',
|
|
31
|
-
}).format(scenarioCountByStatus[
|
|
32
|
-
const startDate =
|
|
33
|
-
? new Date(
|
|
25
|
+
}).format(scenarioCountByStatus[TestStepResultStatus.PASSED] / totalScenarioCount) + ' passed';
|
|
26
|
+
const startDate = testRunStarted?.timestamp
|
|
27
|
+
? new Date(TimeConversion.timestampToMillisecondsSinceEpoch(testRunStarted.timestamp))
|
|
34
28
|
: undefined;
|
|
35
|
-
const finishDate =
|
|
36
|
-
? new Date(
|
|
29
|
+
const finishDate = testRunFinished?.timestamp
|
|
30
|
+
? new Date(TimeConversion.timestampToMillisecondsSinceEpoch(testRunFinished.timestamp))
|
|
37
31
|
: undefined;
|
|
38
32
|
const formattedTimestamp = startDate
|
|
39
|
-
?
|
|
33
|
+
? formatDistanceStrict(startDate, referenceDate ?? new Date(), {
|
|
40
34
|
addSuffix: true,
|
|
41
35
|
})
|
|
42
36
|
: 'Unknown start time';
|
|
43
37
|
const formattedDuration = startDate && finishDate ? formatDurationNicely(startDate, finishDate) : 'Unknown duration';
|
|
44
|
-
return (
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
38
|
+
return (React.createElement("div", { className: styles.backdrop },
|
|
39
|
+
React.createElement("dl", { className: styles.list },
|
|
40
|
+
React.createElement("div", { className: styles.item },
|
|
41
|
+
React.createElement("dt", { className: styles.suffix },
|
|
48
42
|
totalScenarioCount,
|
|
49
43
|
" executed"),
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
meta.ci.git.branch && (
|
|
60
|
-
|
|
44
|
+
React.createElement("dd", { className: styles.value }, percentagePassed)),
|
|
45
|
+
React.createElement("div", { className: styles.item },
|
|
46
|
+
React.createElement("dt", { className: styles.suffix }, "last run"),
|
|
47
|
+
React.createElement("dd", { className: styles.value }, formattedTimestamp)),
|
|
48
|
+
React.createElement("div", { className: styles.item },
|
|
49
|
+
React.createElement("dt", { className: styles.suffix }, "duration"),
|
|
50
|
+
React.createElement("dd", { className: styles.value }, formattedDuration)),
|
|
51
|
+
meta?.ci && (React.createElement("div", { className: `${styles.item} ${styles.itemCi}` },
|
|
52
|
+
React.createElement("dt", { className: styles.suffix }, meta.ci.git ? (React.createElement(React.Fragment, null,
|
|
53
|
+
meta.ci.git.branch && (React.createElement("span", { className: styles.gitItem },
|
|
54
|
+
React.createElement(FontAwesomeIcon, { icon: faCodeBranch }),
|
|
61
55
|
meta.ci.git.branch)),
|
|
62
|
-
meta.ci.git.tag && (
|
|
63
|
-
|
|
56
|
+
meta.ci.git.tag && (React.createElement("span", { className: styles.gitItem },
|
|
57
|
+
React.createElement(FontAwesomeIcon, { icon: faTag }),
|
|
64
58
|
meta.ci.git.tag)),
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
meta && (
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
59
|
+
React.createElement("span", { className: styles.gitItem },
|
|
60
|
+
React.createElement(CICommitLink, { ci: meta.ci })),
|
|
61
|
+
React.createElement("span", { className: styles.gitItem },
|
|
62
|
+
React.createElement(CIJobLink, { ci: meta.ci })))) : ('-')),
|
|
63
|
+
React.createElement("dd", { className: styles.value }, meta.ci.name))),
|
|
64
|
+
meta && (React.createElement(React.Fragment, null,
|
|
65
|
+
React.createElement("div", { className: styles.item },
|
|
66
|
+
React.createElement("dt", { className: styles.suffix }, meta.os.name),
|
|
67
|
+
React.createElement("dd", { className: styles.value },
|
|
68
|
+
React.createElement(OSIcon, { name: meta.os.name }))),
|
|
69
|
+
React.createElement("div", { className: styles.item },
|
|
70
|
+
React.createElement("dt", { className: styles.suffix }, meta.runtime.name + ' ' + meta.runtime.version),
|
|
71
|
+
React.createElement("dd", { className: styles.value },
|
|
72
|
+
React.createElement(RuntimeIcon, { name: meta.runtime.name }))),
|
|
73
|
+
React.createElement("div", { className: styles.item },
|
|
74
|
+
React.createElement("dt", { className: styles.suffix }, `${meta.implementation.name} ${meta.implementation.version}`),
|
|
75
|
+
React.createElement("dd", { className: styles.value },
|
|
76
|
+
React.createElement(CucumberLogo, null))))))));
|
|
83
77
|
};
|
|
84
|
-
exports.ExecutionSummary = ExecutionSummary;
|
|
85
78
|
//# sourceMappingURL=ExecutionSummary.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExecutionSummary.js","sourceRoot":"","sources":["../../../../src/components/app/ExecutionSummary.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExecutionSummary.js","sourceRoot":"","sources":["../../../../src/components/app/ExecutionSummary.tsx"],"names":[],"mappings":"AACA,OAAO,EAGL,oBAAoB,EACpB,cAAc,GACf,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAA;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AACnF,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,MAAM,MAAM,gCAAgC,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,SAAS,oBAAoB,CAAC,SAAe,EAAE,UAAgB;IAC7D,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,EAAE,GAAG,SAAS,CAAC,OAAO,EAAE,CAAA;IAC5D,0DAA0D;IAC1D,IAAI,SAAS,GAAG,KAAK,EAAE;QACrB,OAAO,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,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ACL,CACJ,CACE,CACD,CACP,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilteredResults.d.ts","sourceRoot":"","sources":["../../../../src/components/app/FilteredResults.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FilteredResults.d.ts","sourceRoot":"","sources":["../../../../src/components/app/FilteredResults.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAYzB,UAAU,MAAM;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,iBAAiB,CAAC,MAAM,CAwC3D,CAAA"}
|
|
@@ -1,41 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useQueries, useSearch } from '../../hooks/index.js';
|
|
3
|
+
import { useFilteredDocuments } from '../../hooks/useFilteredDocuments.js';
|
|
4
|
+
import { useResultStatistics } from '../../hooks/useResultStatistics.js';
|
|
5
|
+
import { ExecutionSummary } from './ExecutionSummary.js';
|
|
6
|
+
import styles from './FilteredResults.module.scss';
|
|
7
|
+
import { GherkinDocumentList } from './GherkinDocumentList.js';
|
|
8
|
+
import { NoMatchResult } from './NoMatchResult.js';
|
|
9
|
+
import { SearchBar } from './SearchBar.js';
|
|
10
|
+
import { StatusesSummary } from './StatusesSummary.js';
|
|
11
|
+
export const FilteredResults = ({ className }) => {
|
|
12
|
+
const { envelopesQuery } = useQueries();
|
|
13
|
+
const { scenarioCountByStatus, statusesWithScenarios, totalScenarioCount } = useResultStatistics();
|
|
14
|
+
const { query, hideStatuses, update } = useSearch();
|
|
15
|
+
const filtered = useFilteredDocuments(query, hideStatuses);
|
|
16
|
+
return (React.createElement("div", { className: className },
|
|
17
|
+
React.createElement("div", { className: styles.reportHeader },
|
|
18
|
+
React.createElement(StatusesSummary, { scenarioCountByStatus: scenarioCountByStatus, totalScenarioCount: totalScenarioCount }),
|
|
19
|
+
React.createElement(ExecutionSummary, { scenarioCountByStatus: scenarioCountByStatus, totalScenarioCount: totalScenarioCount, testRunStarted: envelopesQuery.getTestRunStarted(), testRunFinished: envelopesQuery.getTestRunFinished(), meta: envelopesQuery.getMeta() }),
|
|
20
|
+
React.createElement(SearchBar, { query: query, onSearch: (newValue) => update({ query: newValue }), statusesWithScenarios: statusesWithScenarios, hideStatuses: hideStatuses, onFilter: (newValue) => update({ hideStatuses: newValue }) })),
|
|
21
|
+
filtered !== undefined && (React.createElement(React.Fragment, null, filtered.length > 0 ? (React.createElement(GherkinDocumentList, { gherkinDocuments: filtered, preExpand: true })) : (React.createElement(NoMatchResult, { query: query }))))));
|
|
4
22
|
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.FilteredResults = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const countScenariosByStatuses_1 = __importDefault(require("../../countScenariosByStatuses"));
|
|
9
|
-
const filterByStatus_1 = __importDefault(require("../../filter/filterByStatus"));
|
|
10
|
-
const hooks_1 = require("../../hooks");
|
|
11
|
-
const Search_1 = __importDefault(require("../../search/Search"));
|
|
12
|
-
const ExecutionSummary_1 = require("./ExecutionSummary");
|
|
13
|
-
const FilteredResults_module_scss_1 = __importDefault(require("./FilteredResults.module.scss"));
|
|
14
|
-
const GherkinDocumentList_1 = require("./GherkinDocumentList");
|
|
15
|
-
const NoMatchResult_1 = require("./NoMatchResult");
|
|
16
|
-
const SearchBar_1 = require("./SearchBar");
|
|
17
|
-
const StatusesSummary_1 = require("./StatusesSummary");
|
|
18
|
-
const FilteredResults = ({ className }) => {
|
|
19
|
-
const { cucumberQuery, gherkinQuery, envelopesQuery } = (0, hooks_1.useQueries)();
|
|
20
|
-
const { query, hideStatuses, update } = (0, hooks_1.useSearch)();
|
|
21
|
-
const allDocuments = gherkinQuery.getGherkinDocuments();
|
|
22
|
-
const { scenarioCountByStatus, statusesWithScenarios, totalScenarioCount } = (0, countScenariosByStatuses_1.default)(gherkinQuery, cucumberQuery, envelopesQuery);
|
|
23
|
-
const search = new Search_1.default(gherkinQuery);
|
|
24
|
-
for (const gherkinDocument of allDocuments) {
|
|
25
|
-
search.add(gherkinDocument);
|
|
26
|
-
}
|
|
27
|
-
const onlyShowStatuses = statusesWithScenarios.filter((s) => !hideStatuses.includes(s));
|
|
28
|
-
const matches = query ? search.search(query) : allDocuments;
|
|
29
|
-
const filtered = matches
|
|
30
|
-
.map((document) => (0, filterByStatus_1.default)(document, gherkinQuery, cucumberQuery, onlyShowStatuses))
|
|
31
|
-
.filter((document) => document !== null);
|
|
32
|
-
return (react_1.default.createElement("div", { className: className },
|
|
33
|
-
react_1.default.createElement("div", { className: FilteredResults_module_scss_1.default.reportHeader },
|
|
34
|
-
react_1.default.createElement(StatusesSummary_1.StatusesSummary, { scenarioCountByStatus: scenarioCountByStatus, totalScenarioCount: totalScenarioCount }),
|
|
35
|
-
react_1.default.createElement(ExecutionSummary_1.ExecutionSummary, { scenarioCountByStatus: scenarioCountByStatus, totalScenarioCount: totalScenarioCount, testRunStarted: envelopesQuery.getTestRunStarted(), testRunFinished: envelopesQuery.getTestRunFinished(), meta: envelopesQuery.getMeta() }),
|
|
36
|
-
react_1.default.createElement(SearchBar_1.SearchBar, { query: query, onSearch: (query) => update({ query }), statusesWithScenarios: statusesWithScenarios, hideStatuses: hideStatuses, onFilter: (hideStatuses) => update({ hideStatuses }) })),
|
|
37
|
-
filtered.length > 0 && react_1.default.createElement(GherkinDocumentList_1.GherkinDocumentList, { gherkinDocuments: filtered, preExpand: true }),
|
|
38
|
-
filtered.length < 1 && react_1.default.createElement(NoMatchResult_1.NoMatchResult, { query: query })));
|
|
39
|
-
};
|
|
40
|
-
exports.FilteredResults = FilteredResults;
|
|
41
23
|
//# sourceMappingURL=FilteredResults.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilteredResults.js","sourceRoot":"","sources":["../../../../src/components/app/FilteredResults.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FilteredResults.js","sourceRoot":"","sources":["../../../../src/components/app/FilteredResults.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAA;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAA;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,MAAM,MAAM,+BAA+B,CAAA;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAMtD,MAAM,CAAC,MAAM,eAAe,GAAoC,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE;IAChF,MAAM,EAAE,cAAc,EAAE,GAAG,UAAU,EAAE,CAAA;IACvC,MAAM,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,GAAG,mBAAmB,EAAE,CAAA;IAClG,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,CAAA;IACnD,MAAM,QAAQ,GAAG,oBAAoB,CAAC,KAAK,EAAE,YAAY,CAAC,CAAA;IAE1D,OAAO,CACL,6BAAK,SAAS,EAAE,SAAS;QACvB,6BAAK,SAAS,EAAE,MAAM,CAAC,YAAY;YACjC,oBAAC,eAAe,IACd,qBAAqB,EAAE,qBAAqB,EAC5C,kBAAkB,EAAE,kBAAkB,GACtC;YACF,oBAAC,gBAAgB,IACf,qBAAqB,EAAE,qBAAqB,EAC5C,kBAAkB,EAAE,kBAAkB,EACtC,cAAc,EAAE,cAAc,CAAC,iBAAiB,EAAE,EAClD,eAAe,EAAE,cAAc,CAAC,kBAAkB,EAAE,EACpD,IAAI,EAAE,cAAc,CAAC,OAAO,EAAE,GAC9B;YACF,oBAAC,SAAS,IACR,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,EACnD,qBAAqB,EAAE,qBAAqB,EAC5C,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC,GAC1D,CACE;QAEL,QAAQ,KAAK,SAAS,IAAI,CACzB,0CACG,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CACrB,oBAAC,mBAAmB,IAAC,gBAAgB,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,GAAI,CACrE,CAAC,CAAC,CAAC,CACF,oBAAC,aAAa,IAAC,KAAK,EAAE,KAAK,GAAI,CAChC,CACA,CACJ,CACG,CACP,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,59 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
})
|
|
13
|
-
|
|
14
|
-
|
|
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.GherkinDocumentList = void 0;
|
|
30
|
-
const messages = __importStar(require("@cucumber/messages"));
|
|
31
|
-
const messages_1 = require("@cucumber/messages");
|
|
32
|
-
const free_solid_svg_icons_1 = require("@fortawesome/free-solid-svg-icons");
|
|
33
|
-
const react_fontawesome_1 = require("@fortawesome/react-fontawesome");
|
|
34
|
-
const react_1 = __importStar(require("react"));
|
|
35
|
-
const react_accessible_accordion_1 = require("react-accessible-accordion");
|
|
36
|
-
const CucumberQueryContext_1 = __importDefault(require("../../CucumberQueryContext"));
|
|
37
|
-
const GherkinQueryContext_1 = __importDefault(require("../../GherkinQueryContext"));
|
|
38
|
-
const UriContext_1 = __importDefault(require("../../UriContext"));
|
|
39
|
-
const gherkin_1 = require("../gherkin");
|
|
40
|
-
const GherkinDocumentList_module_scss_1 = __importDefault(require("./GherkinDocumentList.module.scss"));
|
|
41
|
-
const GherkinDocumentList = ({ gherkinDocuments, preExpand }) => {
|
|
42
|
-
const gherkinQuery = (0, react_1.useContext)(GherkinQueryContext_1.default);
|
|
43
|
-
const cucumberQuery = (0, react_1.useContext)(CucumberQueryContext_1.default);
|
|
1
|
+
import * as messages from '@cucumber/messages';
|
|
2
|
+
import { getWorstTestStepResult } from '@cucumber/messages';
|
|
3
|
+
import { faChevronRight } from '@fortawesome/free-solid-svg-icons';
|
|
4
|
+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
5
|
+
import React, { useContext, useMemo, useState } from 'react';
|
|
6
|
+
import { Accordion, AccordionItem, AccordionItemButton, AccordionItemHeading, AccordionItemPanel, } from 'react-accessible-accordion';
|
|
7
|
+
import CucumberQueryContext from '../../CucumberQueryContext.js';
|
|
8
|
+
import GherkinQueryContext from '../../GherkinQueryContext.js';
|
|
9
|
+
import UriContext from '../../UriContext.js';
|
|
10
|
+
import { GherkinDocument, MDG, StatusIcon } from '../gherkin/index.js';
|
|
11
|
+
import styles from './GherkinDocumentList.module.scss';
|
|
12
|
+
export const GherkinDocumentList = ({ gherkinDocuments, preExpand }) => {
|
|
13
|
+
const gherkinQuery = useContext(GherkinQueryContext);
|
|
14
|
+
const cucumberQuery = useContext(CucumberQueryContext);
|
|
44
15
|
const gherkinDocs = gherkinDocuments || gherkinQuery.getGherkinDocuments();
|
|
45
|
-
const gherkinDocumentStatusByUri =
|
|
16
|
+
const gherkinDocumentStatusByUri = useMemo(() => {
|
|
46
17
|
const entries = gherkinDocs.map((gherkinDocument) => {
|
|
47
18
|
if (!gherkinDocument.uri)
|
|
48
19
|
throw new Error('No url for gherkinDocument');
|
|
49
20
|
const gherkinDocumentStatus = gherkinDocument.feature
|
|
50
|
-
?
|
|
21
|
+
? getWorstTestStepResult(cucumberQuery.getPickleTestStepResults(gherkinQuery.getPickleIds(gherkinDocument.uri))).status
|
|
51
22
|
: messages.TestStepResultStatus.UNDEFINED;
|
|
52
23
|
return [gherkinDocument.uri, gherkinDocumentStatus];
|
|
53
24
|
});
|
|
54
25
|
return new Map(entries);
|
|
55
26
|
}, [gherkinDocs, gherkinQuery, cucumberQuery]);
|
|
56
|
-
const [expanded, setExpanded] =
|
|
27
|
+
const [expanded, setExpanded] = useState(() => {
|
|
57
28
|
// Pre-expand any document that is *not* passed - assuming this is what people want to look at first
|
|
58
29
|
return preExpand
|
|
59
30
|
? gherkinDocs
|
|
@@ -62,7 +33,7 @@ const GherkinDocumentList = ({ gherkinDocuments, preExpand }) => {
|
|
|
62
33
|
.map((doc) => doc.uri)
|
|
63
34
|
: [];
|
|
64
35
|
});
|
|
65
|
-
return (
|
|
36
|
+
return (React.createElement(Accordion, { allowMultipleExpanded: true, allowZeroExpanded: true, preExpanded: expanded, onChange: setExpanded, className: styles.accordion }, gherkinDocs.map((doc) => {
|
|
66
37
|
if (!doc.uri)
|
|
67
38
|
throw new Error('No url for gherkinDocument');
|
|
68
39
|
const gherkinDocumentStatus = gherkinDocumentStatusByUri.get(doc.uri);
|
|
@@ -71,16 +42,15 @@ const GherkinDocumentList = ({ gherkinDocuments, preExpand }) => {
|
|
|
71
42
|
const source = gherkinQuery.getSource(doc.uri);
|
|
72
43
|
if (!source)
|
|
73
44
|
throw new Error(`No source for ${doc.uri}`);
|
|
74
|
-
return (
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
expanded.includes(doc.uri) && (
|
|
82
|
-
|
|
45
|
+
return (React.createElement(AccordionItem, { key: doc.uri, uuid: doc.uri, className: styles.accordionItem },
|
|
46
|
+
React.createElement(AccordionItemHeading, null,
|
|
47
|
+
React.createElement(AccordionItemButton, { className: styles.accordionButton },
|
|
48
|
+
React.createElement(FontAwesomeIcon, { className: styles.accordionChevron, "aria-hidden": "true", icon: faChevronRight }),
|
|
49
|
+
React.createElement("span", { className: styles.icon },
|
|
50
|
+
React.createElement(StatusIcon, { status: gherkinDocumentStatus })),
|
|
51
|
+
React.createElement("span", null, doc.uri))),
|
|
52
|
+
expanded.includes(doc.uri) && (React.createElement(AccordionItemPanel, { className: styles.accordionPanel },
|
|
53
|
+
React.createElement(UriContext.Provider, { value: doc.uri }, source.mediaType === messages.SourceMediaType.TEXT_X_CUCUMBER_GHERKIN_PLAIN ? (React.createElement(GherkinDocument, { gherkinDocument: doc, source: source })) : (React.createElement(MDG, { uri: doc.uri }, source.data)))))));
|
|
83
54
|
})));
|
|
84
55
|
};
|
|
85
|
-
exports.GherkinDocumentList = GherkinDocumentList;
|
|
86
56
|
//# sourceMappingURL=GherkinDocumentList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GherkinDocumentList.js","sourceRoot":"","sources":["../../../../src/components/app/GherkinDocumentList.tsx"],"names":[],"mappings":"
|
|
1
|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tB,CACa,CACjB,CAAA;IACH,CAAC,CAAC,CACQ,CACb,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,19 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const highlight_words_1 = __importDefault(require("highlight-words"));
|
|
9
|
-
const react_1 = __importDefault(require("react"));
|
|
10
|
-
const react_markdown_1 = __importDefault(require("react-markdown"));
|
|
11
|
-
const SearchQueryContext_1 = __importDefault(require("../../SearchQueryContext"));
|
|
12
|
-
const rehypePlugins_1 = __importDefault(require("./rehypePlugins"));
|
|
13
|
-
const remarkPlugins_1 = __importDefault(require("./remarkPlugins"));
|
|
1
|
+
import { stemmer } from '@orama/stemmers/english';
|
|
2
|
+
import highlightWords from 'highlight-words';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import ReactMarkdown from 'react-markdown';
|
|
5
|
+
import SearchQueryContext from '../../SearchQueryContext.js';
|
|
6
|
+
import rehypePlugins from './rehypePlugins.js';
|
|
7
|
+
import remarkPlugins from './remarkPlugins.js';
|
|
14
8
|
const allQueryWords = (queryWords) => {
|
|
15
9
|
return queryWords.reduce((allWords, word) => {
|
|
16
|
-
const stem =
|
|
10
|
+
const stem = stemmer(word);
|
|
17
11
|
allWords.push(word);
|
|
18
12
|
if (stem !== word) {
|
|
19
13
|
allWords.push(stem);
|
|
@@ -21,19 +15,18 @@ const allQueryWords = (queryWords) => {
|
|
|
21
15
|
return allWords;
|
|
22
16
|
}, []);
|
|
23
17
|
};
|
|
24
|
-
const HighLight = ({ text, markdown = false, className = '', }) => {
|
|
25
|
-
const searchQueryContext =
|
|
18
|
+
export const HighLight = ({ text, markdown = false, className = '', }) => {
|
|
19
|
+
const searchQueryContext = React.useContext(SearchQueryContext);
|
|
26
20
|
const query = allQueryWords(searchQueryContext.query ? searchQueryContext.query.split(' ') : []).join(' ');
|
|
27
21
|
const appliedClassName = className ? `highlight ${className}` : 'highlight';
|
|
28
|
-
const chunks = (
|
|
22
|
+
const chunks = highlightWords({ text, query });
|
|
29
23
|
if (markdown) {
|
|
30
24
|
const highlightedText = chunks
|
|
31
25
|
.map(({ text, match }) => (match ? `<mark>${text}</mark>` : text))
|
|
32
26
|
.join('');
|
|
33
|
-
return (
|
|
34
|
-
|
|
27
|
+
return (React.createElement("div", { className: appliedClassName },
|
|
28
|
+
React.createElement(ReactMarkdown, { remarkPlugins: remarkPlugins, rehypePlugins: rehypePlugins }, highlightedText)));
|
|
35
29
|
}
|
|
36
|
-
return (
|
|
30
|
+
return (React.createElement("span", { className: appliedClassName }, chunks.map(({ text, match, key }) => (match ? React.createElement("mark", { key: key }, text) : text))));
|
|
37
31
|
};
|
|
38
|
-
exports.HighLight = HighLight;
|
|
39
32
|
//# sourceMappingURL=HighLight.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HighLight.js","sourceRoot":"","sources":["../../../../src/components/app/HighLight.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HighLight.js","sourceRoot":"","sources":["../../../../src/components/app/HighLight.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,cAAc,MAAM,iBAAiB,CAAA;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,aAAa,MAAM,gBAAgB,CAAA;AAE1C,OAAO,kBAAkB,MAAM,6BAA6B,CAAA;AAC5D,OAAO,aAAa,MAAM,oBAAoB,CAAA;AAC9C,OAAO,aAAa,MAAM,oBAAoB,CAAA;AAQ9C,MAAM,aAAa,GAAG,CAAC,UAAoB,EAAY,EAAE;IACvD,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,IAAI,EAAE,EAAE;QAC1C,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;QAC1B,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CA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E,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,8BAAM,GAAG,EAAE,GAAG,IAAG,IAAI,CAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAChF,CACR,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,25 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styles from './NavigationButton.module.scss';
|
|
3
|
+
export const NavigationButton = ({ children, ...props }) => {
|
|
4
|
+
return (React.createElement("button", { type: "button", ...props, className: styles.navigationButton }, children));
|
|
12
5
|
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.NavigationButton = void 0;
|
|
18
|
-
const react_1 = __importDefault(require("react"));
|
|
19
|
-
const NavigationButton_module_scss_1 = __importDefault(require("./NavigationButton.module.scss"));
|
|
20
|
-
const NavigationButton = (_a) => {
|
|
21
|
-
var { children } = _a, props = __rest(_a, ["children"]);
|
|
22
|
-
return (react_1.default.createElement("button", Object.assign({ type: "button" }, props, { className: NavigationButton_module_scss_1.default.navigationButton }), children));
|
|
23
|
-
};
|
|
24
|
-
exports.NavigationButton = NavigationButton;
|
|
25
6
|
//# sourceMappingURL=NavigationButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationButton.js","sourceRoot":"","sources":["../../../../src/components/app/NavigationButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NavigationButton.js","sourceRoot":"","sources":["../../../../src/components/app/NavigationButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAA;AAEjD,OAAO,MAAM,MAAM,gCAAgC,CAAA;AAEnD,MAAM,CAAC,MAAM,gBAAgB,GAA0C,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IAChG,OAAO,CACL,gCAAQ,IAAI,EAAC,QAAQ,KAAK,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,gBAAgB,IAChE,QAAQ,CACF,CACV,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,19 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const react_1 = __importDefault(require("react"));
|
|
10
|
-
const NoMatchResult_module_scss_1 = __importDefault(require("./NoMatchResult.module.scss"));
|
|
11
|
-
const NoMatchResult = ({ query }) => {
|
|
12
|
-
return (react_1.default.createElement("p", { className: NoMatchResult_module_scss_1.default.message },
|
|
13
|
-
react_1.default.createElement(react_fontawesome_1.FontAwesomeIcon, { className: NoMatchResult_module_scss_1.default.icon, "aria-hidden": "true", icon: free_solid_svg_icons_1.faGrimace }),
|
|
14
|
-
react_1.default.createElement("span", null, query
|
|
1
|
+
import { faGrimace } from '@fortawesome/free-solid-svg-icons';
|
|
2
|
+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import styles from './NoMatchResult.module.scss';
|
|
5
|
+
export const NoMatchResult = ({ query }) => {
|
|
6
|
+
return (React.createElement("p", { className: styles.message },
|
|
7
|
+
React.createElement(FontAwesomeIcon, { className: styles.icon, "aria-hidden": "true", icon: faGrimace }),
|
|
8
|
+
React.createElement("span", null, query
|
|
15
9
|
? `No matches found for your query "${query}" and/or filters`
|
|
16
10
|
: 'No matches found for your filters')));
|
|
17
11
|
};
|
|
18
|
-
exports.NoMatchResult = NoMatchResult;
|
|
19
12
|
//# sourceMappingURL=NoMatchResult.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NoMatchResult.js","sourceRoot":"","sources":["../../../../src/components/app/NoMatchResult.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NoMatchResult.js","sourceRoot":"","sources":["../../../../src/components/app/NoMatchResult.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAA;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,MAAM,MAAM,6BAA6B,CAAA;AAMhD,MAAM,CAAC,MAAM,aAAa,GAAoC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAC1E,OAAO,CACL,2BAAG,SAAS,EAAE,MAAM,CAAC,OAAO;QAC1B,oBAAC,eAAe,IAAC,SAAS,EAAE,MAAM,CAAC,IAAI,iBAAc,MAAM,EAAC,IAAI,EAAE,SAAS,GAAI;QAC/E,kCACG,KAAK;YACJ,CAAC,CAAC,oCAAoC,KAAK,kBAAkB;YAC7D,CAAC,CAAC,mCAAmC,CAClC,CACL,CACL,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,27 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
exports.OSIcon = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const Linux_1 = require("./icons/Linux");
|
|
9
|
-
const MacOS_1 = require("./icons/MacOS");
|
|
10
|
-
const Windows_1 = require("./icons/Windows");
|
|
11
|
-
const OSIcon = ({ name }) => {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Linux } from './icons/Linux.js';
|
|
3
|
+
import { MacOS } from './icons/MacOS.js';
|
|
4
|
+
import { Windows } from './icons/Windows.js';
|
|
5
|
+
export const OSIcon = ({ name }) => {
|
|
12
6
|
if (!name) {
|
|
13
|
-
return
|
|
7
|
+
return React.createElement(React.Fragment, null, "Unknown OS");
|
|
14
8
|
}
|
|
15
9
|
if (name.match(/windows|win32/i)) {
|
|
16
|
-
return
|
|
10
|
+
return React.createElement(Windows, null);
|
|
17
11
|
}
|
|
18
12
|
if (name.match(/(darwin|mac)/i)) {
|
|
19
|
-
return
|
|
13
|
+
return React.createElement(MacOS, null);
|
|
20
14
|
}
|
|
21
15
|
if (name.match(/linux/i)) {
|
|
22
|
-
return
|
|
16
|
+
return React.createElement(Linux, null);
|
|
23
17
|
}
|
|
24
|
-
return
|
|
18
|
+
return React.createElement(React.Fragment, null, name);
|
|
25
19
|
};
|
|
26
|
-
exports.OSIcon = OSIcon;
|
|
27
20
|
//# sourceMappingURL=OSIcon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OSIcon.js","sourceRoot":"","sources":["../../../../src/components/app/OSIcon.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OSIcon.js","sourceRoot":"","sources":["../../../../src/components/app/OSIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAA;AAEpD,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAE5C,MAAM,CAAC,MAAM,MAAM,GAA4C,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IAC1E,IAAI,CAAC,IAAI,EAAE;QACT,OAAO,uDAAe,CAAA;KACvB;IACD,IAAI,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,EAAE;QAChC,OAAO,oBAAC,OAAO,OAAG,CAAA;KACnB;IACD,IAAI,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,EAAE;QAC/B,OAAO,oBAAC,KAAK,OAAG,CAAA;KACjB;IACD,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE;QACxB,OAAO,oBAAC,KAAK,OAAG,CAAA;KACjB;IACD,OAAO,0CAAG,IAAI,CAAI,CAAA;AACpB,CAAC,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Query as GherkinQuery } from '@cucumber/gherkin-utils';
|
|
2
2
|
import { Query as CucumberQuery } from '@cucumber/query';
|
|
3
3
|
import { FunctionComponent, PropsWithChildren } from 'react';
|
|
4
|
-
import { EnvelopesQuery } from '../../EnvelopesQueryContext';
|
|
4
|
+
import { EnvelopesQuery } from '../../EnvelopesQueryContext.js';
|
|
5
5
|
interface IProps {
|
|
6
6
|
cucumberQuery: CucumberQuery;
|
|
7
7
|
gherkinQuery: GherkinQuery;
|