Clarify and cleanup tests

- Run formatter
- Take out old tags
- Use new steps on tests

Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
This commit is contained in:
Jonathan Wren 2021-05-22 14:15:43 -07:00
parent 44b1762b7d
commit b7b7bad2fb
5 changed files with 44 additions and 25 deletions

View file

@ -3,8 +3,8 @@ Feature: Encrypting and decrypting journals
Scenario: Decrypting a journal
Given we use the config "encrypted.yaml"
When we run "jrnl --decrypt" and enter "bad doggie no biscuit"
Then we should see the message "Journal decrypted"
Then the config for journal "default" should have "encrypt" set to "bool:False"
And we should see the message "Journal decrypted"
When we run "jrnl -99 --short"
Then the output should be
2013-06-09 15:39 My first entry.

View file

@ -4,30 +4,32 @@ Feature: Multiple journals
Given we use the config "multiple.yaml"
When we run "jrnl -99 --short"
Then the output should be
@todo something
2013-06-09 15:39 My first entry.
2013-06-10 15:40 Life is good.
When we run "jrnl work -99 --short"
Then the output should be
@todo something
Then the output should be empty
Scenario: Write to default config by default
Given we use the config "multiple.yaml"
When we run "jrnl this goes to default"
When we run "jrnl -99 --short"
Then the output should be
@todo something
Then the output should contain
2013-06-09 15:39 My first entry.
2013-06-10 15:40 Life is good.
Then the output should contain
this goes to default
When we run "jrnl work -99 --short"
Then the output should be
@todo something
Then the output should be empty
Scenario: Write to specified journal
Given we use the config "multiple.yaml"
When we run "jrnl work a long day in the office"
When we run "jrnl -99 --short"
Then the output should be
@todo something
2013-06-09 15:39 My first entry.
2013-06-10 15:40 Life is good.
When we run "jrnl work -99 --short"
Then the output should be
@todo something
Then the output should contain "a long day in the office"
Scenario: Tell user which journal was used
Given we use the config "multiple.yaml"
@ -39,29 +41,32 @@ Feature: Multiple journals
When we run "jrnl work 23 july 2012: a long day in the office"
When we run "jrnl -99 --short"
Then the output should be
@todo something
2013-06-09 15:39 My first entry.
2013-06-10 15:40 Life is good.
When we run "jrnl work -99 --short"
Then the output should be
@todo something
2012-07-23 09:00 a long day in the office
Scenario: Write to specified journal without a timestamp but with colon
Given we use the config "multiple.yaml"
When we run "jrnl work : a long day in the office"
Then the output should be
@todo something
2013-06-09 15:39 My first entry.
2013-06-10 15:40 Life is good.
When we run "jrnl work -99 --short"
Then the output should be
@todo something
Then the output should be contain
a long day in the office
Scenario: Write to specified journal without a timestamp but with colon
Given we use the config "multiple.yaml"
When we run "jrnl work: a long day in the office"
When we run "jrnl -99 --short"
Then the output should be
@todo something
2013-06-09 15:39 My first entry.
2013-06-10 15:40 Life is good.
When we run "jrnl work -99 --short"
Then the output should be
@todo something
Then the output should contain
a long day in the office
Scenario: Create new journals as required
Given we use the config "multiple.yaml"
@ -69,7 +74,7 @@ Feature: Multiple journals
When we run "jrnl ideas 23 july 2012: sell my junk on ebay and make lots of money"
When we run "jrnl ideas -99 --short"
Then the output should be
@todo something
2012-07-23 09:00 sell my junk on ebay and make lots of money
Scenario: Don't crash if no default journal is specified
Given we use the config "bug343.yaml"

View file

@ -267,7 +267,7 @@ Feature: Searching in a journal
Scenario Outline: Searching today in history
Given we use the config "<config_file>"
And we use the password "test" if prompted
And we set current date and time to "2020-08-31 14:32"
And now is "2020-08-31 02:32:00 PM"
When we run "jrnl 2019-08-31 01:01: Hi, from last year."
And we run "jrnl -today-in-history --short"
Then the output should be