Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@ in steps causes error #89

Open
MarekSlaninka opened this issue Apr 18, 2023 · 2 comments
Open

@ in steps causes error #89

MarekSlaninka opened this issue Apr 18, 2023 · 2 comments

Comments

@MarekSlaninka
Copy link

Describe the bug
When there is @ in step description, like in email address, library will throw error:
["File: file:///....../logout.feature unexpected end of file, expected: #TagLine, #ScenarioLine, #Comment, #Empty"]

To Reproduce
Steps to reproduce the behavior:

  1. Use email address in step:
    When  User types text "[email protected]" into "email" input

Expected behavior
Library should not read it like a tag, if @ is in quotation marks

Additional context
Add any other context about the problem here.

  • XCode Version: XCode 14.3
  • CucumberSwift Version: 4.2.2
  • Example Feature File:
  #
# **************************************************************************************************
#                      Copyright (C) 2019 Surglogs Inc. - All Rights Reserved
# **************************************************************************************************
# This file is proprietary and confidential. Unauthorized COPYING of this file or any part of its
# content, via ANY MEDIUM, is strictly PROHIBITED.
# **************************************************************************************************
#

@authentication @logout
Feature: Logout

  Allows the User to log out from the Application.

  Key aspects:
  • The User needs to be logged in in order to be able to log out.

  Background:

    Given No user is logged in
    And   'Login' screen is displayed

  # MAIN -------------------------------------------------------------------------------------------

  @C1180178 @main @qa-ready
  Scenario: Log out
    
    When  User types text "[email protected]" into "email" input
    And   User types text "123456" into "password" input
    And   User clicks on "log in" button
    Then  User should see 'Pin' screen
    When  User clicks on "log out" button
    Then  User should see dialog:
      | CONTENT  | Are you sure you want to log out from clinic? |
      | POSITIVE | Yes                                           |
      | NEGATIVE | No                                            |
    When  User clicks on dialog "Yes" button
    Then  User should not see any dialog
    And   User should see 'Login' screen

@MarekSlaninka
Copy link
Author

Any update, please?

@Tyler-Keith-Thompson
Copy link
Collaborator

Apologies, this one is a bit tricky because it's not the presence of quotes that has any effect on it. I haven't hide time to track down what exactly the rules are. My guess is that there's something akin to "tags can only show up at the beginning of a line" or "tags shouldn't be parsed if you're already parsing a known entity like a step or feature" but I need to understand what the spec says about it.

In the meantime, you can work around this by escaping it:
When User types text "test\@surglogs.com" into "email" input

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants