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

'And' step keyword add to more constraint #144

Open
midoriiro opened this issue Oct 8, 2023 · 0 comments
Open

'And' step keyword add to more constraint #144

midoriiro opened this issue Oct 8, 2023 · 0 comments

Comments

@midoriiro
Copy link

midoriiro commented Oct 8, 2023

The following feature tests does not works as expected:

Feature: HostName
  
  Scenario: Non wild carded Localhost hostname 
    Given a hostname with name 'localhost'
    And its not wild carded
    When I verify if its equals to localhost
    Then name should be equals to localhost  
    And representation string should be 'localhost'
    
  Scenario: Wild carded localhost hostname 
    Given a hostname with name 'localhost'
    And its wild carded 
    Then representation string should be '*.localhost'

The issue is with the step And its not wild carded if I decorated it with 'Given' attribute the test runner will not recognized it as is. I should be able to define all my 'Given/And' steps with the 'Given' attribute in my C# code. I'm using pytest-bdd for other projects and the 'And' step does not exists as is. You can define any 'Given' step you want and the two below scenario will work as expected.

EDIT: Just adding that step 'representation string should be 'localhost'' related C# method need to be decorated with 'Then' and 'And' attribute, I should be able to decorate that method once with 'Then' attribute.

Do I missing something with this library ?

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

1 participant