fix more tests

This commit is contained in:
Jonathan Wren 2022-06-04 17:08:29 -07:00
parent c325ba38ea
commit 5cb46f572d
10 changed files with 40 additions and 26 deletions

View file

@ -2,8 +2,8 @@ Feature: Encrypting and decrypting journals
Scenario: Decrypting a journal
Given we use the config "encrypted.yaml"
# And we use the password "bad doggie no biscuit" if prompted
When we run "jrnl --decrypt" and enter "bad doggie no biscuit"
And we use the password "bad doggie no biscuit" if prompted
When we run "jrnl --decrypt"
Then the output should contain "Journal decrypted"
And the config for journal "default" should contain "encrypt: false"
When we run "jrnl -99 --short"
@ -46,7 +46,7 @@ Feature: Encrypting and decrypting journals
Scenario Outline: Running jrnl with encrypt: true on unencryptable journals
Given we use the config "<config_file>"
When we run "jrnl --config-override encrypt true here is a new entry"
Then the error output should contain "this type of journal can't be encrypted"
Then the error output should contain "journal can't be encrypted"
Examples: configs
| config_file |

View file

@ -429,7 +429,7 @@ Feature: Custom formats
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"
Then the output should contain "YAML export must be to a directory"
And the output should not contain "Traceback"
Examples: configs

View file

@ -87,7 +87,7 @@ Feature: Multiple journals
these three eyes
these three eyes
n
Then the output should contain "Encrypted journal 'new_encrypted' created"
Then the output should contain "Journal 'new_encrypted' created at"
Scenario: Read and write to journal with emoji name
Given we use the config "multiple.yaml"

View file

@ -29,7 +29,8 @@ Feature: Starring entries
Scenario: Starring an entry will mark it in an encrypted journal
Given we use the config "encrypted.yaml"
When we run "jrnl 20 july 2013 *: Best day of my life!" and enter "bad doggie no biscuit"
And we use the password "bad doggie no biscuit" if prompted
When we run "jrnl 20 july 2013 *: Best day of my life!"
Then the output should contain "Entry added"
When we run "jrnl -on 2013-07-20 -starred" and enter "bad doggie no biscuit"
Then the output should contain "2013-07-20 09:00 Best day of my life!"

View file

@ -49,6 +49,6 @@ Feature: Upgrading Journals from 1.x.x to 2.x.x
When we run "jrnl --list" and enter
Y
bad doggie no biscuit
Then the output should contain "Error: features/journals/missing.journal does not exist."
Then the output should contain "features/journals/missing.journal does not exist."
And the output should contain "We're all done"
And we should get no error

View file

@ -233,8 +233,7 @@ Feature: Writing new entries.
And we append to the editor if opened
[2021-11-13] worked on jrnl tests
When we run "jrnl --edit"
Then the output should contain
[1 entry added]
Then the output should contain "1 entry added"
Examples: configs
| config_file |
@ -252,8 +251,7 @@ Feature: Writing new entries.
[2021-11-12] worked on jrnl tests again
[2021-11-13] worked on jrnl tests a little bit more
When we run "jrnl --edit"
Then the output should contain
[3 entries added]
Then the error output should contain "3 entries added"
Examples: configs
| config_file |
@ -269,8 +267,8 @@ Feature: Writing new entries.
And we write to the editor if opened
[2021-11-13] I am replacing my whole journal with this entry
When we run "jrnl --edit"
Then the output should contain
[2 entries deleted, 1 entry modified]
Then the output should contain "2 entries deleted"
Then the output should contain "1 entry modified"
Examples: configs
| config_file |
@ -287,7 +285,7 @@ Feature: Writing new entries.
[2021-11-13] I am replacing the last entry with this entry
When we run "jrnl --edit -1"
Then the output should contain
[1 entry modified]
1 entry modified
Examples: configs
| config_file |
@ -304,7 +302,7 @@ Feature: Writing new entries.
This is a small addendum to my latest entry.
When we run "jrnl --edit"
Then the output should contain
[1 entry modified]
1 entry modified
Examples: configs
| config_file |