@cucumber/react-components 23.1.1 → 24.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/dist/src/SearchContext.d.ts +1 -0
- package/dist/src/SearchContext.d.ts.map +1 -1
- package/dist/src/SearchContext.js +1 -0
- package/dist/src/SearchContext.js.map +1 -1
- package/dist/src/components/app/ControlledSearchProvider.d.ts.map +1 -1
- package/dist/src/components/app/ControlledSearchProvider.js +2 -0
- package/dist/src/components/app/ControlledSearchProvider.js.map +1 -1
- package/dist/src/components/app/DocumentAccordion.d.ts +15 -0
- package/dist/src/components/app/DocumentAccordion.d.ts.map +1 -0
- package/dist/src/components/app/DocumentAccordion.js +30 -0
- package/dist/src/components/app/DocumentAccordion.js.map +1 -0
- package/dist/src/components/app/ExecutionSummary.d.ts.map +1 -1
- package/dist/src/components/app/ExecutionSummary.js +3 -0
- package/dist/src/components/app/ExecutionSummary.js.map +1 -1
- package/dist/src/components/app/FilteredDocuments.d.ts.map +1 -1
- package/dist/src/components/app/FilteredDocuments.js +6 -6
- package/dist/src/components/app/FilteredDocuments.js.map +1 -1
- package/dist/src/components/app/FilteredDocuments.module.scss +3 -0
- package/dist/src/components/app/GherkinDocumentList.d.ts.map +1 -1
- package/dist/src/components/app/GherkinDocumentList.js +15 -48
- package/dist/src/components/app/GherkinDocumentList.js.map +1 -1
- package/dist/src/components/app/Report.d.ts +3 -0
- package/dist/src/components/app/Report.d.ts.map +1 -0
- package/dist/src/components/app/Report.js +19 -0
- package/dist/src/components/app/Report.js.map +1 -0
- package/dist/src/components/app/Report.module.scss +10 -0
- package/dist/src/components/app/TestRunHooks.d.ts +3 -0
- package/dist/src/components/app/TestRunHooks.d.ts.map +1 -0
- package/dist/src/components/app/TestRunHooks.js +14 -0
- package/dist/src/components/app/TestRunHooks.js.map +1 -0
- package/dist/src/components/app/TestRunHooks.module.scss +16 -0
- package/dist/src/components/app/findMostSevereTestStepResultStatus.d.ts +3 -0
- package/dist/src/components/app/findMostSevereTestStepResultStatus.d.ts.map +1 -0
- package/dist/src/components/app/findMostSevereTestStepResultStatus.js +17 -0
- package/dist/src/components/app/findMostSevereTestStepResultStatus.js.map +1 -0
- package/dist/src/components/app/index.d.ts +2 -2
- package/dist/src/components/app/index.d.ts.map +1 -1
- package/dist/src/components/app/index.js +2 -2
- package/dist/src/components/app/index.js.map +1 -1
- package/dist/src/components/customise/CustomRendering.d.ts +1 -25
- package/dist/src/components/customise/CustomRendering.d.ts.map +1 -1
- package/dist/src/components/customise/CustomRendering.js.map +1 -1
- package/dist/src/components/gherkin/Anchor.module.scss +1 -1
- package/dist/src/components/gherkin/Background.d.ts.map +1 -1
- package/dist/src/components/gherkin/Background.js +6 -5
- package/dist/src/components/gherkin/Background.js.map +1 -1
- package/dist/src/components/gherkin/Children.module.scss +4 -0
- package/dist/src/components/gherkin/Examples.d.ts.map +1 -1
- package/dist/src/components/gherkin/Examples.js +22 -6
- package/dist/src/components/gherkin/Examples.js.map +1 -1
- package/dist/src/components/gherkin/Examples.module.scss +6 -0
- package/dist/src/components/gherkin/Scenario.d.ts.map +1 -1
- package/dist/src/components/gherkin/Scenario.js +8 -25
- package/dist/src/components/gherkin/Scenario.js.map +1 -1
- package/dist/src/components/gherkin/composeHookStepTitle.d.ts +3 -0
- package/dist/src/components/gherkin/composeHookStepTitle.d.ts.map +1 -0
- package/dist/src/components/gherkin/composeHookStepTitle.js +23 -0
- package/dist/src/components/gherkin/composeHookStepTitle.js.map +1 -0
- package/dist/src/components/gherkin/composePickleStepTitle.d.ts +8 -0
- package/dist/src/components/gherkin/composePickleStepTitle.d.ts.map +1 -0
- package/dist/src/components/gherkin/composePickleStepTitle.js +36 -0
- package/dist/src/components/gherkin/composePickleStepTitle.js.map +1 -0
- package/dist/src/components/gherkin/index.d.ts +0 -7
- package/dist/src/components/gherkin/index.d.ts.map +1 -1
- package/dist/src/components/gherkin/index.js +0 -7
- package/dist/src/components/gherkin/index.js.map +1 -1
- package/dist/src/components/gherkin/isNumber.d.ts.map +1 -1
- package/dist/src/components/gherkin/isNumber.js +2 -1
- package/dist/src/components/gherkin/isNumber.js.map +1 -1
- package/dist/src/components/results/TestCaseOutcome.d.ts +8 -0
- package/dist/src/components/results/TestCaseOutcome.d.ts.map +1 -0
- package/dist/src/components/results/TestCaseOutcome.js +13 -0
- package/dist/src/components/results/TestCaseOutcome.js.map +1 -0
- package/dist/src/components/results/TestCaseOutcome.module.scss +15 -0
- package/dist/src/components/results/TestRunHookOutcome.d.ts +9 -0
- package/dist/src/components/results/TestRunHookOutcome.d.ts.map +1 -0
- package/dist/src/components/results/TestRunHookOutcome.js +20 -0
- package/dist/src/components/results/TestRunHookOutcome.js.map +1 -0
- package/dist/src/components/results/TestRunHookOutcome.module.scss +36 -0
- package/dist/src/components/results/TestStepAttachments.d.ts +8 -0
- package/dist/src/components/results/TestStepAttachments.d.ts.map +1 -0
- package/dist/src/components/results/TestStepAttachments.js +13 -0
- package/dist/src/components/results/TestStepAttachments.js.map +1 -0
- package/dist/src/components/results/TestStepAttachments.module.scss +9 -0
- package/dist/src/components/results/TestStepDuration.d.ts +6 -0
- package/dist/src/components/results/TestStepDuration.d.ts.map +1 -0
- package/dist/src/components/results/TestStepDuration.js +17 -0
- package/dist/src/components/results/TestStepDuration.js.map +1 -0
- package/dist/src/components/results/TestStepDuration.module.scss +11 -0
- package/dist/src/components/results/TestStepOutcome.d.ts +9 -0
- package/dist/src/components/results/TestStepOutcome.d.ts.map +1 -0
- package/dist/src/components/results/TestStepOutcome.js +54 -0
- package/dist/src/components/results/TestStepOutcome.js.map +1 -0
- package/dist/src/components/results/TestStepOutcome.module.scss +36 -0
- package/dist/src/components/results/index.d.ts +1 -0
- package/dist/src/components/results/index.d.ts.map +1 -1
- package/dist/src/components/results/index.js +1 -0
- package/dist/src/components/results/index.js.map +1 -1
- package/dist/src/formatPassedQuantity.d.ts +2 -0
- package/dist/src/formatPassedQuantity.d.ts.map +1 -0
- package/dist/src/formatPassedQuantity.js +4 -0
- package/dist/src/formatPassedQuantity.js.map +1 -0
- package/dist/src/hooks/helpers.d.ts +2 -0
- package/dist/src/hooks/helpers.d.ts.map +1 -0
- package/dist/src/hooks/helpers.js +7 -0
- package/dist/src/hooks/helpers.js.map +1 -0
- package/dist/src/hooks/useFilteredDocuments.d.ts +4 -1
- package/dist/src/hooks/useFilteredDocuments.d.ts.map +1 -1
- package/dist/src/hooks/useFilteredDocuments.js +6 -2
- package/dist/src/hooks/useFilteredDocuments.js.map +1 -1
- package/dist/src/hooks/useMostSevereStatusByUri.d.ts +3 -0
- package/dist/src/hooks/useMostSevereStatusByUri.d.ts.map +1 -0
- package/dist/src/hooks/useMostSevereStatusByUri.js +25 -0
- package/dist/src/hooks/useMostSevereStatusByUri.js.map +1 -0
- package/dist/src/hooks/useTestCaseStarted.d.ts +3 -0
- package/dist/src/hooks/useTestCaseStarted.d.ts.map +1 -0
- package/dist/src/hooks/useTestCaseStarted.js +17 -0
- package/dist/src/hooks/useTestCaseStarted.js.map +1 -0
- package/dist/src/hooks/useTestRunHooks.d.ts +8 -0
- package/dist/src/hooks/useTestRunHooks.d.ts.map +1 -0
- package/dist/src/hooks/useTestRunHooks.js +14 -0
- package/dist/src/hooks/useTestRunHooks.js.map +1 -0
- package/dist/src/index.d.ts +0 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +0 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/styles/theming.scss +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +16 -14
- package/dist/src/UriContext.d.ts +0 -4
- package/dist/src/UriContext.d.ts.map +0 -1
- package/dist/src/UriContext.js +0 -3
- package/dist/src/UriContext.js.map +0 -1
- package/dist/src/components/app/NoMatchResult.d.ts +0 -3
- package/dist/src/components/app/NoMatchResult.d.ts.map +0 -1
- package/dist/src/components/app/NoMatchResult.js +0 -10
- package/dist/src/components/app/NoMatchResult.js.map +0 -1
- package/dist/src/components/app/NoMatchResult.module.scss +0 -13
- package/dist/src/components/app/UriProvider.d.ts +0 -5
- package/dist/src/components/app/UriProvider.d.ts.map +0 -1
- package/dist/src/components/app/UriProvider.js +0 -6
- package/dist/src/components/app/UriProvider.js.map +0 -1
- package/dist/src/components/gherkin/ExampleDetail.d.ts +0 -8
- package/dist/src/components/gherkin/ExampleDetail.d.ts.map +0 -1
- package/dist/src/components/gherkin/ExampleDetail.js +0 -40
- package/dist/src/components/gherkin/ExampleDetail.js.map +0 -1
- package/dist/src/components/gherkin/ExampleDetail.module.scss +0 -5
- package/dist/src/components/gherkin/ExamplesContext.d.ts +0 -5
- package/dist/src/components/gherkin/ExamplesContext.d.ts.map +0 -1
- package/dist/src/components/gherkin/ExamplesContext.js +0 -5
- package/dist/src/components/gherkin/ExamplesContext.js.map +0 -1
- package/dist/src/components/gherkin/ExamplesTable.d.ts +0 -4
- package/dist/src/components/gherkin/ExamplesTable.d.ts.map +0 -1
- package/dist/src/components/gherkin/ExamplesTable.js +0 -36
- package/dist/src/components/gherkin/ExamplesTable.js.map +0 -1
- package/dist/src/components/gherkin/ExamplesTable.module.scss +0 -15
- package/dist/src/components/gherkin/GherkinStep.d.ts +0 -4
- package/dist/src/components/gherkin/GherkinStep.d.ts.map +0 -1
- package/dist/src/components/gherkin/GherkinStep.js +0 -92
- package/dist/src/components/gherkin/GherkinStep.js.map +0 -1
- package/dist/src/components/gherkin/GherkinSteps.d.ts +0 -4
- package/dist/src/components/gherkin/GherkinSteps.d.ts.map +0 -1
- package/dist/src/components/gherkin/GherkinSteps.js +0 -15
- package/dist/src/components/gherkin/GherkinSteps.js.map +0 -1
- package/dist/src/components/gherkin/HookStep.d.ts +0 -4
- package/dist/src/components/gherkin/HookStep.d.ts.map +0 -1
- package/dist/src/components/gherkin/HookStep.js +0 -42
- package/dist/src/components/gherkin/HookStep.js.map +0 -1
- package/dist/src/components/gherkin/HookSteps.d.ts +0 -8
- package/dist/src/components/gherkin/HookSteps.d.ts.map +0 -1
- package/dist/src/components/gherkin/HookSteps.js +0 -7
- package/dist/src/components/gherkin/HookSteps.js.map +0 -1
- package/dist/src/components/gherkin/MDG.d.ts +0 -8
- package/dist/src/components/gherkin/MDG.d.ts.map +0 -1
- package/dist/src/components/gherkin/MDG.js +0 -80
- package/dist/src/components/gherkin/MDG.js.map +0 -1
- package/dist/src/components/gherkin/MDG.module.scss +0 -12
- package/dist/src/components/gherkin/StepItem.d.ts +0 -6
- package/dist/src/components/gherkin/StepItem.d.ts.map +0 -1
- package/dist/src/components/gherkin/StepItem.js +0 -9
- package/dist/src/components/gherkin/StepItem.js.map +0 -1
- package/dist/src/components/gherkin/StepItem.module.scss +0 -21
- /package/dist/src/components/app/{GherkinDocumentList.module.scss → DocumentAccordion.module.scss} +0 -0
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useCustomRendering } from '../customise/index.js';
|
|
3
3
|
import { Description } from './Description.js';
|
|
4
|
-
import { GherkinSteps } from './GherkinSteps.js';
|
|
5
4
|
import { Keyword } from './Keyword.js';
|
|
6
|
-
import { StepsList } from './StepsList.js';
|
|
7
5
|
import { Title } from './Title.js';
|
|
8
6
|
const DefaultRenderer = ({ background }) => {
|
|
7
|
+
const hasName = background.name && background.name.trim() !== '';
|
|
8
|
+
const hasDescription = background.description && background.description.trim() !== '';
|
|
9
|
+
if (!hasName && !hasDescription) {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
9
12
|
return (React.createElement("section", null,
|
|
10
13
|
React.createElement(Title, { header: "h2", id: background.id },
|
|
11
14
|
React.createElement(Keyword, null,
|
|
12
15
|
background.keyword,
|
|
13
16
|
":"),
|
|
14
17
|
React.createElement("span", null, background.name)),
|
|
15
|
-
React.createElement(Description, { description: background.description })
|
|
16
|
-
React.createElement(StepsList, null,
|
|
17
|
-
React.createElement(GherkinSteps, { steps: background.steps || [], hasExamples: false }))));
|
|
18
|
+
React.createElement(Description, { description: background.description })));
|
|
18
19
|
};
|
|
19
20
|
export const Background = (props) => {
|
|
20
21
|
const ResolvedRenderer = useCustomRendering('Background', {}, DefaultRenderer);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Background.js","sourceRoot":"","sources":["../../../../src/components/gherkin/Background.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAqC,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAC7F,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Background.js","sourceRoot":"","sources":["../../../../src/components/gherkin/Background.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAqC,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAC7F,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAElC,MAAM,eAAe,GAAsC,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE;IAC5E,MAAM,OAAO,GAAG,UAAU,CAAC,IAAI,IAAI,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,CAAA;IAChE,MAAM,cAAc,GAAG,UAAU,CAAC,WAAW,IAAI,UAAU,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,CAAA;IAErF,IAAI,CAAC,OAAO,IAAI,CAAC,cAAc,EAAE;QAC/B,OAAO,IAAI,CAAA;KACZ;IAED,OAAO,CACL;QACE,oBAAC,KAAK,IAAC,MAAM,EAAC,IAAI,EAAC,EAAE,EAAE,UAAU,CAAC,EAAE;YAClC,oBAAC,OAAO;gBAAE,UAAU,CAAC,OAAO;oBAAY;YACxC,kCAAO,UAAU,CAAC,IAAI,CAAQ,CACxB;QACR,oBAAC,WAAW,IAAC,WAAW,EAAE,UAAU,CAAC,WAAW,GAAI,CAC5C,CACX,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,UAAU,GAA6C,CAAC,KAAK,EAAE,EAAE;IAC5E,MAAM,gBAAgB,GAAG,kBAAkB,CAAkB,YAAY,EAAE,EAAE,EAAE,eAAe,CAAC,CAAA;IAC/F,OAAO,oBAAC,gBAAgB,OAAK,KAAK,GAAI,CAAA;AACxC,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Examples.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/Examples.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Examples.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/Examples.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAa,MAAM,OAAO,CAAA;AAIjC,OAAO,EAAoB,aAAa,EAAsB,MAAM,uBAAuB,CAAA;AA2B3F,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,iBAAiB,CAAC,aAAa,CAO3D,CAAA"}
|
|
@@ -1,26 +1,42 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { useQueries } from '../../hooks/index.js';
|
|
3
|
+
import { useTestCaseStarted } from '../../hooks/useTestCaseStarted.js';
|
|
2
4
|
import { useCustomRendering } from '../customise/index.js';
|
|
5
|
+
import { TestCaseOutcome } from '../results/index.js';
|
|
3
6
|
import { Children } from './Children.js';
|
|
4
7
|
import { Description } from './Description.js';
|
|
5
8
|
import defaultStyles from './Examples.module.scss';
|
|
6
|
-
import { ExamplesTable } from './ExamplesTable.js';
|
|
7
9
|
import { Keyword } from './Keyword.js';
|
|
8
10
|
import { Tags } from './Tags.js';
|
|
9
11
|
import { Title } from './Title.js';
|
|
10
|
-
const DefaultRenderer = ({ examples
|
|
11
|
-
return (React.createElement("section",
|
|
12
|
+
const DefaultRenderer = ({ examples }) => {
|
|
13
|
+
return (React.createElement("section", null,
|
|
12
14
|
React.createElement(Tags, { tags: examples.tags }),
|
|
13
|
-
React.createElement(Title, { header: "
|
|
15
|
+
React.createElement(Title, { header: "h2", id: examples.id },
|
|
14
16
|
React.createElement(Keyword, null,
|
|
15
17
|
examples.keyword,
|
|
16
18
|
":"),
|
|
17
19
|
React.createElement("span", null, examples.name)),
|
|
18
20
|
React.createElement(Description, { description: examples.description }),
|
|
19
|
-
|
|
20
|
-
React.createElement(
|
|
21
|
+
React.createElement(Children, null, examples.tableBody.map((tableRow) => {
|
|
22
|
+
return React.createElement(Example, { key: tableRow.id, tableRow: tableRow });
|
|
23
|
+
}))));
|
|
21
24
|
};
|
|
22
25
|
export const Examples = (props) => {
|
|
23
26
|
const ResolvedRenderer = useCustomRendering('Examples', defaultStyles, DefaultRenderer);
|
|
24
27
|
return React.createElement(ResolvedRenderer, { ...props });
|
|
25
28
|
};
|
|
29
|
+
const Example = ({ tableRow }) => {
|
|
30
|
+
const { cucumberQuery } = useQueries();
|
|
31
|
+
const testCaseStarted = useTestCaseStarted(tableRow.id);
|
|
32
|
+
if (testCaseStarted) {
|
|
33
|
+
const lineage = cucumberQuery.findLineageBy(testCaseStarted);
|
|
34
|
+
const name = `#${(lineage.examplesIndex ?? 0) + 1}.${(lineage.exampleIndex ?? 0) + 1}`;
|
|
35
|
+
return (React.createElement("section", null,
|
|
36
|
+
React.createElement(Title, { header: "h3", id: tableRow.id },
|
|
37
|
+
React.createElement("span", { className: defaultStyles.exampleNumber }, name)),
|
|
38
|
+
React.createElement(TestCaseOutcome, { testCaseStarted: testCaseStarted })));
|
|
39
|
+
}
|
|
40
|
+
return null;
|
|
41
|
+
};
|
|
26
42
|
//# sourceMappingURL=Examples.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Examples.js","sourceRoot":"","sources":["../../../../src/components/gherkin/Examples.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Examples.js","sourceRoot":"","sources":["../../../../src/components/gherkin/Examples.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA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BAAkB,CACzC,UAAU,EACV,aAAa,EACb,eAAe,CAChB,CAAA;IACD,OAAO,oBAAC,gBAAgB,OAAK,KAAK,GAAI,CAAA;AACxC,CAAC,CAAA;AAED,MAAM,OAAO,GAA+B,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC3D,MAAM,EAAE,aAAa,EAAE,GAAG,UAAU,EAAE,CAAA;IACtC,MAAM,eAAe,GAAG,kBAAkB,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;IACvD,IAAI,eAAe,EAAE;QACnB,MAAM,OAAO,GAAG,aAAa,CAAC,aAAa,CAAC,eAAe,CAAY,CAAA;QACvE,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE,CAAA;QACtF,OAAO,CACL;YACE,oBAAC,KAAK,IAAC,MAAM,EAAC,IAAI,EAAC,EAAE,EAAE,QAAQ,CAAC,EAAE;gBAChC,8BAAM,SAAS,EAAE,aAAa,CAAC,aAAa,IAAG,IAAI,CAAQ,CACrD;YACR,oBAAC,eAAe,IAAC,eAAe,EAAE,eAAe,GAAI,CAC7C,CACX,CAAA;KACF;IACD,OAAO,IAAI,CAAA;AACb,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Scenario.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/Scenario.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Scenario.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/Scenario.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,EAAoB,aAAa,EAAsB,MAAM,uBAAuB,CAAA;AAmC3F,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,iBAAiB,CAAC,aAAa,CAG3D,CAAA"}
|
|
@@ -1,32 +1,17 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import
|
|
3
|
-
import GherkinQueryContext from '../../GherkinQueryContext.js';
|
|
4
|
-
import UriContext from '../../UriContext.js';
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useTestCaseStarted } from '../../hooks/useTestCaseStarted.js';
|
|
5
3
|
import { HighLight } from '../app/HighLight.js';
|
|
6
4
|
import { useCustomRendering } from '../customise/index.js';
|
|
5
|
+
import { TestCaseOutcome } from '../results/index.js';
|
|
6
|
+
import { Children } from './Children.js';
|
|
7
7
|
import { Description } from './Description.js';
|
|
8
|
-
import { ExampleDetail } from './ExampleDetail.js';
|
|
9
8
|
import { Examples } from './Examples.js';
|
|
10
|
-
import { ExamplesContext } from './ExamplesContext.js';
|
|
11
|
-
import { GherkinSteps } from './GherkinSteps.js';
|
|
12
|
-
import { HookSteps } from './HookSteps.js';
|
|
13
9
|
import { Keyword } from './Keyword.js';
|
|
14
|
-
import { StepsList } from './StepsList.js';
|
|
15
10
|
import { Tags } from './Tags.js';
|
|
16
11
|
import { Title } from './Title.js';
|
|
17
12
|
const DefaultRenderer = ({ scenario }) => {
|
|
18
13
|
const examplesList = scenario.examples || [];
|
|
19
|
-
const
|
|
20
|
-
const cucumberQuery = React.useContext(CucumberQueryContext);
|
|
21
|
-
const gherkinQuery = React.useContext(GherkinQueryContext);
|
|
22
|
-
const uri = React.useContext(UriContext);
|
|
23
|
-
const [selectedExample, setSelectedExample] = useState();
|
|
24
|
-
const pickleIds = uri ? gherkinQuery.getPickleIds(uri, scenario.id) : [];
|
|
25
|
-
const beforeHooks = cucumberQuery.getBeforeHookSteps(pickleIds[0]);
|
|
26
|
-
const afterHooks = cucumberQuery.getAfterHookSteps(pickleIds[0]);
|
|
27
|
-
if (selectedExample) {
|
|
28
|
-
return (React.createElement(ExampleDetail, { scenario: scenario, pickleId: selectedExample, onBack: () => setSelectedExample(undefined) }));
|
|
29
|
-
}
|
|
14
|
+
const testCaseStarted = useTestCaseStarted(scenario.id);
|
|
30
15
|
return (React.createElement("section", null,
|
|
31
16
|
React.createElement(Tags, { tags: scenario.tags }),
|
|
32
17
|
React.createElement(Title, { header: "h2", id: scenario.id },
|
|
@@ -35,11 +20,9 @@ const DefaultRenderer = ({ scenario }) => {
|
|
|
35
20
|
":"),
|
|
36
21
|
React.createElement(HighLight, { text: scenario.name })),
|
|
37
22
|
React.createElement(Description, { description: scenario.description }),
|
|
38
|
-
React.createElement(
|
|
39
|
-
React.createElement(
|
|
40
|
-
React.createElement(
|
|
41
|
-
React.createElement(HookSteps, { hookSteps: afterHooks })),
|
|
42
|
-
hasExamples && (React.createElement(ExamplesContext.Provider, { value: { setSelectedExample } }, examplesList.map((examples, index) => (React.createElement(Examples, { key: index, examples: examples })))))));
|
|
23
|
+
React.createElement(Children, null,
|
|
24
|
+
testCaseStarted && React.createElement(TestCaseOutcome, { testCaseStarted: testCaseStarted }),
|
|
25
|
+
examplesList.length > 0 && (React.createElement(React.Fragment, null, examplesList.map((examples, index) => (React.createElement(Examples, { key: index, examples: examples }))))))));
|
|
43
26
|
};
|
|
44
27
|
export const Scenario = (props) => {
|
|
45
28
|
const ResolvedRenderer = useCustomRendering('Scenario', {}, DefaultRenderer);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Scenario.js","sourceRoot":"","sources":["../../../../src/components/gherkin/Scenario.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Scenario.js","sourceRoot":"","sources":["../../../../src/components/gherkin/Scenario.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAA;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAmC,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAC3F,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AACrD,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E;IACxE,MAAM,gBAAgB,GAAG,kBAAkB,CAAgB,UAAU,EAAE,EAAE,EAAE,eAAe,CAAC,CAAA;IAC3F,OAAO,oBAAC,gBAAgB,OAAK,KAAK,GAAI,CAAA;AACxC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composeHookStepTitle.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/composeHookStepTitle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAY,MAAM,oBAAoB,CAAA;AAWnD,wBAAgB,oBAAoB,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,MAAM,CAcxD"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { HookType } from '@cucumber/messages';
|
|
2
|
+
const labels = {
|
|
3
|
+
[HookType.BEFORE_TEST_RUN]: 'BeforeAll',
|
|
4
|
+
[HookType.BEFORE_TEST_CASE]: 'Before',
|
|
5
|
+
[HookType.BEFORE_TEST_STEP]: 'BeforeStep',
|
|
6
|
+
[HookType.AFTER_TEST_STEP]: 'AfterStep',
|
|
7
|
+
[HookType.AFTER_TEST_CASE]: 'After',
|
|
8
|
+
[HookType.AFTER_TEST_RUN]: 'AfterAll',
|
|
9
|
+
};
|
|
10
|
+
export function composeHookStepTitle(hook) {
|
|
11
|
+
let result = '';
|
|
12
|
+
if (hook?.type) {
|
|
13
|
+
result = labels[hook.type];
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
result += 'Hook';
|
|
17
|
+
}
|
|
18
|
+
if (hook?.name) {
|
|
19
|
+
result += ': ' + hook.name;
|
|
20
|
+
}
|
|
21
|
+
return result;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=composeHookStepTitle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composeHookStepTitle.js","sourceRoot":"","sources":["../../../../src/components/gherkin/composeHookStepTitle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAEnD,MAAM,MAAM,GAA6B;IACvC,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,WAAW;IACvC,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,QAAQ;IACrC,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,YAAY;IACzC,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,WAAW;IACvC,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO;IACnC,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,UAAU;CACtC,CAAA;AAED,MAAM,UAAU,oBAAoB,CAAC,IAAW;IAC9C,IAAI,MAAM,GAAG,EAAE,CAAA;IAEf,IAAI,IAAI,EAAE,IAAI,EAAE;QACd,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KAC3B;SAAM;QACL,MAAM,IAAI,MAAM,CAAA;KACjB;IAED,IAAI,IAAI,EAAE,IAAI,EAAE;QACd,MAAM,IAAI,IAAI,GAAG,IAAI,CAAC,IAAI,CAAA;KAC3B;IAED,OAAO,MAAM,CAAA;AACf,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { StepMatchArgumentsList } from '@cucumber/messages';
|
|
2
|
+
interface TitleFragment {
|
|
3
|
+
value: string;
|
|
4
|
+
parameterTypeName?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function composePickleStepTitle(text: string, stepMatchArgumentsLists?: ReadonlyArray<StepMatchArgumentsList>): ReadonlyArray<TitleFragment>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=composePickleStepTitle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composePickleStepTitle.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/composePickleStepTitle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAE3D,UAAU,aAAa;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAC3B;AAED,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,MAAM,EACZ,uBAAuB,CAAC,EAAE,aAAa,CAAC,sBAAsB,CAAC,GAC9D,aAAa,CAAC,aAAa,CAAC,CAkC9B"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export function composePickleStepTitle(text, stepMatchArgumentsLists) {
|
|
2
|
+
if (stepMatchArgumentsLists?.length === 1) {
|
|
3
|
+
const stepMatchArguments = stepMatchArgumentsLists[0].stepMatchArguments;
|
|
4
|
+
let offset = 0;
|
|
5
|
+
let plain;
|
|
6
|
+
const fragments = [];
|
|
7
|
+
stepMatchArguments.forEach((argument) => {
|
|
8
|
+
plain = text.slice(offset, argument.group.start);
|
|
9
|
+
if (plain.length > 0) {
|
|
10
|
+
fragments.push({ value: plain });
|
|
11
|
+
}
|
|
12
|
+
const arg = argument.group.value;
|
|
13
|
+
if (arg) {
|
|
14
|
+
if (arg.length > 0) {
|
|
15
|
+
fragments.push({
|
|
16
|
+
value: arg,
|
|
17
|
+
parameterTypeName: argument.parameterTypeName || 'anonymous',
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
offset += plain.length + arg.length;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
plain = text.slice(offset);
|
|
24
|
+
if (plain.length > 0) {
|
|
25
|
+
fragments.push({ value: plain });
|
|
26
|
+
}
|
|
27
|
+
return fragments;
|
|
28
|
+
}
|
|
29
|
+
// no argument matching, just a single text value
|
|
30
|
+
return [
|
|
31
|
+
{
|
|
32
|
+
value: text,
|
|
33
|
+
},
|
|
34
|
+
];
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=composePickleStepTitle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composePickleStepTitle.js","sourceRoot":"","sources":["../../../../src/components/gherkin/composePickleStepTitle.ts"],"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
|
@@ -7,20 +7,13 @@ export * from './Description.js';
|
|
|
7
7
|
export * from './DocString.js';
|
|
8
8
|
export * from './ErrorMessage.js';
|
|
9
9
|
export * from './Examples.js';
|
|
10
|
-
export * from './ExamplesTable.js';
|
|
11
10
|
export * from './Feature.js';
|
|
12
11
|
export * from './GherkinDocument.js';
|
|
13
|
-
export * from './GherkinStep.js';
|
|
14
|
-
export * from './GherkinSteps.js';
|
|
15
|
-
export * from './HookStep.js';
|
|
16
|
-
export * from './HookSteps.js';
|
|
17
12
|
export * from './Keyword.js';
|
|
18
|
-
export * from './MDG.js';
|
|
19
13
|
export * from './Parameter.js';
|
|
20
14
|
export * from './Rule.js';
|
|
21
15
|
export * from './Scenario.js';
|
|
22
16
|
export * from './StatusIcon.js';
|
|
23
|
-
export * from './StepItem.js';
|
|
24
17
|
export * from './Tags.js';
|
|
25
18
|
export * from './Title.js';
|
|
26
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,4BAA4B,CAAA;AAC1C,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA;AAC7B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,4BAA4B,CAAA;AAC1C,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,sBAAsB,CAAA;AACpC,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA"}
|
|
@@ -7,20 +7,13 @@ export * from './Description.js';
|
|
|
7
7
|
export * from './DocString.js';
|
|
8
8
|
export * from './ErrorMessage.js';
|
|
9
9
|
export * from './Examples.js';
|
|
10
|
-
export * from './ExamplesTable.js';
|
|
11
10
|
export * from './Feature.js';
|
|
12
11
|
export * from './GherkinDocument.js';
|
|
13
|
-
export * from './GherkinStep.js';
|
|
14
|
-
export * from './GherkinSteps.js';
|
|
15
|
-
export * from './HookStep.js';
|
|
16
|
-
export * from './HookSteps.js';
|
|
17
12
|
export * from './Keyword.js';
|
|
18
|
-
export * from './MDG.js';
|
|
19
13
|
export * from './Parameter.js';
|
|
20
14
|
export * from './Rule.js';
|
|
21
15
|
export * from './Scenario.js';
|
|
22
16
|
export * from './StatusIcon.js';
|
|
23
|
-
export * from './StepItem.js';
|
|
24
17
|
export * from './Tags.js';
|
|
25
18
|
export * from './Title.js';
|
|
26
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/gherkin/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,4BAA4B,CAAA;AAC1C,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA;AAC7B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/gherkin/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,4BAA4B,CAAA;AAC1C,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,sBAAsB,CAAA;AACpC,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isNumber.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/isNumber.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isNumber.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/isNumber.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAEnD"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Lifted from cucumber-expressions/javascript/src/ParameterTypeRegistry#FLOAT_REGEXP
|
|
2
|
-
|
|
2
|
+
// Modified to allow spaces, commas and periods as decimal- and/or as thousand-separators
|
|
3
|
+
const numberPattern = /^(?=.*\d.*)[-+]?\d*(?:[., ](?=\d.*)\d*)*(?:\d+E[+-]?\d+)?$/;
|
|
3
4
|
export default function isNumber(s) {
|
|
4
5
|
return !!s.match(numberPattern);
|
|
5
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isNumber.js","sourceRoot":"","sources":["../../../../src/components/gherkin/isNumber.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,MAAM,aAAa,GAAG,
|
|
1
|
+
{"version":3,"file":"isNumber.js","sourceRoot":"","sources":["../../../../src/components/gherkin/isNumber.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,yFAAyF;AACzF,MAAM,aAAa,GAAG,4DAA4D,CAAA;AAElF,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,CAAS;IACxC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAA;AACjC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TestCaseOutcome.d.ts","sourceRoot":"","sources":["../../../../src/components/results/TestCaseOutcome.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAMjC,UAAU,KAAK;IACb,eAAe,EAAE,eAAe,CAAA;CACjC;AAED,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,KAAK,CAkBrC,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useQueries } from '../../hooks/index.js';
|
|
3
|
+
import styles from './TestCaseOutcome.module.scss';
|
|
4
|
+
import { TestStepOutcome } from './TestStepOutcome.js';
|
|
5
|
+
export const TestCaseOutcome = ({ testCaseStarted }) => {
|
|
6
|
+
const { cucumberQuery } = useQueries();
|
|
7
|
+
const steps = cucumberQuery.findTestStepFinishedAndTestStepBy(testCaseStarted);
|
|
8
|
+
return (React.createElement("article", { className: styles.container },
|
|
9
|
+
React.createElement("ol", { className: styles.steps }, steps.map(([testStepFinished, testStep]) => {
|
|
10
|
+
return (React.createElement(TestStepOutcome, { key: testStep.id, testStep: testStep, testStepFinished: testStepFinished }));
|
|
11
|
+
}))));
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=TestCaseOutcome.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TestCaseOutcome.js","sourceRoot":"","sources":["../../../../src/components/results/TestCaseOutcome.tsx"],"names":[],"mappings":"AACA,OAAO,KAAa,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,MAAM,MAAM,+BAA+B,CAAA;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAMtD,MAAM,CAAC,MAAM,eAAe,GAAc,CAAC,EAAE,eAAe,EAAE,EAAE,EAAE;IAChE,MAAM,EAAE,aAAa,EAAE,GAAG,UAAU,EAAE,CAAA;IACtC,MAAM,KAAK,GAAG,aAAa,CAAC,iCAAiC,CAAC,eAAe,CAAC,CAAA;IAC9E,OAAO,CACL,iCAAS,SAAS,EAAE,MAAM,CAAC,SAAS;QAClC,4BAAI,SAAS,EAAE,MAAM,CAAC,KAAK,IACxB,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,gBAAgB,EAAE,QAAQ,CAAC,EAAE,EAAE;YAC1C,OAAO,CACL,oBAAC,eAAe,IACd,GAAG,EAAE,QAAQ,CAAC,EAAE,EAChB,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,EAAE,gBAAgB,GAClC,CACH,CAAA;QACH,CAAC,CAAC,CACC,CACG,CACX,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Hook, TestRunHookFinished } from '@cucumber/messages';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
interface Props {
|
|
4
|
+
hook: Hook;
|
|
5
|
+
testRunHookFinished: TestRunHookFinished;
|
|
6
|
+
}
|
|
7
|
+
export declare const TestRunHookOutcome: FC<Props>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=TestRunHookOutcome.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TestRunHookOutcome.d.ts","sourceRoot":"","sources":["../../../../src/components/results/TestRunHookOutcome.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAY,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AACxE,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAQjC,UAAU,KAAK;IACb,IAAI,EAAE,IAAI,CAAA;IACV,mBAAmB,EAAE,mBAAmB,CAAA;CACzC;AAED,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,KAAK,CAoBxC,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { HookType } from '@cucumber/messages';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { StatusIcon } from '../gherkin/index.js';
|
|
4
|
+
import styles from './TestRunHookOutcome.module.scss';
|
|
5
|
+
import { TestStepAttachments } from './TestStepAttachments.js';
|
|
6
|
+
import { TestStepDuration } from './TestStepDuration.js';
|
|
7
|
+
import { TestStepResultDetails } from './TestStepResultDetails.js';
|
|
8
|
+
export const TestRunHookOutcome = ({ hook, testRunHookFinished }) => {
|
|
9
|
+
return (React.createElement("li", { "data-status": testRunHookFinished.result.status },
|
|
10
|
+
React.createElement("div", { className: styles.header },
|
|
11
|
+
React.createElement("div", { className: styles.status },
|
|
12
|
+
React.createElement(StatusIcon, { status: testRunHookFinished.result.status })),
|
|
13
|
+
React.createElement("div", { className: styles.title },
|
|
14
|
+
React.createElement("h3", { className: styles.name }, hook.name ?? (hook.type === HookType.BEFORE_TEST_RUN ? 'BeforeAll' : 'AfterAll')),
|
|
15
|
+
React.createElement(TestStepDuration, { duration: testRunHookFinished.result.duration }))),
|
|
16
|
+
React.createElement("div", { className: styles.content },
|
|
17
|
+
React.createElement(TestStepResultDetails, { ...testRunHookFinished.result }),
|
|
18
|
+
React.createElement(TestStepAttachments, { testStepOrHookFinished: testRunHookFinished }))));
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=TestRunHookOutcome.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"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,CACN,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
.header {
|
|
2
|
+
display: flex;
|
|
3
|
+
width: 100%;
|
|
4
|
+
gap: 0.25rem;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.status {
|
|
8
|
+
padding-top: 0.1em;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.title {
|
|
12
|
+
> * {
|
|
13
|
+
vertical-align: middle;
|
|
14
|
+
|
|
15
|
+
& + * {
|
|
16
|
+
margin-left: 0.5em;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.name {
|
|
22
|
+
font-size: 1em;
|
|
23
|
+
display: inline;
|
|
24
|
+
font-weight: normal;
|
|
25
|
+
padding: 0;
|
|
26
|
+
margin: 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.content {
|
|
30
|
+
margin-left: 1.125rem;
|
|
31
|
+
|
|
32
|
+
// bits of detail (doc string, data table, error, attachments) get consistent spacing between them
|
|
33
|
+
> * {
|
|
34
|
+
margin-top: 0.25rem !important;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TestRunHookFinished, TestStepFinished } from '@cucumber/messages';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
interface Props {
|
|
4
|
+
testStepOrHookFinished: TestStepFinished | TestRunHookFinished;
|
|
5
|
+
}
|
|
6
|
+
export declare const TestStepAttachments: FC<Props>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=TestStepAttachments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TestStepAttachments.d.ts","sourceRoot":"","sources":["../../../../src/components/results/TestStepAttachments.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAE1E,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAM1B,UAAU,KAAK;IACb,sBAAsB,EAAE,gBAAgB,GAAG,mBAAmB,CAAA;CAC/D;AAED,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,KAAK,CAczC,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useQueries } from '../../hooks/index.js';
|
|
3
|
+
import { Attachment } from '../gherkin/index.js';
|
|
4
|
+
import styles from './TestStepAttachments.module.scss';
|
|
5
|
+
export const TestStepAttachments = ({ testStepOrHookFinished }) => {
|
|
6
|
+
const { cucumberQuery } = useQueries();
|
|
7
|
+
const attachments = cucumberQuery.findAttachmentsBy(testStepOrHookFinished);
|
|
8
|
+
return (React.createElement("ol", { className: styles.attachments }, attachments.map((attachment, index) => {
|
|
9
|
+
return (React.createElement("li", { key: index },
|
|
10
|
+
React.createElement(Attachment, { attachment: attachment })));
|
|
11
|
+
})));
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=TestStepAttachments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TestStepAttachments.js","sourceRoot":"","sources":["../../../../src/components/results/TestStepAttachments.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,MAAM,MAAM,mCAAmC,CAAA;AAMtD,MAAM,CAAC,MAAM,mBAAmB,GAAc,CAAC,EAAE,sBAAsB,EAAE,EAAE,EAAE;IAC3E,MAAM,EAAE,aAAa,EAAE,GAAG,UAAU,EAAE,CAAA;IACtC,MAAM,WAAW,GAAG,aAAa,CAAC,iBAAiB,CAAC,sBAAsB,CAAC,CAAA;IAC3E,OAAO,CACL,4BAAI,SAAS,EAAE,MAAM,CAAC,WAAW,IAC9B,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,KAAK,EAAE,EAAE;QACrC,OAAO,CACL,4BAAI,GAAG,EAAE,KAAK;YACZ,oBAAC,UAAU,IAAC,UAAU,EAAE,UAAU,GAAI,CACnC,CACN,CAAA;IACH,CAAC,CAAC,CACC,CACN,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TestStepDuration.d.ts","sourceRoot":"","sources":["../../../../src/components/results/TestStepDuration.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAkB,MAAM,oBAAoB,CAAA;AAC7D,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAYjC,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC;IAAE,QAAQ,EAAE,QAAQ,CAAA;CAAE,CAcvD,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TimeConversion } from '@cucumber/messages';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import styles from './TestStepDuration.module.scss';
|
|
4
|
+
const subSecondFormat = new Intl.NumberFormat(undefined, {
|
|
5
|
+
maximumFractionDigits: 0,
|
|
6
|
+
});
|
|
7
|
+
const secondPlusFormat = new Intl.NumberFormat(undefined, {
|
|
8
|
+
maximumFractionDigits: 3,
|
|
9
|
+
});
|
|
10
|
+
export const TestStepDuration = ({ duration }) => {
|
|
11
|
+
const millis = TimeConversion.durationToMilliseconds(duration);
|
|
12
|
+
if (millis < 1) {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
return (React.createElement("span", { className: styles.duration }, millis < 1000 ? (React.createElement(React.Fragment, null, `${subSecondFormat.format(millis)}ms`)) : (React.createElement(React.Fragment, null, `${secondPlusFormat.format(millis / 1000)}s`))));
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=TestStepDuration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TestStepDuration.js","sourceRoot":"","sources":["../../../../src/components/results/TestStepDuration.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAC7D,OAAO,KAAa,MAAM,OAAO,CAAA;AAEjC,OAAO,MAAM,MAAM,gCAAgC,CAAA;AAEnD,MAAM,eAAe,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE;IACvD,qBAAqB,EAAE,CAAC;CACzB,CAAC,CAAA;AAEF,MAAM,gBAAgB,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE;IACxD,qBAAqB,EAAE,CAAC;CACzB,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAA+B,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC3E,MAAM,MAAM,GAAG,cAAc,CAAC,sBAAsB,CAAC,QAAQ,CAAC,CAAA;IAC9D,IAAI,MAAM,GAAG,CAAC,EAAE;QACd,OAAO,IAAI,CAAA;KACZ;IACD,OAAO,CACL,8BAAM,SAAS,EAAE,MAAM,CAAC,QAAQ,IAC7B,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,CACf,0CAAG,GAAG,eAAe,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAI,CAC7C,CAAC,CAAC,CAAC,CACF,0CAAG,GAAG,gBAAgB,CAAC,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAI,CACpD,CACI,CACR,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
@use '../../styles/theming';
|
|
2
|
+
|
|
3
|
+
.duration {
|
|
4
|
+
display: inline-block;
|
|
5
|
+
background-color: theming.$panelBackgroundColor;
|
|
6
|
+
color: theming.$panelTextColor;
|
|
7
|
+
font-size: 0.75em;
|
|
8
|
+
padding: 0.1em 0.2em;
|
|
9
|
+
border: 1px solid theming.$panelAccentColor;
|
|
10
|
+
border-radius: 0.25em;
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TestStep, TestStepFinished } from '@cucumber/messages';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
interface Props {
|
|
4
|
+
testStep: TestStep;
|
|
5
|
+
testStepFinished: TestStepFinished;
|
|
6
|
+
}
|
|
7
|
+
export declare const TestStepOutcome: FC<Props>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=TestStepOutcome.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TestStepOutcome.d.ts","sourceRoot":"","sources":["../../../../src/components/results/TestStepOutcome.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,QAAQ,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACjF,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAWjC,UAAU,KAAK;IACb,QAAQ,EAAE,QAAQ,CAAA;IAClB,gBAAgB,EAAE,gBAAgB,CAAA;CACnC;AAED,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,KAAK,CAsBrC,CAAA"}
|