Move remaining tests from behave to pytest (#1346)

* add newer tests to pytest (from behave)

* remove 'lib' from gitignore (since we're using it)

* fix capitalization in some steps

* add 'the editor should not have been called' step

* comment out config override step in pytest-bdd since it's not implemented yet

* remove test that didn't really test anything

* implement some missing steps in pytest-bdd

* change comment to match other tests
This commit is contained in:
Jonathan Wren 2021-10-02 13:31:21 -07:00 committed by GitHub
parent 593245f3fd
commit 7d8823da6d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 167 additions and 5 deletions

View file

@ -1,5 +1,33 @@
Feature: Custom formats
Scenario Outline: Short printing via --format flag
Given we use the config "<config_file>"
And we use the password "test" if prompted
When we run "jrnl --format short -3"
Then we should get no error
Examples: configs
| config_file |
| basic_onefile.yaml |
| basic_encrypted.yaml |
| basic_folder.yaml |
| basic_dayone.yaml |
Scenario Outline: Pretty Printing aka the Default
Given we use the config "<config_file>"
And we use the password "test" if prompted
When we run "jrnl --format pretty -3"
Then we should get no error
Examples: configs
| config_file |
| basic_onefile.yaml |
| basic_encrypted.yaml |
| basic_folder.yaml |
| basic_dayone.yaml |
Scenario Outline: JSON format
Given we use the config "<config_file>"
And we use the password "test" if prompted
@ -296,6 +324,22 @@ Feature: Custom formats
| basic_folder.yaml |
| basic_dayone.yaml |
Scenario Outline: Export fancy with small linewrap
Given we use the config "<config_file>"
And we use the password "test" if prompted
When we run "jrnl --config-override linewrap 35 --format fancy -3"
Then we should get no error
And the output should be 35 columns wide
Examples: configs
| config_file |
| basic_onefile.yaml |
| basic_encrypted.yaml |
| basic_folder.yaml |
| basic_dayone.yaml |
@todo
Scenario Outline: Exporting fancy
# Needs better emoji support