Skip to content
This repository has been archived by the owner on Jul 3, 2023. It is now read-only.

Commit

Permalink
tests: add more tests for variable not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
gimler committed Jan 23, 2020
1 parent e2fd454 commit c6cc417
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/acceptance/GherkinParam.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ Feature: Parametrize Gherkin Feature
Then I should see "{{test}}" equals "42"
Then I should see "{{ test }}" equals "42"

Scenario: variable does not exist (exception)
Given I have a parameter "first" with value "42"
Then I should see "{{second}}" is null

Scenario: Scenario using table parameter
Given I have a parameter "my_param" with value "This is a test"
And I have a parameter "another_param" with value "3.14"
Expand Down
4 changes: 4 additions & 0 deletions tests/acceptance/GherkinParamArray.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ Feature: Parametrize Gherkin Feature (Array)
And I should see "{{test[3]}}" equals to "IV"
And I should see "{{test[4]}}" equals to "101"

Scenario: variable does not exist (exception)
Given I have an array "test" with values [1, two, 3.14, IV, 101]
Then I should see "{{second}}" is null

Scenario: Key not exist (exception)
Given I have an array "test" with values [1, two, 3.14, IV, 101]
Then I should see "{{test[9999]}}" is null
Expand Down

0 comments on commit c6cc417

Please sign in to comment.