mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-20 21:18:32 +02:00
Add tests for starring with various journal types
This commit is contained in:
parent
40941752fc
commit
e5c1114ca2
3 changed files with 43 additions and 5 deletions
17
features/data/configs/dayone_empty.yaml
Normal file
17
features/data/configs/dayone_empty.yaml
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
default_hour: 9
|
||||||
|
default_minute: 0
|
||||||
|
editor: noop
|
||||||
|
template: false
|
||||||
|
encrypt: false
|
||||||
|
highlight: true
|
||||||
|
journals:
|
||||||
|
default: features/journals/dayone_empty.dayone
|
||||||
|
linewrap: 80
|
||||||
|
tagsymbols: '@'
|
||||||
|
timeformat: '%Y-%m-%d %H:%M'
|
||||||
|
indent_character: "|"
|
||||||
|
colors:
|
||||||
|
date: none
|
||||||
|
title: none
|
||||||
|
body: none
|
||||||
|
tags: none
|
|
@ -0,0 +1 @@
|
||||||
|
This file exists to preserve the directory structure, but should be ignored by jrnl.
|
|
@ -1,15 +1,35 @@
|
||||||
Feature: Starring entries
|
Feature: Starring entries
|
||||||
|
|
||||||
Scenario: Starring an entry will mark it in the journal file
|
Scenario Outline: Starring an entry will mark it in the journal file
|
||||||
Given we use the config "basic.yaml"
|
Given we use the config <config_file>
|
||||||
When we run "jrnl 20 july 2013 *: Best day of my life!"
|
When we run "jrnl 20 july 2013 *: Best day of my life!"
|
||||||
Then we should see the message "Entry added"
|
Then we should see the message "Entry added"
|
||||||
And the journal should contain "[2013-07-20 09:00] Best day of my life! *"
|
When we run "jrnl -on 2013-07-20 -starred"
|
||||||
|
Then the output should contain "2013-07-20 09:00 Best day of my life!"
|
||||||
|
|
||||||
Scenario: Filtering by starred entries
|
Examples: configs
|
||||||
Given we use the config "basic.yaml"
|
| config_file |
|
||||||
|
| "basic.yaml" |
|
||||||
|
| "empty_folder.yaml" |
|
||||||
|
| "dayone.yaml" |
|
||||||
|
|
||||||
|
Scenario Outline: Filtering by starred entries
|
||||||
|
Given we use the config <config_file>
|
||||||
When we run "jrnl -starred"
|
When we run "jrnl -starred"
|
||||||
Then the output should be empty
|
Then the output should be empty
|
||||||
When we run "jrnl 20 july 2013 *: Best day of my life!"
|
When we run "jrnl 20 july 2013 *: Best day of my life!"
|
||||||
When we run "jrnl -starred"
|
When we run "jrnl -starred"
|
||||||
Then the output should be "2013-07-20 09:00 Best day of my life!"
|
Then the output should be "2013-07-20 09:00 Best day of my life!"
|
||||||
|
|
||||||
|
Examples: configs
|
||||||
|
| config_file |
|
||||||
|
| "basic.yaml" |
|
||||||
|
| "empty_folder.yaml" |
|
||||||
|
| "dayone_empty.yaml" |
|
||||||
|
|
||||||
|
Scenario: Starring an entry will mark it in an encrypted journal
|
||||||
|
Given we use the config "encrypted.yaml"
|
||||||
|
When we run "jrnl 20 july 2013 *: Best day of my life!" and enter "bad doggie no biscuit"
|
||||||
|
Then we should see the message "Entry added"
|
||||||
|
When we run "jrnl -on 2013-07-20 -starred" and enter "bad doggie no biscuit"
|
||||||
|
Then the output should contain "2013-07-20 09:00 Best day of my life!"
|
||||||
|
|
Loading…
Add table
Reference in a new issue