-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(#65) Add tests for the tags command
- Loading branch information
1 parent
6f9efbf
commit 71e9e7d
Showing
2 changed files
with
69 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
Feature: Tags command | ||
As a newcomer to lpn | ||
I want to be able to list the available tags for an image type | ||
|
||
Scenario Outline: List available tags without pagination | ||
When I run `lpn tags <type>` | ||
Then the output should contain: | ||
""" | ||
elements in page 1 of | ||
""" | ||
And the exit status should be 0 | ||
|
||
Examples: | ||
| type | | ||
| ce | | ||
| commerce | | ||
| dxp | | ||
| nightly | | ||
| release | | ||
|
||
Scenario Outline: List available tags with pagination | ||
When I run `lpn tags <type> -p 2 -s 2` | ||
Then the output should contain: | ||
""" | ||
elements in page 2 of | ||
""" | ||
And the exit status should be 0 | ||
|
||
Examples: | ||
| type | | ||
| ce | | ||
| commerce | | ||
| dxp | | ||
| nightly | | ||
| release | | ||
|
||
Scenario Outline: List available tags with size | ||
When I run `lpn tags <type> -s 2` | ||
Then the output should contain: | ||
""" | ||
showing 2 elements in page 1 of | ||
""" | ||
And the exit status should be 0 | ||
|
||
Examples: | ||
| type | | ||
| ce | | ||
| commerce | | ||
| dxp | | ||
| nightly | | ||
| release | | ||
|
||
Scenario Outline: Inform that the combination of page and size produces a not found resource error | ||
When I run `lpn tags <type> -p 103` | ||
Then the output should contain: | ||
""" | ||
There are no available tags for that pagination. Please use --page and --size arguments to filter properly | ||
""" | ||
And the exit status should be 0 | ||
|
||
Examples: | ||
| type | | ||
| ce | | ||
| commerce | | ||
| dxp | | ||
| nightly | | ||
| release | |