andriyko / sublime-robot-framework-assistant

Robot Framework plugin for Sublime Text3
MIT License
109 stars 43 forks source link

"Jump To Keyword" not working with Prefix Given/When/Then #209

Closed Noordsestern closed 6 years ago

Noordsestern commented 6 years ago

When describing testcases in BDD, Keywords start with a prefix given, when or then (ignore case).

Problem is: Jump To Keyword does not work in testcases written in Gherkin syntax.

Example of an executible test:

*** Testcases ***
My test story
    Given foo
    when bar
    tHen isSuccess

*** Keywords ***
foo
    print 'foo'

bar
    print 'bar'

isSuccess
    print 'ok'

Using Jump To Keyword on foo leads to Keyword not found in db.

It would be very helpful, if keywords could be found from within test stories, too.

aaltat commented 6 years ago

Did I get it right, that if you remove the prefix Given/When/Then then the Jump To Keyword works in your environment? If yes, I think you are right and the prefix is not removed when keyword is searching is done.

I think removing the prefix is a could be good feature to have, would you like to provide a PR to implement the feature?

aaltat commented 6 years ago

Done in #210