title: python gherkin show error undefined step although I have already defined and execute the scenario successfully
body: <p>I have already defined and execute the successfully
  feature file:</p>
  <pre><code>@login
  Feature: Login
    Scenario: Login normal user
      Given we send a login API by user: admin
      Then we should get http status code is 200
  </code></pre>
  <p>steps:</p>
  <pre><code>@given(&quot;we send a login API by user: {user}&quot;)
  def login_api(context, user):
      if user == &quot;admin&quot;:
          user = User(&quot;admin&quot;, &quot;password123&quot;)
          authorization = AuthorizationAPI()
          context.response = authorization.authorize(user)
  
  @then(&quot;we should get http status code is {http_status_code}&quot;)
  def login_api(context, http_status_code):
      if str(context.response.status_code) != http_status_code:
          raise Exception(f&quot;actual status code: {context.response.status_code}, expect status code: {http_status_code}&quot;)
  </code></pre>
  <p>The problem is everything run OK, but the feature still display error &quot;Undefined step reference:...&quot;
  I don't know why IDEA show this error.
  view attached pictures</p>
  <p><a href="https://i.stack.imgur.com/BSZv3.jpg" rel="nofollow noreferrer">error</a></p>