add more journal type tests to import feature

This commit is contained in:
Jonathan Wren 2020-09-26 21:17:58 -07:00
parent 7b2e35c752
commit 8483d36208
No known key found for this signature in database
GPG key ID: 43D5FF8722E7F68A

View file

@ -1,14 +1,23 @@
Feature: Importing data Feature: Importing data
Scenario: --import allows new entry from stdin Scenario Outline: --import allows new entry from stdin
Given we use the config "simple.yaml" 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." When we run "jrnl --import" and pipe "[2020-07-05 15:00] Observe and import."
And we run "jrnl -1" Then we flush the output
Then the journal should contain "[2020-07-05 15:00] Observe and import." When we run "jrnl -c import"
And the output should contain "Observe and import" Then the output should contain "Observe and import"
Scenario: --import allows new large entry from stdin Examples: Configs
Given we use the config "simple.yaml" | 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 When we run "jrnl --import" and pipe
""" """
[2020-07-05 15:00] Observe and import. [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 tellus placerat, sed ultricies metus bibendum. Duis eget venenatis erat. In at
dolor dui end of entry. dolor dui end of entry.
""" """
And we run "jrnl -1" Then we flush the output
Then the journal should contain "[2020-07-05 15:00] Observe and import." When we run "jrnl -on 2020-07-05"
And the output should contain "Observe and import" 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 "Lorem ipsum"
And the output should contain "end of entry." And the output should contain "end of entry."
Scenario: --import allows multiple new entries from stdin Examples: Configs
Given we use the config "simple.yaml" | 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 When we run "jrnl --import" and pipe
""" """
[2020-07-05 15:00] Observe and import. [2020-07-05 15:00] Observe and import.
@ -35,8 +52,19 @@ Feature: Importing data
[2020-07-05 15:01] Twice as nice. [2020-07-05 15:01] Twice as nice.
Sed dignissim sed nisl eu consequat. Sed dignissim sed nisl eu consequat.
""" """
Then the journal should contain "[2020-07-05 15:00] Observe and import." Then we flush the output
Then the journal should contain "[2020-07-05 15:01] Twice as nice." 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 Scenario: --import allows import new entries from file
Given we use the config "simple.yaml" Given we use the config "simple.yaml"