Comments (2)
I see. Since the outline parameter is surrounded by <> would you be able to do the coloring of all of the parameters based on the placeholder (column name in the Examples table) before substituting the value in there? The column names shouldn't contain any special characters and they should be discernible based on the <>. Then your match you are using for current non-outline parameters would work for the remaining parameter right?
I know that I don't know anything and I am oversimplifying lots of stuff so if this doesn't make any sense please let me know. I just wanted to share that incase it sparked an idea on your side.
Thanks for all of the work on the extension. It is working very well for me so far.
from deveroom-visualstudio.
This behavior is by design, but maybe not the best one.
The problem is that in case of an outline step, the location of the outline placeholders (<duration>
) and the location of the step parameters matched from the regex might be misaligned. Therefore the current behavior is:
- Color outline placeholders only if there are outline placeholders
- Color step parameters if there are no placeholders
A tricky example would be the following (this example does not make sense, of course, but it is hard to detect):
Let's consider this step definition
[When(@"this is a '([a-z ]*)' step")]
public void WhenFoo(string param)
{ }
And the following scenario outline
Scenario Outline: Parameter mix
When this is a '<param1>' step # step A
When this is <param2> step # step B
When this is <param3> tricky' step # step C
Examples:
| param1 | param2 | param3 |
| tricky | a 'tricky' | a 'very |
In this example
- Step A: the outline placeholders and the step parameters are aligned (like in your example), we could be color
<param1>
with both italic (placeholder) and brown (parameter) - Step B: the placeholder contains the parameter entirely. Probably in this case we should only color it as placeholder
- Step C: The placeholder and the parameter overlaps. I have no idea what coloring would make sense. Maybe color
<param3>
as placeholder andtricky
as step parameter?
It is also a problem to detect the situation, because the regex of the step definition might not even match to the step line with the placeholder. E.g. in my case the regex allows letters and spaces ([a-z ]*
) that does not match to <param1>
(because of the angle brackets).
from deveroom-visualstudio.
Related Issues (20)
- Code format is not working in .feature file HOT 1
- Exit code: 4 with SpecFlow 3.1.62 HOT 4
- Unable to generate steps (vs2019 16.4) HOT 6
- To investigate: SourceLocation.SourceFile is null and therefore the tracking position cannot be created HOT 1
- Scenario navigation drop-down HOT 3
- InvokeDiscovery: fails after project upgrade to .NET Core 3.0 HOT 23
- Error during binding discovery with x86 HOT 8
- Support renaming steps in feature file HOT 4
- VS2019 - When saving a single feature file a message box is displayed
- Support for Cucumber expressions HOT 1
- Step text completion not working HOT 1
- Exception on build with .Net 5 HOT 4
- Visual Studio warning: The project bindings could not be discovered HOT 8
- Test assembly not found HOT 7
- Support for Specflow 3.9.22 HOT 6
- Support for Visual Studio 2022 HOT 2
- Highlighting positioning is wrong if additional blanks after initial keyword
- InvokeDiscovery: Error during binding discovery HOT 5
- Error during binding discovery. HOT 1
- SpecFlow warning . Unable to generate step definitions, Navigation is blocked
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deveroom-visualstudio.