Details
-
Type: Bug
-
Status: Open
-
Priority: Major
-
Resolution: Unresolved
-
Affects Version/s: 3.9
-
Fix Version/s: None
-
Component/s: Core
-
Labels:None
-
Number of attachments :
Description
I started to use Keyword Synonyms to allow steps to be found like 'Given|GIVEN|given' etc.
I used a custom keywords bundle (see attachments) which worked correctly and found my custom keywords as expected.
However I cannot now find steps annotated like this :
@Then("I navigate to admin page")
@Given("I am on the admin page and logged in")
public static void loggedIntoAdmin()
The JIRA text is :
Given a given customer is selected
And I am on the admin page and logged in
Note : The Given step and the And Step are in the same class.
This works fine if I do not use Synonyms on the Given step.
It's got nothing to do with synonyms. You're not finding the And step because you're annotating the same method both as @Then and a @When. It's finding it as a Then step and therefore not matching the And - which following Given is interpreted as another Given.
Methods are meant to be annotated only by one of @Given @When or @Then.