@cucumber/react-components 20.0.1 → 20.2.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/EnvelopesQueryContext.d.ts +1 -0
- package/dist/src/EnvelopesQueryContext.d.ts.map +1 -1
- package/dist/src/EnvelopesQueryContext.js +4 -0
- package/dist/src/EnvelopesQueryContext.js.map +1 -1
- package/dist/src/components/app/CICommitLink.js +2 -1
- package/dist/src/components/app/CICommitLink.js.map +1 -1
- package/dist/src/components/app/CIJobLink.d.ts +8 -0
- package/dist/src/components/app/CIJobLink.d.ts.map +1 -0
- package/dist/src/components/app/CIJobLink.js +22 -0
- package/dist/src/components/app/CIJobLink.js.map +1 -0
- package/dist/src/components/app/ExecutionSummary.d.ts.map +1 -1
- package/dist/src/components/app/ExecutionSummary.js +4 -1
- package/dist/src/components/app/ExecutionSummary.js.map +1 -1
- package/dist/src/components/app/FilteredResults.js +1 -1
- package/dist/src/components/app/FilteredResults.js.map +1 -1
- package/dist/src/components/app/HighLight.d.ts.map +1 -1
- package/dist/src/components/app/HighLight.js +2 -1
- package/dist/src/components/app/HighLight.js.map +1 -1
- package/dist/src/components/app/SearchBar.module.scss +4 -1
- package/dist/src/components/app/remarkPlugins.d.ts +4 -0
- package/dist/src/components/app/remarkPlugins.d.ts.map +1 -0
- package/dist/src/components/app/remarkPlugins.js +9 -0
- package/dist/src/components/app/remarkPlugins.js.map +1 -0
- package/dist/src/components/customise/customRendering.d.ts +12 -10
- 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/Background.d.ts.map +1 -1
- package/dist/src/components/gherkin/Background.js +6 -6
- package/dist/src/components/gherkin/Background.js.map +1 -1
- package/dist/src/components/gherkin/DataTable.module.scss +1 -37
- package/dist/src/components/gherkin/ExampleDetail.d.ts +8 -0
- package/dist/src/components/gherkin/ExampleDetail.d.ts.map +1 -0
- package/dist/src/components/gherkin/ExampleDetail.js +69 -0
- package/dist/src/components/gherkin/ExampleDetail.js.map +1 -0
- package/dist/src/components/gherkin/ExampleDetail.module.scss +24 -0
- package/dist/src/components/gherkin/ExamplesContext.d.ts +5 -0
- package/dist/src/components/gherkin/ExamplesContext.d.ts.map +1 -0
- package/dist/src/components/gherkin/ExamplesContext.js +8 -0
- package/dist/src/components/gherkin/ExamplesContext.js.map +1 -0
- package/dist/src/components/gherkin/ExamplesTable.d.ts.map +1 -1
- package/dist/src/components/gherkin/ExamplesTable.js +35 -27
- package/dist/src/components/gherkin/ExamplesTable.js.map +1 -1
- package/dist/src/components/gherkin/ExamplesTable.module.scss +14 -0
- package/dist/src/components/gherkin/GherkinStep.d.ts.map +1 -1
- package/dist/src/components/gherkin/GherkinStep.js +14 -3
- package/dist/src/components/gherkin/GherkinStep.js.map +1 -1
- package/dist/src/components/gherkin/GherkinSteps.d.ts +4 -0
- package/dist/src/components/gherkin/GherkinSteps.d.ts.map +1 -0
- package/dist/src/components/gherkin/GherkinSteps.js +22 -0
- package/dist/src/components/gherkin/GherkinSteps.js.map +1 -0
- package/dist/src/components/gherkin/{HookList.d.ts → HookSteps.d.ts} +2 -2
- package/dist/src/components/gherkin/HookSteps.d.ts.map +1 -0
- package/dist/src/components/gherkin/{HookList.js → HookSteps.js} +4 -4
- package/dist/src/components/gherkin/HookSteps.js.map +1 -0
- package/dist/src/components/gherkin/Parameter.d.ts.map +1 -1
- package/dist/src/components/gherkin/Parameter.js +2 -2
- package/dist/src/components/gherkin/Parameter.js.map +1 -1
- package/dist/src/components/gherkin/Scenario.d.ts.map +1 -1
- package/dist/src/components/gherkin/Scenario.js +40 -13
- package/dist/src/components/gherkin/Scenario.js.map +1 -1
- package/dist/src/components/gherkin/StepItem.d.ts +0 -1
- package/dist/src/components/gherkin/StepItem.d.ts.map +1 -1
- package/dist/src/components/gherkin/StepItem.js +0 -1
- package/dist/src/components/gherkin/StepItem.js.map +1 -1
- package/dist/src/components/gherkin/StepsList.d.ts +3 -0
- package/dist/src/components/gherkin/StepsList.d.ts.map +1 -0
- package/dist/src/components/gherkin/StepsList.js +13 -0
- package/dist/src/components/gherkin/StepsList.js.map +1 -0
- package/dist/src/components/gherkin/{Background.module.scss → StepsList.module.scss} +0 -0
- package/dist/src/components/gherkin/Tags.js +1 -1
- package/dist/src/components/gherkin/Tags.js.map +1 -1
- package/dist/src/components/gherkin/index.d.ts +2 -2
- package/dist/src/components/gherkin/index.d.ts.map +1 -1
- package/dist/src/components/gherkin/index.js +2 -2
- package/dist/src/components/gherkin/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 +6 -3
- package/dist/src/countScenariosByStatuses.js.map +1 -1
- package/dist/src/styles/tables.scss +24 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +47 -44
- package/dist/src/components/gherkin/HookList.d.ts.map +0 -1
- package/dist/src/components/gherkin/HookList.js.map +0 -1
- package/dist/src/components/gherkin/Scenario.module.scss +0 -12
- package/dist/src/components/gherkin/StepList.d.ts +0 -4
- package/dist/src/components/gherkin/StepList.d.ts.map +0 -1
- package/dist/src/components/gherkin/StepList.js +0 -19
- package/dist/src/components/gherkin/StepList.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExamplesContext.js","sourceRoot":"","sources":["../../../../src/components/gherkin/ExamplesContext.ts"],"names":[],"mappings":";;;AAAA,iCAAqC;AAExB,QAAA,eAAe,GAAG,IAAA,qBAAa,EAEzC;IACD,kBAAkB,EAAE,GAAG,EAAE,CAAC,SAAS;CACpC,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExamplesTable.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/ExamplesTable.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"ExamplesTable.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/ExamplesTable.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAKzC,OAAO,EAGL,kBAAkB,EAEnB,MAAM,cAAc,CAAA;AA8BrB,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CAOrE,CAAA"}
|
|
@@ -1,18 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
27
|
};
|
|
5
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
29
|
exports.ExamplesTable = void 0;
|
|
7
30
|
const messages_1 = require("@cucumber/messages");
|
|
8
|
-
const react_1 =
|
|
31
|
+
const react_1 = __importStar(require("react"));
|
|
9
32
|
const CucumberQueryContext_1 = __importDefault(require("../../CucumberQueryContext"));
|
|
10
33
|
const GherkinQueryContext_1 = __importDefault(require("../../GherkinQueryContext"));
|
|
11
34
|
const UriContext_1 = __importDefault(require("../../UriContext"));
|
|
12
35
|
const customise_1 = require("../customise");
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const ErrorMessage_1 = require("./ErrorMessage");
|
|
36
|
+
const ExamplesContext_1 = require("./ExamplesContext");
|
|
37
|
+
const ExamplesTable_module_scss_1 = __importDefault(require("./ExamplesTable.module.scss"));
|
|
16
38
|
const isNumber_1 = __importDefault(require("./isNumber"));
|
|
17
39
|
const StatusIcon_1 = require("./StatusIcon");
|
|
18
40
|
const DefaultRenderer = ({ tableHeader, tableBody, styles, }) => {
|
|
@@ -21,38 +43,24 @@ const DefaultRenderer = ({ tableHeader, tableBody, styles, }) => {
|
|
|
21
43
|
react_1.default.createElement("tr", null,
|
|
22
44
|
react_1.default.createElement("th", null, "\u00A0"),
|
|
23
45
|
tableHeader.cells.map((cell, j) => (react_1.default.createElement("th", { key: j }, cell.value))))),
|
|
24
|
-
react_1.default.createElement(
|
|
46
|
+
react_1.default.createElement("tbody", null, tableBody.map((row, i) => (react_1.default.createElement(ExampleRow, { row: row, key: i }))))));
|
|
25
47
|
};
|
|
26
48
|
const ExamplesTable = (props) => {
|
|
27
|
-
const ResolvedRenderer = (0, customise_1.useCustomRendering)('ExamplesTable',
|
|
49
|
+
const ResolvedRenderer = (0, customise_1.useCustomRendering)('ExamplesTable', ExamplesTable_module_scss_1.default, DefaultRenderer);
|
|
28
50
|
return react_1.default.createElement(ResolvedRenderer, Object.assign({}, props));
|
|
29
51
|
};
|
|
30
52
|
exports.ExamplesTable = ExamplesTable;
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
const cucumberQuery = react_1.default.useContext(CucumberQueryContext_1.default);
|
|
37
|
-
const uri = react_1.default.useContext(UriContext_1.default);
|
|
53
|
+
const ExampleRow = ({ row }) => {
|
|
54
|
+
const gherkinQuery = (0, react_1.useContext)(GherkinQueryContext_1.default);
|
|
55
|
+
const cucumberQuery = (0, react_1.useContext)(CucumberQueryContext_1.default);
|
|
56
|
+
const uri = (0, react_1.useContext)(UriContext_1.default);
|
|
57
|
+
const { setSelectedExample } = (0, react_1.useContext)(ExamplesContext_1.ExamplesContext);
|
|
38
58
|
const pickleIds = uri ? gherkinQuery.getPickleIds(uri, row.id) : [];
|
|
39
59
|
const testStepResult = (0, messages_1.getWorstTestStepResult)(cucumberQuery.getPickleTestStepResults(pickleIds));
|
|
40
|
-
const pickleStepIds = gherkinQuery.getPickleStepIds(row.id);
|
|
41
|
-
const attachments = cucumberQuery.getPickleStepAttachments(pickleStepIds);
|
|
42
60
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
43
|
-
react_1.default.createElement("tr",
|
|
61
|
+
react_1.default.createElement("tr", { onClick: () => setSelectedExample(pickleIds[0]) },
|
|
44
62
|
react_1.default.createElement("td", null,
|
|
45
63
|
react_1.default.createElement(StatusIcon_1.StatusIcon, { status: testStepResult.status })),
|
|
46
|
-
row.cells.map((cell, j) => (react_1.default.createElement("td", { key: j, style: { textAlign: (0, isNumber_1.default)(cell.value) ? 'right' : 'left' } }, cell.value))))
|
|
47
|
-
react_1.default.createElement(AttachmentAndErrorRow, { key: "row-error", className: detailClass, attachments: attachments, errorMessage: testStepResult.message, colSpan: row.cells.length })));
|
|
48
|
-
};
|
|
49
|
-
const AttachmentAndErrorRow = ({ attachments, errorMessage, colSpan, className, }) => {
|
|
50
|
-
if (!errorMessage && attachments.length === 0)
|
|
51
|
-
return null;
|
|
52
|
-
return (react_1.default.createElement("tr", { className: className },
|
|
53
|
-
react_1.default.createElement("td", null, "\u00A0"),
|
|
54
|
-
react_1.default.createElement("td", { colSpan: colSpan },
|
|
55
|
-
errorMessage && react_1.default.createElement(ErrorMessage_1.ErrorMessage, { message: errorMessage }),
|
|
56
|
-
attachments.map((attachment, i) => (react_1.default.createElement(Attachment_1.Attachment, { key: i, attachment: attachment }))))));
|
|
64
|
+
row.cells.map((cell, j) => (react_1.default.createElement("td", { key: j, style: { textAlign: (0, isNumber_1.default)(cell.value) ? 'right' : 'left' } }, cell.value))))));
|
|
57
65
|
};
|
|
58
66
|
//# sourceMappingURL=ExamplesTable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExamplesTable.js","sourceRoot":"","sources":["../../../../src/components/gherkin/ExamplesTable.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExamplesTable.js","sourceRoot":"","sources":["../../../../src/components/gherkin/ExamplesTable.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,iDAA2D;AAC3D,+CAAyC;AAEzC,sFAA6D;AAC7D,oFAA2D;AAC3D,kEAAyC;AACzC,4CAKqB;AACrB,uDAAmD;AACnD,4FAAuD;AACvD,0DAAiC;AACjC,6CAAyC;AAEzC,MAAM,eAAe,GAA+D,CAAC,EACnF,WAAW,EACX,SAAS,EACT,MAAM,GACP,EAAE,EAAE;IACH,OAAO,CACL,yCAAO,SAAS,EAAE,MAAM,CAAC,aAAa;QACpC;YACE;gBACE,mDAAe;gBACd,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAClC,sCAAI,GAAG,EAAE,CAAC,IAAG,IAAI,CAAC,KAAK,CAAM,CAC9B,CAAC,CACC,CACC;QACR,6CACG,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CACzB,8BAAC,UAAU,IAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,GAAI,CACjC,CAA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O,CAAC,CAAC,CAAC,MAAM,EAAE,IACtE,IAAI,CAAC,KAAK,CACR,CACN,CAAC,CACC,CACJ,CACJ,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GherkinStep.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/GherkinStep.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GherkinStep.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/GherkinStep.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,EAAoB,gBAAgB,EAAsB,MAAM,cAAc,CAAA;AA+GrF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAGjE,CAAA"}
|
|
@@ -18,10 +18,21 @@ const Keyword_1 = require("./Keyword");
|
|
|
18
18
|
const Parameter_1 = require("./Parameter");
|
|
19
19
|
const StepItem_1 = require("./StepItem");
|
|
20
20
|
const Title_1 = require("./Title");
|
|
21
|
-
|
|
21
|
+
function resolveStep(gherkinStep, pickleStep) {
|
|
22
|
+
var _a, _b;
|
|
23
|
+
const step = Object.assign({}, gherkinStep);
|
|
24
|
+
if (pickleStep) {
|
|
25
|
+
step.text = pickleStep.text;
|
|
26
|
+
step.dataTable = (_a = pickleStep.argument) === null || _a === void 0 ? void 0 : _a.dataTable;
|
|
27
|
+
step.docString = (_b = pickleStep.argument) === null || _b === void 0 ? void 0 : _b.docString;
|
|
28
|
+
}
|
|
29
|
+
return step;
|
|
30
|
+
}
|
|
31
|
+
const DefaultRenderer = ({ step: gherkinStep, pickleStep, hasExamples, }) => {
|
|
32
|
+
const step = resolveStep(gherkinStep, pickleStep);
|
|
22
33
|
const gherkinQuery = react_1.default.useContext(GherkinQueryContext_1.default);
|
|
23
34
|
const cucumberQuery = react_1.default.useContext(CucumberQueryContext_1.default);
|
|
24
|
-
const pickleStepIds = gherkinQuery.getPickleStepIds(step.id);
|
|
35
|
+
const pickleStepIds = pickleStep ? [pickleStep.id] : gherkinQuery.getPickleStepIds(step.id);
|
|
25
36
|
const pickleStepTestStepResults = cucumberQuery.getPickleStepTestStepResults(pickleStepIds);
|
|
26
37
|
const testStepResult = (0, messages_1.getWorstTestStepResult)(pickleStepTestStepResults);
|
|
27
38
|
const attachments = cucumberQuery.getPickleStepAttachments(pickleStepIds);
|
|
@@ -47,7 +58,7 @@ const DefaultRenderer = ({ step, hasExamples }) => {
|
|
|
47
58
|
const arg = argument.group.value;
|
|
48
59
|
if (arg) {
|
|
49
60
|
if (arg.length > 0) {
|
|
50
|
-
stepTextElements.push(react_1.default.createElement(Parameter_1.Parameter, { parameterTypeName: argument.parameterTypeName || 'anonymous', key: `param-${index}` },
|
|
61
|
+
stepTextElements.push(react_1.default.createElement(Parameter_1.Parameter, { parameterTypeName: argument.parameterTypeName || 'anonymous', value: arg, key: `param-${index}` },
|
|
51
62
|
react_1.default.createElement(HighLight_1.HighLight, { text: arg })));
|
|
52
63
|
}
|
|
53
64
|
offset += plain.length + arg.length;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GherkinStep.js","sourceRoot":"","sources":["../../../../src/components/gherkin/GherkinStep.tsx"],"names":[],"mappings":";;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"GherkinStep.js","sourceRoot":"","sources":["../../../../src/components/gherkin/GherkinStep.tsx"],"names":[],"mappings":";;;;;;AAAA,iDAQ2B;AAC3B,kDAAyB;AAEzB,sFAA6D;AAC7D,oFAA2D;AAC3D,gDAA4C;AAC5C,4CAAqF;AACrF,6CAAyC;AACzC,2CAA6D;AAC7D,2CAA6D;AAC7D,iDAA6C;AAC7C,uCAAmC;AACnC,2CAAuC;AACvC,yCAAqC;AACrC,mCAA+B;AAU/B,SAAS,WAAW,CAAC,WAAiB,EAAE,UAAuB;;IAC7D,MAAM,IAAI,qBAAwB,WAAW,CAAE,CAAA;IAC/C,IAAI,UAAU,EAAE;QACd,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3E,CACZ,CAAA;AACH,CAAC,CAAA;AAEM,MAAM,WAAW,GAA8C,CAAC,KAAK,EAAE,EAAE;IAC9E,MAAM,gBAAgB,GAAG,IAAA,8BAAkB,EAAmB,aAAa,EAAE,EAAE,EAAE,eAAe,CAAC,CAAA;IACjG,OAAO,8BAAC,gBAAgB,oBAAK,KAAK,EAAI,CAAA;AACxC,CAAC,CAAA;AAHY,QAAA,WAAW,eAGvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GherkinSteps.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/GherkinSteps.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAoB,iBAAiB,EAAsB,MAAM,cAAc,CAAA;AAuBtF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAOnE,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.GherkinSteps = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const customise_1 = require("../customise");
|
|
9
|
+
const GherkinStep_1 = require("./GherkinStep");
|
|
10
|
+
const DefaultRenderer = ({ steps, pickle, hasExamples }) => {
|
|
11
|
+
return (react_1.default.createElement(react_1.default.Fragment, null, steps.map((step, index) => {
|
|
12
|
+
const pickleStep = pickle === null || pickle === void 0 ? void 0 : pickle.steps.find((item) => item.astNodeIds.includes(step.id));
|
|
13
|
+
return (react_1.default.createElement("li", { key: index },
|
|
14
|
+
react_1.default.createElement(GherkinStep_1.GherkinStep, { key: index, step: step, pickleStep: pickleStep, hasExamples: hasExamples })));
|
|
15
|
+
})));
|
|
16
|
+
};
|
|
17
|
+
const GherkinSteps = (props) => {
|
|
18
|
+
const ResolvedRenderer = (0, customise_1.useCustomRendering)('GherkinSteps', {}, DefaultRenderer);
|
|
19
|
+
return react_1.default.createElement(ResolvedRenderer, Object.assign({}, props));
|
|
20
|
+
};
|
|
21
|
+
exports.GherkinSteps = GherkinSteps;
|
|
22
|
+
//# sourceMappingURL=GherkinSteps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GherkinSteps.js","sourceRoot":"","sources":["../../../../src/components/gherkin/GherkinSteps.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AAEzB,4CAAsF;AACtF,+CAA2C;AAE3C,MAAM,eAAe,GAAwC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,EAAE;IAC9F,OAAO,CACL,8DACG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;QACzB,MAAM,UAAU,GAAG,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAA;QAClF,OAAO,CACL,sCAAI,GAAG,EAAE,KAAK;YACZ,8BAAC,yBAAW,IACV,GAAG,EAAE,KAAK,EACV,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,WAAW,GACxB,CACC,CACN,CAAA;IACH,CAAC,CAAC,CACD,CACJ,CAAA;AACH,CAAC,CAAA;AAEM,MAAM,YAAY,GAA+C,CAAC,KAAK,EAAE,EAAE;IAChF,MAAM,gBAAgB,GAAG,IAAA,8BAAkB,EACzC,cAAc,EACd,EAAE,EACF,eAAe,CAChB,CAAA;IACD,OAAO,8BAAC,gBAAgB,oBAAK,KAAK,EAAI,CAAA;AACxC,CAAC,CAAA;AAPY,QAAA,YAAY,gBAOxB"}
|
|
@@ -3,6 +3,6 @@ import React from 'react';
|
|
|
3
3
|
interface IProps {
|
|
4
4
|
hookSteps: readonly messages.TestStep[];
|
|
5
5
|
}
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const HookSteps: React.FunctionComponent<IProps>;
|
|
7
7
|
export {};
|
|
8
|
-
//# sourceMappingURL=
|
|
8
|
+
//# sourceMappingURL=HookSteps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HookSteps.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/HookSteps.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,oBAAoB,CAAA;AAC9C,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,UAAU,MAAM;IACd,SAAS,EAAE,SAAS,QAAQ,CAAC,QAAQ,EAAE,CAAA;CACxC;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC,MAAM,CAUrD,CAAA"}
|
|
@@ -3,12 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.HookSteps = void 0;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const HookStep_1 = require("./HookStep");
|
|
9
|
-
const
|
|
9
|
+
const HookSteps = ({ hookSteps }) => {
|
|
10
10
|
return (react_1.default.createElement(react_1.default.Fragment, null, hookSteps.map((step, index) => (react_1.default.createElement("li", { key: index },
|
|
11
11
|
react_1.default.createElement(HookStep_1.HookStep, { key: index, step: step }))))));
|
|
12
12
|
};
|
|
13
|
-
exports.
|
|
14
|
-
//# sourceMappingURL=
|
|
13
|
+
exports.HookSteps = HookSteps;
|
|
14
|
+
//# sourceMappingURL=HookSteps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HookSteps.js","sourceRoot":"","sources":["../../../../src/components/gherkin/HookSteps.tsx"],"names":[],"mappings":";;;;;;AACA,kDAAyB;AAEzB,yCAAqC;AAM9B,MAAM,SAAS,GAAoC,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE;IAC1E,OAAO,CACL,8DACG,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAC9B,sCAAI,GAAG,EAAE,KAAK;QACZ,8BAAC,mBAAQ,IAAC,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,GAAI,CACjC,CACN,CAAC,CACD,CACJ,CAAA;AACH,CAAC,CAAA;AAVY,QAAA,SAAS,aAUrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Parameter.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/Parameter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAGL,cAAc,EAEf,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"Parameter.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/Parameter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAGL,cAAc,EAEf,MAAM,cAAc,CAAA;AAgBrB,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAO7D,CAAA"}
|
|
@@ -7,8 +7,8 @@ exports.Parameter = void 0;
|
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const customise_1 = require("../customise");
|
|
9
9
|
const Parameter_module_scss_1 = __importDefault(require("./Parameter.module.scss"));
|
|
10
|
-
const DefaultRenderer = ({ parameterTypeName, children, styles, }) => {
|
|
11
|
-
return (react_1.default.createElement("span", { title: parameterTypeName, className: styles.parameter }, children));
|
|
10
|
+
const DefaultRenderer = ({ parameterTypeName, value, children, styles, }) => {
|
|
11
|
+
return (react_1.default.createElement("span", { title: parameterTypeName, "aria-label": value, className: styles.parameter }, children));
|
|
12
12
|
};
|
|
13
13
|
const Parameter = (props) => {
|
|
14
14
|
const ResolvedRenderer = (0, customise_1.useCustomRendering)('Parameter', Parameter_module_scss_1.default, DefaultRenderer);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Parameter.js","sourceRoot":"","sources":["../../../../src/components/gherkin/Parameter.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AAEzB,4CAKqB;AACrB,oFAAmD;AAEnD,MAAM,eAAe,GAAuD,CAAC,EAC3E,iBAAiB,EACjB,QAAQ,EACR,MAAM,GACP,EAAE,EAAE;IACH,OAAO,CACL,wCAAM,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"Parameter.js","sourceRoot":"","sources":["../../../../src/components/gherkin/Parameter.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AAEzB,4CAKqB;AACrB,oFAAmD;AAEnD,MAAM,eAAe,GAAuD,CAAC,EAC3E,iBAAiB,EACjB,KAAK,EACL,QAAQ,EACR,MAAM,GACP,EAAE,EAAE;IACH,OAAO,CACL,wCAAM,KAAK,EAAE,iBAAiB,gBAAc,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,IAC3E,QAAQ,CACJ,CACR,CAAA;AACH,CAAC,CAAA;AAEM,MAAM,SAAS,GAA4C,CAAC,KAAK,EAAE,EAAE;IAC1E,MAAM,gBAAgB,GAAG,IAAA,8BAAkB,EACzC,WAAW,EACX,+BAAa,EACb,eAAe,CAChB,CAAA;IACD,OAAO,8BAAC,gBAAgB,oBAAK,KAAK,EAAI,CAAA;AACxC,CAAC,CAAA;AAPY,QAAA,SAAS,aAOrB"}
|
|
@@ -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,KAAmB,MAAM,OAAO,CAAA;AAMvC,OAAO,EAAoB,aAAa,EAAsB,MAAM,cAAc,CAAA;AAwDlF,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,iBAAiB,CAAC,aAAa,CAG3D,CAAA"}
|
|
@@ -1,32 +1,61 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
27
|
};
|
|
5
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
29
|
exports.Scenario = void 0;
|
|
7
|
-
const react_1 =
|
|
30
|
+
const react_1 = __importStar(require("react"));
|
|
8
31
|
const CucumberQueryContext_1 = __importDefault(require("../../CucumberQueryContext"));
|
|
9
32
|
const GherkinQueryContext_1 = __importDefault(require("../../GherkinQueryContext"));
|
|
10
33
|
const UriContext_1 = __importDefault(require("../../UriContext"));
|
|
11
34
|
const HighLight_1 = require("../app/HighLight");
|
|
12
35
|
const customise_1 = require("../customise");
|
|
13
36
|
const Description_1 = require("./Description");
|
|
37
|
+
const ExampleDetail_1 = require("./ExampleDetail");
|
|
14
38
|
const Examples_1 = require("./Examples");
|
|
15
|
-
const
|
|
39
|
+
const ExamplesContext_1 = require("./ExamplesContext");
|
|
40
|
+
const GherkinSteps_1 = require("./GherkinSteps");
|
|
41
|
+
const HookSteps_1 = require("./HookSteps");
|
|
16
42
|
const Keyword_1 = require("./Keyword");
|
|
17
|
-
const
|
|
18
|
-
const StepList_1 = require("./StepList");
|
|
43
|
+
const StepsList_1 = require("./StepsList");
|
|
19
44
|
const Tags_1 = require("./Tags");
|
|
20
45
|
const Title_1 = require("./Title");
|
|
21
|
-
const DefaultRenderer = ({ scenario
|
|
46
|
+
const DefaultRenderer = ({ scenario }) => {
|
|
22
47
|
const examplesList = scenario.examples || [];
|
|
23
48
|
const hasExamples = examplesList.length > 0;
|
|
24
49
|
const cucumberQuery = react_1.default.useContext(CucumberQueryContext_1.default);
|
|
25
50
|
const gherkinQuery = react_1.default.useContext(GherkinQueryContext_1.default);
|
|
26
51
|
const uri = react_1.default.useContext(UriContext_1.default);
|
|
52
|
+
const [selectedExample, setSelectedExample] = (0, react_1.useState)();
|
|
27
53
|
const pickleIds = uri ? gherkinQuery.getPickleIds(uri, scenario.id) : [];
|
|
28
54
|
const beforeHooks = cucumberQuery.getBeforeHookSteps(pickleIds[0]);
|
|
29
55
|
const afterHooks = cucumberQuery.getAfterHookSteps(pickleIds[0]);
|
|
56
|
+
if (selectedExample) {
|
|
57
|
+
return (react_1.default.createElement(ExampleDetail_1.ExampleDetail, { scenario: scenario, pickleId: selectedExample, onBack: () => setSelectedExample(undefined) }));
|
|
58
|
+
}
|
|
30
59
|
return (react_1.default.createElement("section", null,
|
|
31
60
|
react_1.default.createElement(Tags_1.Tags, { tags: scenario.tags }),
|
|
32
61
|
react_1.default.createElement(Title_1.Title, { header: "h2", id: scenario.id },
|
|
@@ -35,16 +64,14 @@ const DefaultRenderer = ({ scenario, styles, }) => {
|
|
|
35
64
|
":"),
|
|
36
65
|
react_1.default.createElement(HighLight_1.HighLight, { text: scenario.name })),
|
|
37
66
|
react_1.default.createElement(Description_1.Description, { description: scenario.description }),
|
|
38
|
-
react_1.default.createElement(
|
|
39
|
-
react_1.default.createElement(
|
|
40
|
-
react_1.default.createElement(
|
|
41
|
-
react_1.default.createElement(
|
|
42
|
-
examplesList.map((examples, index) => {
|
|
43
|
-
return react_1.default.createElement(Examples_1.Examples, { key: index, examples: examples });
|
|
44
|
-
})));
|
|
67
|
+
react_1.default.createElement(StepsList_1.StepsList, null,
|
|
68
|
+
react_1.default.createElement(HookSteps_1.HookSteps, { hookSteps: beforeHooks }),
|
|
69
|
+
react_1.default.createElement(GherkinSteps_1.GherkinSteps, { steps: scenario.steps || [], hasExamples: hasExamples }),
|
|
70
|
+
react_1.default.createElement(HookSteps_1.HookSteps, { hookSteps: afterHooks })),
|
|
71
|
+
hasExamples && (react_1.default.createElement(ExamplesContext_1.ExamplesContext.Provider, { value: { setSelectedExample } }, examplesList.map((examples, index) => (react_1.default.createElement(Examples_1.Examples, { key: index, examples: examples })))))));
|
|
45
72
|
};
|
|
46
73
|
const Scenario = (props) => {
|
|
47
|
-
const ResolvedRenderer = (0, customise_1.useCustomRendering)('Scenario',
|
|
74
|
+
const ResolvedRenderer = (0, customise_1.useCustomRendering)('Scenario', {}, DefaultRenderer);
|
|
48
75
|
return react_1.default.createElement(ResolvedRenderer, Object.assign({}, props));
|
|
49
76
|
};
|
|
50
77
|
exports.Scenario = Scenario;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Scenario.js","sourceRoot":"","sources":["../../../../src/components/gherkin/Scenario.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Scenario.js","sourceRoot":"","sources":["../../../../src/components/gherkin/Scenario.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAuC;AAEvC,sFAA6D;AAC7D,oFAA2D;AAC3D,kEAAyC;AACzC,gDAA4C;AAC5C,4CAAkF;AAClF,+CAA2C;AAC3C,mDAA+C;AAC/C,yCAAqC;AACrC,uDAAmD;AACnD,iDAA6C;AAC7C,2CAAuC;AACvC,uCAAmC;AACnC,2CAAuC;AACvC,iCAA6B;AAC7B,mCAA+B;AAE/B,MAAM,eAAe,GAAoC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACxE,MAAM,YAAY,GAAG,QAAQ,CAAC,QAAQ,IAAI,EAAE,CAAA;IAC5C,MAAM,WAAW,GAAG,YAAY,CAAC,MAAM,GAAG,CAAC,CAAA;IAC3C,MAAM,aAAa,GAAG,eAAK,CAAC,UAAU,CAAC,8BAAoB,CAAC,CAAA;IAC5D,MAAM,YAAY,GAAG,eAAK,CAAC,UAAU,CAAC,6BAAmB,CAAC,CAAA;IAC1D,MAAM,GAAG,GAAG,eAAK,CAAC,UAAU,CAAC,oBAAU,CAAC,CAAA;IACxC,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,IAAA,gBAAQ,GAAU,CAAA;IAChE,MAAM,SAAS,GAAG,GAAG,CAAC,CAAC,CAAC,YAAY,CAAC,YAAY,CAAC,GAAG,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;IACxE,MAAM,WAAW,GAAG,aAAa,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAA;I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A,8BAAkB,EAAgB,UAAU,EAAE,EAAE,EAAE,eAAe,CAAC,CAAA;IAC3F,OAAO,8BAAC,gBAAgB,oBAAK,KAAK,EAAI,CAAA;AACxC,CAAC,CAAA;AAHY,QAAA,QAAQ,YAGpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepItem.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/StepItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,oBAAoB,CAAA;AAC9C,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAC7C,MAAM,CAAC,EAAE,QAAQ,CAAC,oBAAoB,CAAA;CACvC,CAOA,CAAA
|
|
1
|
+
{"version":3,"file":"StepItem.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/StepItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,oBAAoB,CAAA;AAC9C,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAC7C,MAAM,CAAC,EAAE,QAAQ,CAAC,oBAAoB,CAAA;CACvC,CAOA,CAAA"}
|
|
@@ -13,5 +13,4 @@ const StepItem = ({ status, children }) => {
|
|
|
13
13
|
react_1.default.createElement("div", { className: StepItem_module_scss_1.default.content }, children)));
|
|
14
14
|
};
|
|
15
15
|
exports.StepItem = StepItem;
|
|
16
|
-
exports.default = exports.StepItem;
|
|
17
16
|
//# sourceMappingURL=StepItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepItem.js","sourceRoot":"","sources":["../../../../src/components/gherkin/StepItem.tsx"],"names":[],"mappings":";;;;;;AACA,kDAAyB;AAEzB,6CAAyC;AACzC,kFAA2C;AAEpC,MAAM,QAAQ,GAEhB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC5B,OAAO,CACL,uCAAK,SAAS,EAAE,8BAAM,CAAC,SAAS;QAC9B,wCAAM,SAAS,EAAE,8BAAM,CAAC,MAAM,IAAG,MAAM,IAAI,8BAAC,uBAAU,IAAC,MAAM,EAAE,MAAM,GAAI,CAAQ;QACjF,uCAAK,SAAS,EAAE,8BAAM,CAAC,OAAO,IAAG,QAAQ,CAAO,CAC5C,CACP,CAAA;AACH,CAAC,CAAA;AATY,QAAA,QAAQ,YASpB
|
|
1
|
+
{"version":3,"file":"StepItem.js","sourceRoot":"","sources":["../../../../src/components/gherkin/StepItem.tsx"],"names":[],"mappings":";;;;;;AACA,kDAAyB;AAEzB,6CAAyC;AACzC,kFAA2C;AAEpC,MAAM,QAAQ,GAEhB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC5B,OAAO,CACL,uCAAK,SAAS,EAAE,8BAAM,CAAC,SAAS;QAC9B,wCAAM,SAAS,EAAE,8BAAM,CAAC,MAAM,IAAG,MAAM,IAAI,8BAAC,uBAAU,IAAC,MAAM,EAAE,MAAM,GAAI,CAAQ;QACjF,uCAAK,SAAS,EAAE,8BAAM,CAAC,OAAO,IAAG,QAAQ,CAAO,CAC5C,CACP,CAAA;AACH,CAAC,CAAA;AATY,QAAA,QAAQ,YASpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StepsList.d.ts","sourceRoot":"","sources":["../../../../src/components/gherkin/StepsList.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAIhD,eAAO,MAAM,SAAS,EAAE,iBAMvB,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.StepsList = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const StepsList_module_scss_1 = __importDefault(require("./StepsList.module.scss"));
|
|
9
|
+
const StepsList = ({ children }) => {
|
|
10
|
+
return (react_1.default.createElement("ol", { "aria-label": "Steps", className: StepsList_module_scss_1.default.steps }, children));
|
|
11
|
+
};
|
|
12
|
+
exports.StepsList = StepsList;
|
|
13
|
+
//# sourceMappingURL=StepsList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StepsList.js","sourceRoot":"","sources":["../../../../src/components/gherkin/StepsList.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAgD;AAEhD,oFAA4C;AAErC,MAAM,SAAS,GAAsB,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC3D,OAAO,CACL,oDAAe,OAAO,EAAC,SAAS,EAAE,+BAAM,CAAC,KAAK,IAC3C,QAAQ,CACN,CACN,CAAA;AACH,CAAC,CAAA;AANY,QAAA,SAAS,aAMrB"}
|
|
File without changes
|
|
@@ -12,7 +12,7 @@ const DefaultRenderer = ({ tags, styles }) => {
|
|
|
12
12
|
if (!tags.length) {
|
|
13
13
|
return null;
|
|
14
14
|
}
|
|
15
|
-
return (react_1.default.createElement("ul", { className: styles.tags }, tags.map((tag, index) => (react_1.default.createElement("li", { className: styles.tag, key: index },
|
|
15
|
+
return (react_1.default.createElement("ul", { "aria-label": "Tags", className: styles.tags }, tags.map((tag, index) => (react_1.default.createElement("li", { className: styles.tag, key: index },
|
|
16
16
|
react_1.default.createElement(HighLight_1.HighLight, { text: tag.name }))))));
|
|
17
17
|
};
|
|
18
18
|
const Tags = (props) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tags.js","sourceRoot":"","sources":["../../../../src/components/gherkin/Tags.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AAEzB,gDAA4C;AAC5C,4CAA2F;AAC3F,0EAA8C;AAE9C,MAAM,eAAe,GAA6C,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE;IACrF,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;QAChB,OAAO,IAAI,CAAA;KACZ;IACD,OAAO,CACL,
|
|
1
|
+
{"version":3,"file":"Tags.js","sourceRoot":"","sources":["../../../../src/components/gherkin/Tags.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AAEzB,gDAA4C;AAC5C,4CAA2F;AAC3F,0EAA8C;AAE9C,MAAM,eAAe,GAA6C,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE;IACrF,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;QAChB,OAAO,IAAI,CAAA;KACZ;IACD,OAAO,CACL,oDAAe,MAAM,EAAC,SAAS,EAAE,MAAM,CAAC,IAAI,IACzC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,CACxB,sCAAI,SAAS,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK;QACnC,8BAAC,qBAAS,IAAC,IAAI,EAAE,GAAG,CAAC,IAAI,GAAI,CAC1B,CACN,CAAC,CACC,CACN,CAAA;AACH,CAAC,CAAA;AAEM,MAAM,IAAI,GAAuC,CAAC,KAAK,EAAE,EAAE;IAChE,MAAM,gBAAgB,GAAG,IAAA,8BAAkB,EACzC,MAAM,EACN,0BAAa,EACb,eAAe,CAChB,CAAA;IACD,OAAO,8BAAC,gBAAgB,oBAAK,KAAK,EAAI,CAAA;AACxC,CAAC,CAAA;AAPY,QAAA,IAAI,QAOhB"}
|
|
@@ -11,8 +11,9 @@ export * from './ExamplesTable';
|
|
|
11
11
|
export * from './Feature';
|
|
12
12
|
export * from './GherkinDocument';
|
|
13
13
|
export * from './GherkinStep';
|
|
14
|
-
export * from './
|
|
14
|
+
export * from './GherkinSteps';
|
|
15
15
|
export * from './HookStep';
|
|
16
|
+
export * from './HookSteps';
|
|
16
17
|
export * from './Keyword';
|
|
17
18
|
export * from './MDG';
|
|
18
19
|
export * from './Parameter';
|
|
@@ -20,7 +21,6 @@ export * from './Rule';
|
|
|
20
21
|
export * from './Scenario';
|
|
21
22
|
export * from './StatusIcon';
|
|
22
23
|
export * from './StepItem';
|
|
23
|
-
export * from './StepList';
|
|
24
24
|
export * from './Tags';
|
|
25
25
|
export * from './Title';
|
|
26
26
|
//# 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,UAAU,CAAA;AACxB,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA;AACzB,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,UAAU,CAAA;AACxB,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA;AACzB,cAAc,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,OAAO,CAAA;AACrB,cAAc,aAAa,CAAA;AAC3B,cAAc,QAAQ,CAAA;AACtB,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAA"}
|
|
@@ -27,8 +27,9 @@ __exportStar(require("./ExamplesTable"), exports);
|
|
|
27
27
|
__exportStar(require("./Feature"), exports);
|
|
28
28
|
__exportStar(require("./GherkinDocument"), exports);
|
|
29
29
|
__exportStar(require("./GherkinStep"), exports);
|
|
30
|
-
__exportStar(require("./
|
|
30
|
+
__exportStar(require("./GherkinSteps"), exports);
|
|
31
31
|
__exportStar(require("./HookStep"), exports);
|
|
32
|
+
__exportStar(require("./HookSteps"), exports);
|
|
32
33
|
__exportStar(require("./Keyword"), exports);
|
|
33
34
|
__exportStar(require("./MDG"), exports);
|
|
34
35
|
__exportStar(require("./Parameter"), exports);
|
|
@@ -36,7 +37,6 @@ __exportStar(require("./Rule"), exports);
|
|
|
36
37
|
__exportStar(require("./Scenario"), exports);
|
|
37
38
|
__exportStar(require("./StatusIcon"), exports);
|
|
38
39
|
__exportStar(require("./StepItem"), exports);
|
|
39
|
-
__exportStar(require("./StepList"), exports);
|
|
40
40
|
__exportStar(require("./Tags"), exports);
|
|
41
41
|
__exportStar(require("./Title"), exports);
|
|
42
42
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/gherkin/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwB;AACxB,+CAA4B;AAC5B,+CAA4B;AAC5B,6CAA0B;AAC1B,8CAA2B;AAC3B,gDAA6B;AAC7B,8CAA2B;AAC3B,iDAA8B;AAC9B,6CAA0B;AAC1B,kDAA+B;AAC/B,4CAAyB;AACzB,oDAAiC;AACjC,gDAA6B;AAC7B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/gherkin/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwB;AACxB,+CAA4B;AAC5B,+CAA4B;AAC5B,6CAA0B;AAC1B,8CAA2B;AAC3B,gDAA6B;AAC7B,8CAA2B;AAC3B,iDAA8B;AAC9B,6CAA0B;AAC1B,kDAA+B;AAC/B,4CAAyB;AACzB,oDAAiC;AACjC,gDAA6B;AAC7B,iDAA8B;AAC9B,6CAA0B;AAC1B,8CAA2B;AAC3B,4CAAyB;AACzB,wCAAqB;AACrB,8CAA2B;AAC3B,yCAAsB;AACtB,6CAA0B;AAC1B,+CAA4B;AAC5B,6CAA0B;AAC1B,yCAAsB;AACtB,0CAAuB"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Query as GherkinQuery } from '@cucumber/gherkin-utils';
|
|
2
2
|
import { TestStepResultStatus } from '@cucumber/messages';
|
|
3
3
|
import { Query as CucumberQuery } from '@cucumber/query';
|
|
4
|
+
import { EnvelopesQuery } from './EnvelopesQueryContext';
|
|
4
5
|
export declare function makeEmptyScenarioCountsByStatus(): Record<TestStepResultStatus, number>;
|
|
5
|
-
export default function countScenariosByStatuses(gherkinQuery: GherkinQuery, cucumberQuery: CucumberQuery): {
|
|
6
|
+
export default function countScenariosByStatuses(gherkinQuery: GherkinQuery, cucumberQuery: CucumberQuery, envelopesQuery: EnvelopesQuery): {
|
|
6
7
|
scenarioCountByStatus: Record<TestStepResultStatus, number>;
|
|
7
8
|
statusesWithScenarios: readonly TestStepResultStatus[];
|
|
8
9
|
totalScenarioCount: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"countScenariosByStatuses.d.ts","sourceRoot":"","sources":["../../src/countScenariosByStatuses.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAA;AACtF,OAAO,EAA0B,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AACjF,OAAO,EAAE,KAAK,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAExD,wBAAgB,+BAA+B,IAAI,MAAM,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAUtF;AAED,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAC9C,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"countScenariosByStatuses.d.ts","sourceRoot":"","sources":["../../src/countScenariosByStatuses.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAA;AACtF,OAAO,EAA0B,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AACjF,OAAO,EAAE,KAAK,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAExD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAExD,wBAAgB,+BAA+B,IAAI,MAAM,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAUtF;AAED,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAC9C,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,cAAc,GAC7B;IACD,qBAAqB,EAAE,MAAM,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAAA;IAC3D,qBAAqB,EAAE,SAAS,oBAAoB,EAAE,CAAA;IACtD,kBAAkB,EAAE,MAAM,CAAA;CAC3B,CAsCA"}
|
|
@@ -15,7 +15,7 @@ function makeEmptyScenarioCountsByStatus() {
|
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
17
|
exports.makeEmptyScenarioCountsByStatus = makeEmptyScenarioCountsByStatus;
|
|
18
|
-
function countScenariosByStatuses(gherkinQuery, cucumberQuery) {
|
|
18
|
+
function countScenariosByStatuses(gherkinQuery, cucumberQuery, envelopesQuery) {
|
|
19
19
|
const scenarioCountByStatus = makeEmptyScenarioCountsByStatus();
|
|
20
20
|
for (const gherkinDocument of gherkinQuery.getGherkinDocuments()) {
|
|
21
21
|
const counter = new gherkin_utils_1.GherkinDocumentWalker({}, {
|
|
@@ -24,8 +24,11 @@ function countScenariosByStatuses(gherkinQuery, cucumberQuery) {
|
|
|
24
24
|
throw new Error('Missing uri on gherkinDocument');
|
|
25
25
|
const pickleIds = gherkinQuery.getPickleIds(gherkinDocument.uri, scenario.id);
|
|
26
26
|
pickleIds.forEach((pickleId) => {
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
// if no test case then this pickle was omitted by filtering e.g. tags
|
|
28
|
+
if (envelopesQuery.hasTestCase(pickleId)) {
|
|
29
|
+
const status = (0, messages_1.getWorstTestStepResult)(cucumberQuery.getPickleTestStepResults([pickleId])).status;
|
|
30
|
+
scenarioCountByStatus[status] = scenarioCountByStatus[status] + 1;
|
|
31
|
+
}
|
|
29
32
|
});
|
|
30
33
|
},
|
|
31
34
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"countScenariosByStatuses.js","sourceRoot":"","sources":["../../src/countScenariosByStatuses.ts"],"names":[],"mappings":";;;AAAA,2DAAsF;AACtF,iDAAiF;
|
|
1
|
+
{"version":3,"file":"countScenariosByStatuses.js","sourceRoot":"","sources":["../../src/countScenariosByStatuses.ts"],"names":[],"mappings":";;;AAAA,2DAAsF;AACtF,iDAAiF;AAKjF,SAAgB,+BAA+B;IAC7C,OAAO;QACL,CAAC,+BAAoB,CAAC,OAAO,CAAC,EAAE,CAAC;QACjC,CAAC,+BAAoB,CAAC,OAAO,CAAC,EAAE,CAAC;QACjC,CAAC,+BAAoB,CAAC,MAAM,CAAC,EAAE,CAAC;QAChC,CAAC,+BAAoB,CAAC,MAAM,CAAC,EAAE,CAAC;QAChC,CAAC,+BAAoB,CAAC,SAAS,CAAC,EAAE,CAAC;QACnC,CAAC,+BAAoB,CAAC,OAAO,CAAC,EAAE,CAAC;QACjC,CAAC,+BAAoB,CAAC,SAAS,CAAC,EAAE,CAAC;KACp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