Skip to content

Fix string cucumber expression parameter completion#476

Open
RealByron wants to merge 5 commits intoalexkrechik:masterfrom
RealByron:fix_string_cucumber_expression_parameter_completion
Open

Fix string cucumber expression parameter completion#476
RealByron wants to merge 5 commits intoalexkrechik:masterfrom
RealByron:fix_string_cucumber_expression_parameter_completion

Conversation

@RealByron
Copy link
Copy Markdown

fix #470

@RobbieDixonBr-dge
Copy link
Copy Markdown

Changelog entry perhaps @RealByron ?

@RealByron
Copy link
Copy Markdown
Author

Changelog entry perhaps @RealByron ?

just done

@RobbieDixonBr-dge
Copy link
Copy Markdown

@alexkrechik is there someone with write access that can take a look at this PR please?

@alexkrechik
Copy link
Copy Markdown
Owner

@RobbieDixonBr-dge I'll will review it

@@ -1 +1,2 @@
this.When('I give 3/4 and 5$')
this.When('I ask {string} and {string} to {word}') No newline at end of file
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the original issue related to the pure steps option enabled? Don't see pureTextSteps: true in the #470 description.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope it concerns both values of pureTextSteps

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this action is not related to the pureTextSteps, then it would be better to add this step to the gserver/test/data/steps/cucumberExpressions.steps.js and add the corresponding test to the or gserver/test/cucumberExpressions.steps.handler.spec.ts or just add test in the describe('getCompletion' test. You could do this or I could make it later in this PR scope.

Comment thread gclient/CHANGELOG.md
@@ -1,3 +1,7 @@
## unreleased
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor, but this is not required, I'll add all the info during the release.

Comment thread gserver/test/steps.handler.spec.ts Outdated
expect(elements.length).to.be.eq(2);
expect(elements[0].text).to.be.eq('I give 3/4 and 5$');
expect(elements[1].text).to.be.eq('I ask {string} and {string} to {word}');
console.log(elements)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this console.log?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope, i will fix that

}

// we can replace each ("|')${xx}\\1 by "${xx}"
res = res.replace(/\(\"\|\'\)(\$\{.+?\})\\1/g, '"$1"');
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe move this after the line 360 for consistency? Something like this is already replacing there.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here it can handle smartSnippets or not ie: "${1:}" or ""

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I meant to just move this line up to add all the similar actions in one place

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line 360 only concerns replacement when smartSnippets is set to false.
line 364 should be applied regardless of smartSnippets option

@RobbieDixonBr-dge
Copy link
Copy Markdown

Happy New Year @alexkrechik @RealByron - not sure what is required to get this ticket moving again?

@alexkrechik
Copy link
Copy Markdown
Owner

I'm planning to review everything and make a release this/next week

@RobbieDixonBr-dge
Copy link
Copy Markdown

@alexkrechik bumping the release status?

3 similar comments
@RobbieDixonBr-dge
Copy link
Copy Markdown

@alexkrechik bumping the release status?

@RobbieDixonBr-dge
Copy link
Copy Markdown

@alexkrechik bumping the release status?

@RobbieDixonBr-dge
Copy link
Copy Markdown

@alexkrechik bumping the release status?

@alexkrechik
Copy link
Copy Markdown
Owner

@alexkrechik bumping the release status?

Unfortunately, numerous issues had piled up due to outdated libraries, making local testing of new features impossible. Consequently, I had to address #483. I still need to run auto-tests and retest all scenarios, but the good news is that core functionalities work locally with the newest version of all the vscode-related libs.

@alexkrechik alexkrechik added this to the 3.2.0 milestone Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Which cucumberautocomplete settings should I use to replace a {string} with "" double-quotes when autocompleting a step? Not ("|')[^\1]*\1 or ("|')\1

3 participants