mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-20 21:18:32 +02:00
add more journal type tests to import feature
This commit is contained in:
parent
7b2e35c752
commit
8483d36208
1 changed files with 83 additions and 55 deletions
|
@ -1,14 +1,23 @@
|
|||
Feature: Importing data
|
||||
|
||||
Scenario: --import allows new entry from stdin
|
||||
Given we use the config "simple.yaml"
|
||||
Scenario Outline: --import allows new entry from stdin
|
||||
Given we use the config "<config>.yaml"
|
||||
And we use the password "test" if prompted
|
||||
When we run "jrnl --import" and pipe "[2020-07-05 15:00] Observe and import."
|
||||
And we run "jrnl -1"
|
||||
Then the journal should contain "[2020-07-05 15:00] Observe and import."
|
||||
And the output should contain "Observe and import"
|
||||
Then we flush the output
|
||||
When we run "jrnl -c import"
|
||||
Then the output should contain "Observe and import"
|
||||
|
||||
Scenario: --import allows new large entry from stdin
|
||||
Given we use the config "simple.yaml"
|
||||
Examples: Configs
|
||||
| config |
|
||||
| basic_onefile |
|
||||
| basic_encrypted |
|
||||
# | basic_folder | @todo
|
||||
# | basic_dayone | @todo
|
||||
|
||||
Scenario Outline: --import allows new large entry from stdin
|
||||
Given we use the config "<config>.yaml"
|
||||
And we use the password "test" if prompted
|
||||
When we run "jrnl --import" and pipe
|
||||
"""
|
||||
[2020-07-05 15:00] Observe and import.
|
||||
|
@ -19,14 +28,22 @@ Feature: Importing data
|
|||
tellus placerat, sed ultricies metus bibendum. Duis eget venenatis erat. In at
|
||||
dolor dui end of entry.
|
||||
"""
|
||||
And we run "jrnl -1"
|
||||
Then the journal should contain "[2020-07-05 15:00] Observe and import."
|
||||
And the output should contain "Observe and import"
|
||||
Then we flush the output
|
||||
When we run "jrnl -on 2020-07-05"
|
||||
Then the output should contain "2020-07-05 15:00 Observe and import."
|
||||
And the output should contain "Lorem ipsum"
|
||||
And the output should contain "end of entry."
|
||||
|
||||
Scenario: --import allows multiple new entries from stdin
|
||||
Given we use the config "simple.yaml"
|
||||
Examples: Configs
|
||||
| config |
|
||||
| basic_onefile |
|
||||
| basic_encrypted |
|
||||
# | basic_folder | @todo
|
||||
# | basic_dayone | @todo
|
||||
|
||||
Scenario Outline: --import allows multiple new entries from stdin
|
||||
Given we use the config "<config>.yaml"
|
||||
And we use the password "test" if prompted
|
||||
When we run "jrnl --import" and pipe
|
||||
"""
|
||||
[2020-07-05 15:00] Observe and import.
|
||||
|
@ -35,8 +52,19 @@ Feature: Importing data
|
|||
[2020-07-05 15:01] Twice as nice.
|
||||
Sed dignissim sed nisl eu consequat.
|
||||
"""
|
||||
Then the journal should contain "[2020-07-05 15:00] Observe and import."
|
||||
Then the journal should contain "[2020-07-05 15:01] Twice as nice."
|
||||
Then we flush the output
|
||||
When we run "jrnl -on 2020-07-05"
|
||||
Then the output should contain "2020-07-05 15:00 Observe and import."
|
||||
And the output should contain "Lorem ipsum"
|
||||
And the output should contain "2020-07-05 15:01 Twice as nice."
|
||||
And the output should contain "Sed dignissim"
|
||||
|
||||
Examples: Configs
|
||||
| config |
|
||||
| basic_onefile |
|
||||
| basic_encrypted |
|
||||
# | basic_folder | @todo
|
||||
# | basic_dayone | @todo
|
||||
|
||||
Scenario: --import allows import new entries from file
|
||||
Given we use the config "simple.yaml"
|
||||
|
|
Loading…
Add table
Reference in a new issue