mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-20 04:58:32 +02:00
Compress tests into one Scenario Outline
This commit is contained in:
parent
0355af936c
commit
e246a9c0b3
1 changed files with 20 additions and 71 deletions
|
@ -214,82 +214,31 @@ Feature: Searching in a journal
|
|||
| But I'm better.
|
||||
"""
|
||||
|
||||
Scenario: Searching entries by numerical month
|
||||
Scenario Outline: Searching by month, day, or year
|
||||
Given we use the config "dates_similar.yaml"
|
||||
When we run "jrnl -month 2"
|
||||
When we run "jrnl <args>"
|
||||
Then we should get no error
|
||||
And the output should be
|
||||
and the output should be
|
||||
"""
|
||||
2018-02-04 06:04 Today is 2018-02-04.
|
||||
<entry1>
|
||||
|
||||
2020-02-05 12:10 Today is 2020-02-05.
|
||||
"""
|
||||
|
||||
Scenario: Searching entries by full month string
|
||||
Given we use the config "dates_similar.yaml"
|
||||
When we run "jrnl -month February"
|
||||
Then we should get no error
|
||||
And the output should be
|
||||
"""
|
||||
2018-02-04 06:04 Today is 2018-02-04.
|
||||
|
||||
2020-02-05 12:10 Today is 2020-02-05.
|
||||
"""
|
||||
|
||||
Scenario: Searching entries by "Mmm" month
|
||||
Given we use the config "dates_similar.yaml"
|
||||
When we run "jrnl -month Feb"
|
||||
Then we should get no error
|
||||
And the output should be
|
||||
"""
|
||||
2018-02-04 06:04 Today is 2018-02-04.
|
||||
|
||||
2020-02-05 12:10 Today is 2020-02-05.
|
||||
"""
|
||||
|
||||
Scenario: Searching entries by day
|
||||
Given we use the config "dates_similar.yaml"
|
||||
When we run "jrnl -day 5"
|
||||
Then we should get no error
|
||||
And the output should be
|
||||
"""
|
||||
2018-03-05 08:06 Today is 2018-03-05.
|
||||
|
||||
2020-02-05 12:10 Today is 2020-02-05.
|
||||
"""
|
||||
|
||||
Scenario: Searching entries by full year
|
||||
Given we use the config "dates_similar.yaml"
|
||||
When we run "jrnl -year 2018"
|
||||
Then we should get no error
|
||||
And the output should be
|
||||
"""
|
||||
2018-02-04 06:04 Today is 2018-02-04.
|
||||
|
||||
2018-03-05 08:06 Today is 2018-03-05.
|
||||
"""
|
||||
|
||||
Scenario: Searching entries by "yy" year
|
||||
Given we use the config "dates_similar.yaml"
|
||||
When we run "jrnl -year 18"
|
||||
Then we should get no error
|
||||
And the output should be
|
||||
"""
|
||||
2018-02-04 06:04 Today is 2018-02-04.
|
||||
|
||||
2018-03-05 08:06 Today is 2018-03-05.
|
||||
"""
|
||||
|
||||
Scenario: Searching entries by day and month
|
||||
Given we use the config "dates_similar.yaml"
|
||||
When we run "jrnl -month 1 -day 3"
|
||||
Then we should get no error
|
||||
And the output should be
|
||||
"""
|
||||
2019-01-03 10:08 Today is 2019-01-03.
|
||||
|
||||
2021-01-03 15:39 Today is 2021-01-03.
|
||||
<entry2>
|
||||
"""
|
||||
Examples: month
|
||||
| args | entry1 | entry2 |
|
||||
| -month 2 | 2018-02-04 06:04 Hi. | 2020-02-05 12:10 Hi. |
|
||||
| -month February | 2018-02-04 06:04 Hi. | 2020-02-05 12:10 Hi. |
|
||||
| -month Feb | 2018-02-04 06:04 Hi. | 2020-02-05 12:10 Hi. |
|
||||
Examples: day
|
||||
| args | entry1 | entry2 |
|
||||
| -day 5 | 2018-03-05 08:06 Hi. | 2020-02-05 12:10 Hi. |
|
||||
Examples: year
|
||||
| args | entry1 | entry2 |
|
||||
| -year 2018 | 2018-02-04 06:04 Hi. | 2018-03-05 08:06 Hi. |
|
||||
| -year 18 | 2018-02-04 06:04 Hi. | 2018-03-05 08:06 Hi. |
|
||||
Examples: month and day
|
||||
| args | entry1 | entry2 |
|
||||
| -month 1 -day 3 | 2019-01-03 10:08 Hi. | 2021-01-03 15:39 Hi. |
|
||||
|
||||
Scenario: Loading a DayOne Journal
|
||||
Given we use the config "dayone.yaml"
|
||||
|
|
Loading…
Add table
Reference in a new issue