mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-07-01 14:56:12 +02:00
Encapsulate all multiline strings in triple-quotes in Gherkin files
Since pytest-bdd v8.0.0 uses the official Gherkin parser, multiline strings must now be encapsulated by triple-quotes. See: - https://pytest-bdd.readthedocs.io/en/stable/#id2 - https://pytest-bdd.readthedocs.io/en/stable/#docstrings
This commit is contained in:
parent
eb5fe6fef1
commit
5f937721bf
18 changed files with 344 additions and 11 deletions
|
@ -27,7 +27,7 @@ Feature: Searching in a journal
|
|||
When we run "jrnl tomorrow: A future entry."
|
||||
Then we should get no error
|
||||
When we run "jrnl -from today"
|
||||
Then the output should contain "2 entries found"
|
||||
Then the output should contain "2 entries found"
|
||||
And the output should contain "Adding an entry right now."
|
||||
And the output should contain "A future entry."
|
||||
And the output should not contain "This thing happened yesterday"
|
||||
|
@ -65,7 +65,9 @@ Feature: Searching in a journal
|
|||
Then we should get no error
|
||||
And the output should contain "1 entry found"
|
||||
And the output should be
|
||||
"""
|
||||
2020-08-29 11:11 Entry the first.
|
||||
"""
|
||||
|
||||
Examples: configs
|
||||
| config_file |
|
||||
|
@ -92,9 +94,11 @@ Feature: Searching in a journal
|
|||
Then we should get no error
|
||||
And the output should contain "3 entries found"
|
||||
And the output should be
|
||||
"""
|
||||
2020-08-29 11:11 Entry the first.
|
||||
2020-08-31 14:32 A second entry in what I hope to be a long series.
|
||||
2020-09-24 09:14 The third entry finally after weeks without writing.
|
||||
"""
|
||||
|
||||
Examples: configs
|
||||
| config_file |
|
||||
|
@ -108,7 +112,9 @@ Feature: Searching in a journal
|
|||
Then we should get no error
|
||||
And the output should contain "1 entry found"
|
||||
And the output should be
|
||||
"""
|
||||
2020-09-24 09:14 The third entry finally after weeks without writing.
|
||||
"""
|
||||
|
||||
Examples: configs
|
||||
| config_file |
|
||||
|
@ -219,19 +225,23 @@ Feature: Searching in a journal
|
|||
Then we should get no error
|
||||
When we run "jrnl -2"
|
||||
Then the output should be
|
||||
"""
|
||||
2013-07-23 09:00 Testing folder journal.
|
||||
|
||||
2014-03-07 16:37 Second entry of journal.
|
||||
"""
|
||||
|
||||
Scenario Outline: Searching for all tags should show counts of each tag
|
||||
Given we use the config "<config_file>"
|
||||
When we run "jrnl --tags"
|
||||
Then we should get no error
|
||||
And the output should be
|
||||
"""
|
||||
@tagtwo : 2
|
||||
@tagone : 2
|
||||
@tagthree : 1
|
||||
@ipsum : 1
|
||||
"""
|
||||
|
||||
Examples: configs
|
||||
| config_file |
|
||||
|
@ -244,8 +254,10 @@ Feature: Searching in a journal
|
|||
When we run "jrnl -from 'september 2020' --tags"
|
||||
Then we should get no error
|
||||
And the output should be
|
||||
"""
|
||||
@tagthree : 1
|
||||
@tagone : 1
|
||||
"""
|
||||
|
||||
Examples: configs
|
||||
| config_file |
|
||||
|
@ -257,8 +269,10 @@ Feature: Searching in a journal
|
|||
Given we use the config "<config_file>"
|
||||
When we run "jrnl --tags -not @tagtwo"
|
||||
Then the output should be
|
||||
"""
|
||||
@tagthree : 1
|
||||
@tagone : 1
|
||||
"""
|
||||
|
||||
Examples: configs
|
||||
| config_file |
|
||||
|
@ -270,7 +284,9 @@ Feature: Searching in a journal
|
|||
Given we use the config "<config_file>"
|
||||
When we run "jrnl --tags -not @tagone -not @tagthree"
|
||||
Then the output should be
|
||||
"""
|
||||
@tagtwo : 1
|
||||
"""
|
||||
|
||||
Examples: configs
|
||||
| config_file |
|
||||
|
@ -302,11 +318,13 @@ Feature: Searching in a journal
|
|||
When we run "jrnl -2"
|
||||
Then we should get no error
|
||||
And the output should be
|
||||
"""
|
||||
2013-06-09 15:39 My first entry.
|
||||
| Everything is alright
|
||||
|
||||
2013-06-10 15:40 Life is good.
|
||||
| But I'm better.
|
||||
"""
|
||||
|
||||
Scenario Outline: Searching by month
|
||||
Given we use the config "<config_file>"
|
||||
|
@ -381,8 +399,10 @@ Feature: Searching in a journal
|
|||
And we run "jrnl -today-in-history --short"
|
||||
Then the output should contain "2 entries found"
|
||||
And the output should be
|
||||
"""
|
||||
2019-08-31 01:01 Hi, from last year.
|
||||
2020-08-31 14:32 A second entry in what I hope to be a long series.
|
||||
"""
|
||||
|
||||
Examples: configs
|
||||
| config_file |
|
||||
|
@ -397,11 +417,13 @@ Feature: Searching in a journal
|
|||
Then we should get no error
|
||||
And the output should contain "3 entries found"
|
||||
And the output should be
|
||||
"""
|
||||
2013-05-17 11:39 This entry has tags!
|
||||
|
||||
2013-06-17 20:38 This entry has a location.
|
||||
|
||||
2013-07-17 11:38 This entry is starred!
|
||||
"""
|
||||
|
||||
Scenario Outline: Searching the most recent entry should not show found count
|
||||
Given we use the config "<config_file>"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue