mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-07-10 01:16:12 +02:00
Merge branch 'develop' into change-time
This commit is contained in:
commit
1c65ba76df
14 changed files with 111 additions and 45 deletions
|
@ -85,7 +85,6 @@ Feature: Multiple journals
|
|||
Then the output should contain "Journal encrypted to features/journals/basic_onefile.journal"
|
||||
And the config should contain "encrypt: false"
|
||||
|
||||
|
||||
Scenario: Don't overwrite main config when decrypting a journal in an alternate config
|
||||
Given the config "editor_encrypted.yaml" exists
|
||||
And we use the password "bad doggie no biscuit" if prompted
|
||||
|
@ -93,3 +92,14 @@ Feature: Multiple journals
|
|||
When we run "jrnl --cf editor_encrypted.yaml --decrypt"
|
||||
Then the config should contain "encrypt: true"
|
||||
And the output should not contain "Wrong password"
|
||||
|
||||
Scenario: Show an error message when the config file is empty
|
||||
Given we use the config "empty_file.yaml"
|
||||
When we run "jrnl -1"
|
||||
Then the error output should contain "Unable to parse config file"
|
||||
|
||||
Scenario: Show an error message when using --config-file with empty file
|
||||
Given the config "empty_file.yaml" exists
|
||||
And we use the config "basic_onefile.yaml"
|
||||
When we run "jrnl --cf empty_file.yaml"
|
||||
Then the error output should contain "Unable to parse config file"
|
||||
|
|
|
@ -425,6 +425,20 @@ Feature: Custom formats
|
|||
| basic_folder.yaml |
|
||||
# | basic_dayone.yaml |
|
||||
|
||||
Scenario Outline: Exporting YAML to nonexistent directory leads to user-friendly error with no traceback
|
||||
Given we use the config "<config_file>"
|
||||
And we use the password "test" if prompted
|
||||
When we run "jrnl --export yaml --file nonexistent_dir"
|
||||
Then the output should contain "YAML export must be to individual files"
|
||||
And the output should not contain "Traceback"
|
||||
|
||||
Examples: configs
|
||||
| config_file |
|
||||
| basic_onefile.yaml |
|
||||
| basic_encrypted.yaml |
|
||||
| basic_folder.yaml |
|
||||
| basic_dayone.yaml |
|
||||
|
||||
@skip_win # @todo YAML exporter does not correctly export emoji on Windows
|
||||
Scenario Outline: Add a blank line to YAML export if there isn't one already
|
||||
# https://github.com/jrnl-org/jrnl/issues/768
|
||||
|
|
|
@ -73,12 +73,12 @@ Feature: Writing new entries.
|
|||
| basic_dayone.yaml |
|
||||
| basic_folder.yaml |
|
||||
|
||||
Scenario Outline: Writing an empty entry from the editor should yield "Nothing saved to file" message
|
||||
Scenario Outline: Writing an empty entry from the editor should yield "No entry to save" message
|
||||
Given we use the config "<config_file>"
|
||||
And we write nothing to the editor if opened
|
||||
And we use the password "test" if prompted
|
||||
When we run "jrnl --edit"
|
||||
Then the error output should contain "Nothing saved to file"
|
||||
Then the error output should contain "No entry to save, because no text was received"
|
||||
And the editor should have been called
|
||||
|
||||
Examples: configs
|
||||
|
@ -89,6 +89,20 @@ Feature: Writing new entries.
|
|||
| basic_encrypted.yaml |
|
||||
| basic_onefile.yaml |
|
||||
|
||||
Scenario Outline: Writing an empty entry from the command line should yield "No entry to save" message
|
||||
Given we use the config "<config_file>"
|
||||
And we use the password "test" if prompted
|
||||
When we run "jrnl" and enter "\x04"
|
||||
Then the error output should contain "No entry to save, because no text was received"
|
||||
When we run "jrnl" and enter " \t \n \x04"
|
||||
Then the error output should contain "No entry to save, because no text was received"
|
||||
|
||||
Examples: configs
|
||||
| config_file |
|
||||
| basic_onefile.yaml |
|
||||
| basic_encrypted.yaml |
|
||||
| basic_folder.yaml |
|
||||
| basic_dayone.yaml |
|
||||
|
||||
Scenario Outline: Writing an empty entry from the command line with no editor should yield nothing
|
||||
Given we use the config "<config_file>"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue