Intellij-Plugin icon indicating copy to clipboard operation
Intellij-Plugin copied to clipboard

Step implementation: the parameter name in the annotation causes refactoring issues.

Open sswaroopgupta opened this issue 9 years ago • 1 comments

Expected behavior

The generated step implementation should be such that refactoring feature works seamlessly.

Actual behavior

The parameter name in the annotation causes refactoring issues.

Steps to reproduce

  1. Create a resource file file:resources/some.txt
  2. Create a spec
Specification Heading
=====================
Some scenario
-----------------
* Implements steps "with" <file:resources/some.txt> file parameters
|t2|
|d|
  1. The step implementation generates successfully.
  2. Try refactoring Implements steps <with> <file:resources/some.txt> file parameters <table> to Implements <with> <file:resources/some.txt> file parameters <table> and you will see the error
  3. If the file is renamed or moved, then it causes further refactoring failures

Information that will help us debug

IntelliJ IDEA 2016.1.2 Build #IC-145.972, built on May 14, 2016 JRE: 1.8.0_76-release-b162 x86_64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o OS information OSX Yosemite Version 10.10.5

Gauge IntelliJ plugin version. gauge-java-intellij-0.2.2.nightly-2016-08-12.zip

Does the project uses any Build tool(Gradle/Maven)? No

Run gauge -v on your system and paste the results here.

Gauge version: 0.6.2.nightly-2016-08-30

Plugins
-------
csharp (0.9.1.nightly-2016-08-12)
html-report (2.2.0.nightly-2016-08-28)
java (0.5.1.nightly-2016-08-18)
ruby (0.3.2.nightly-2016-08-22)
spectacle (0.0.1)
xml-report (0.1.4.nightly-2016-07-25)

sswaroopgupta avatar Aug 31 '16 06:08 sswaroopgupta

Refactoring this does not give any error.

But refactoring `* Implements steps "with" file:resources/someother.txt file parameters "" to Implements "with" file:resources/someother.txt file parameters

t2
d

with implementation

    @Step("Implements steps <with> <file1> file parameters <table> to Implements <with> <file2> file parameters <table>")
    public void implementation5(Object arg0, Object arg1, Object arg2, Object arg03, Object arg14, Object arg25) {
    }

to Implement steps <with> <file1> file parameters <table1> to Implements <with> <file2> file parameters <table> removes the last table parameter

sswaroopgupta avatar Aug 02 '18 07:08 sswaroopgupta