Skip to content

Commit ea24fe8

Browse files
bn-jcundilllgandecki
authored andcommitted
tidy up
1 parent e0cf9cd commit ea24fe8

File tree

4 files changed

+7
-79
lines changed

4 files changed

+7
-79
lines changed

fixJson.js

Lines changed: 0 additions & 74 deletions
This file was deleted.

lib/createTestFromScenario.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const runTest = (scenario, stepsToRun, rowData) => {
2929
);
3030

3131
// eslint-disable-next-line func-names
32-
it(`Scenario: ${scenario.name}`, function() {
32+
it(scenario.name, function() {
3333
const state = window.testState;
3434
return cy
3535
.then(() => state.onStartScenario(scenario, indexedSteps))
@@ -40,12 +40,14 @@ const runTest = (scenario, stepsToRun, rowData) => {
4040
});
4141
};
4242

43+
const cleanupFilename = s => s.split(".")[0];
44+
4345
const writeCucumberJsonFile = json => {
4446
const outputFolder =
4547
window.cucumberJson.outputFolder || "cypress/cucumber-json";
4648
const outputPrefix = window.cucumberJson.filePrefix || "";
4749
const outputSuffix = window.cucumberJson.fileSuffix || ".cucumber";
48-
const fileName = json[0] ? json[0].uri : "empty";
50+
const fileName = json[0] ? cleanupFilename(json[0].uri) : "empty";
4951
const outFile = `${outputFolder}/${outputPrefix}${fileName}${outputSuffix}.json`;
5052
cy.writeFile(outFile, json, { log: false });
5153
};
@@ -56,7 +58,7 @@ const createTestFromScenarios = (
5658
testState
5759
) => {
5860
// eslint-disable-next-line func-names
59-
describe(`Feature: ${testState.feature.name}`, function() {
61+
describe(testState.feature.name, function() {
6062
before(() => {
6163
cy.then(() => testState.onStartTest());
6264
});

lib/cukejson/cucumberDataCollector.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class CucumberDataCollector {
2121
Cypress.log({
2222
name: "step",
2323
displayName: step.keyword,
24-
message: `**${step.text}**`,
24+
message: `${step.text}`,
2525
consoleProps: () => ({ feature: this.uri, step })
2626
});
2727
};

lib/loader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ module.exports = (spec, filePath = this.resourcePath) => {
3939
sdPath => `require('${sdPath}')`
4040
);
4141
return createCucumber(
42-
path.basename(filePath, ".feature"),
42+
path.basename(filePath),
4343
cucumberJson,
4444
spec,
4545
stepDefinitionsToRequire

0 commit comments

Comments
 (0)