Add search tests so far (broken)

This commit is contained in:
Micah Jerome Ellison 2020-09-24 20:46:07 -07:00
parent bb5f7a830a
commit 5d9fe76f86

View file

@ -68,30 +68,57 @@ Feature: Searching in a journal
| basic_folder | | basic_folder |
| basic_dayone | | basic_dayone |
Scenario: Searching for a string within tag results @todo # Day One tag search is broken
Given we use the config "tags.yaml" Scenario Outline: Searching for a string within tag results
When we run "jrnl @idea -contains software" Given we use the config "<config>.yaml"
When we run "jrnl @tagone -contains maybe"
Then we should get no error Then we should get no error
And the output should contain "software" And the output should contain "maybe"
Scenario: Searching for a string within AND tag results Examples: configs
Given we use the config "tags.yaml" | config |
When we run "jrnl -and @journal @idea -contains software" | basic_onefile |
| basic_folder |
#| basic_dayone |
@todo # Day One tag search is broken
Scenario Outline: Searching for a string within AND tag results
Given we use the config "<config>.yaml"
When we run "jrnl -and @tagone @tagtwo -contains maybe"
Then we should get no error Then we should get no error
And the output should contain "software" And the output should contain "maybe"
Scenario: Searching for a string within NOT tag results Examples: configs
Given we use the config "tags.yaml" | config |
When we run "jrnl -not @dan -contains software" | basic_onefile |
| basic_folder |
#| basic_dayone |
@todo # Day One tag search is broken
Scenario Outline: Searching for a string within NOT tag results
Given we use the config "<config>.yaml"
When we run "jrnl -not @tagone -contains lonesome"
Then we should get no error Then we should get no error
And the output should contain "software" And the output should contain "lonesome"
Scenario: Searching for dates Examples: configs
Given we use the config "simple.yaml" | config |
When we run "jrnl -on 2013-06-10 --short" | basic_onefile |
Then the output should be "2013-06-10 15:40 Life is good." | basic_folder |
When we run "jrnl -on 'june 6 2013' --short" #| basic_dayone |
Then the output should be "2013-06-10 15:40 Life is good."
Scenario Outline: Searching for dates
Given we use the config "<config>.yaml"
When we run "jrnl -on 2020-08-31 --short"
Then the output should be "2020-08-31 14:32 A second entry in what I hope to be a long series."
When we run "jrnl -on 'august 31 2020' --short"
Then the output should be "2020-08-31 14:32 A second entry in what I hope to be a long series."
Examples: configs
| config |
| basic_onefile |
| basic_folder |
#| basic_dayone |
Scenario: Out of order entries to a Folder journal should be listed in date order Scenario: Out of order entries to a Folder journal should be listed in date order
Given we use the config "empty_folder.yaml" Given we use the config "empty_folder.yaml"