mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-06-27 21:16:14 +02:00
Suppress "Entry added" message if using default journal (#1561)
* Suppress "Entry added to default journal" message if using default journal * Replace "Entry added" BDD test steps with "we should get no error" now that the message is suppressed * Add positive and negative tests for "Entry added" message behavior
This commit is contained in:
parent
bb6491bd06
commit
f65f07dbcb
7 changed files with 57 additions and 35 deletions
|
@ -49,7 +49,7 @@ Feature: Writing new entries.
|
|||
Given we use the config "<config_file>"
|
||||
And we use the password "bad doggie no biscuit" if prompted
|
||||
When we run "jrnl 23 july 2013: A cold and stormy day. I ate crisps on the sofa."
|
||||
Then the output should contain "Entry added"
|
||||
Then we should get no error
|
||||
When we run "jrnl -n 1"
|
||||
Then the output should contain "2013-07-23 09:00 A cold and stormy day."
|
||||
|
||||
|
@ -64,7 +64,7 @@ Feature: Writing new entries.
|
|||
Given we use the config "<config_file>"
|
||||
And we use the password "test" if prompted
|
||||
When we run "jrnl this is a partial --edit"
|
||||
Then the output should contain "Entry added"
|
||||
Then we should get no error
|
||||
Then the editor should have been called
|
||||
And the editor file content should be
|
||||
this is a partial
|
||||
|
@ -128,7 +128,7 @@ Feature: Writing new entries.
|
|||
Given we use the config "<config_file>"
|
||||
And we use the password "bad doggie no biscuit" if prompted
|
||||
When we run "jrnl 23 july 2013: A cold and stormy day. I ate crisps on the sofa."
|
||||
Then the output should contain "Entry added"
|
||||
Then we should get no error
|
||||
When we run "jrnl -n 1"
|
||||
Then the output should not contain "Life is good"
|
||||
|
||||
|
@ -143,7 +143,7 @@ Feature: Writing new entries.
|
|||
Given we use the config "<config_file>"
|
||||
And we use the password "bad doggie no biscuit" if prompted
|
||||
When we run "jrnl 04-24-2014: Created a new website - empty.com. Hope to get a lot of traffic."
|
||||
Then the output should contain "Entry added"
|
||||
Then we should get no error
|
||||
When we run "jrnl -1"
|
||||
Then the output should be
|
||||
2014-04-24 09:00 Created a new website - empty.com.
|
||||
|
@ -160,7 +160,7 @@ Feature: Writing new entries.
|
|||
Given we use the config "<config_file>"
|
||||
And we use the password "bad doggie no biscuit" if prompted
|
||||
When we run "jrnl 23 july 2013: 🌞 sunny day. Saw an 🐘"
|
||||
Then the output should contain "Entry added"
|
||||
Then we should get no error
|
||||
When we run "jrnl -n 1"
|
||||
Then the output should contain "🌞"
|
||||
And the output should contain "🐘"
|
||||
|
@ -217,7 +217,7 @@ Feature: Writing new entries.
|
|||
Scenario: Title with an embedded period on DayOne journal
|
||||
Given we use the config "dayone.yaml"
|
||||
When we run "jrnl 04-24-2014: Ran 6.2 miles today in 1:02:03. I am feeling sore because I forgot to stretch."
|
||||
Then the output should contain "Entry added"
|
||||
Then we should get no error
|
||||
When we run "jrnl -1"
|
||||
Then the output should be
|
||||
2014-04-24 09:00 Ran 6.2 miles today in 1:02:03.
|
||||
|
@ -226,7 +226,7 @@ Feature: Writing new entries.
|
|||
Scenario: Opening an folder that's not a DayOne folder should treat as folder journal
|
||||
Given we use the config "empty_folder.yaml"
|
||||
When we run "jrnl 23 july 2013: Testing folder journal."
|
||||
Then the output should contain "Entry added"
|
||||
Then we should get no error
|
||||
When we run "jrnl -1"
|
||||
Then the output should be "2013-07-23 09:00 Testing folder journal."
|
||||
|
||||
|
@ -313,3 +313,24 @@ Feature: Writing new entries.
|
|||
| basic_encrypted.yaml |
|
||||
| basic_folder.yaml |
|
||||
| basic_dayone.yaml |
|
||||
|
||||
Scenario Outline: No "Entry added" message should appear when writing to the default journal
|
||||
Given we use the config "<config_file>"
|
||||
And we use the password "test" if prompted
|
||||
When we run "jrnl This is a new entry"
|
||||
Then the output should not contain "Entry added"
|
||||
And we should get no error
|
||||
|
||||
Examples: configs
|
||||
| config_file |
|
||||
| basic_onefile.yaml |
|
||||
| basic_encrypted.yaml |
|
||||
| basic_folder.yaml |
|
||||
| basic_dayone.yaml |
|
||||
|
||||
Scenario: An "Entry added" message should appear when writing to a non-default journal
|
||||
Given we use the config "multiple.yaml"
|
||||
And we use the password "test" if prompted
|
||||
When we run "jrnl work This is a new entry"
|
||||
Then the output should contain "Entry added to work journal"
|
||||
And we should get no error
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue