Closed ginkel closed 5 years ago
Since the specs directory can be configured per environment now, we can't rely on the environment files to determine the specs directory location.
To fix this, we need to add a configuration in IntelliJ so that the user is able to change the specs directory as per their needs. The configuration should take a comma separated list of spec directories.
Makes sense.
What do you think about initializing the defaults of the plugin's configuration for a project based upon the setting in the Gauge default environment? I think the setting read from that env would be correct in many cases and reduce the manual configuration effort for many developers. Still, it would be possible to overwrite that inferred default from the plugin settings.
@ginkel Relying on the default environment may not work. There is no mandate in Gauge for the presence of default
environment. Gauge can be run properly even if an environment by the name default
is not found. If we rely on getting the settings from the default
environment, we are indirectly mandating users to have an environment with this name. So I suggest not to do this.
Instead have a configuration in IntelliJ where users can configure the spec directories.
With the proposed fix, it seems that user needs to declare specs directories in 2 places: environment files and the plugin configuration. Not sure this is ideal.
Why not reading spec directories from all the environment files and default to specs
if non is found?
The fix should be available in nightly >= 5-4-2019
This issue has been verified and found fixed with the below version.
0.3.15.nightly-2019-04-11
We are using Gauge in a Maven-based Java project and put the specs in a somewhat unusual location by Gauge's standards, but in line with Maven conventions, namely
src/test/specs
. Gauge is configured accordingly by settinggauge_specs_dir = src/test/specs
inenv/defaut/default.properties
.Unfortunately, this causes the Gauge IntelliJ plugin to not correctly detect the specs, i.e., the little play buttons on the left-hand side of the editor window are unavailable and Ctrl-clicking on a step does not open the step definition.
Strangely, this can be worked around by creating a empty
specs
directory in the project root (and the plugin will magically start discovering the specs insrc/test/specs
), but I'd assume settinggauge_specs_dir
would be supported by the plugin.Expected behavior
The IntelliJ Gauge plugin detects specs located in a non-standard location if configured via
default.properties
.Actual behavior
Specs are not correctly detected and Ctrl-clicking on a step does not work.
Steps to reproduce
src/test/specs
by settinggauge_specs_dir
inenv/defaut/default.properties
src/test/specs
specs
dir in the project rootsrc/test/specs
starting to be recognizedVersion information