Commit graph

187 commits

Author SHA1 Message Date
Micah Jerome Ellison
fda3fe2357 Merge branch 'moar-tests' of https://github.com/wren/jrnl into moar-tests 2020-09-26 13:16:21 -07:00
Micah Jerome Ellison
932996a846 Fix DayOne tag sample data, move search/format tag tests, and run them on multiple jrnl types 2020-09-26 13:16:13 -07:00
Jonathan Wren
54eaeb0c7e
oops whitespace error 2020-09-26 13:11:32 -07:00
Jonathan Wren
03c1304177
fix password test 2020-09-26 12:40:46 -07:00
Jonathan Wren
694c8cdf62
clean up linting issues 2020-09-26 12:38:22 -07:00
Jonathan Wren
1e160c5494
add more password tests 2020-09-26 12:36:09 -07:00
Jonathan Wren
4df0aef67a
fix file cleanup after failed test with no debug on 2020-09-26 11:44:40 -07:00
Jonathan Wren
eb9b679e4c
update more delete flag tests to include other journal types 2020-09-26 11:44:23 -07:00
Jonathan Wren
590e051479
update more delete flag tests to include other journal types 2020-09-24 20:54:25 -07:00
Micah Jerome Ellison
0e42187eb1 Fix failing test with a flush 2020-09-24 20:47:16 -07:00
Micah Jerome Ellison
ea51fc5781 Merge branch 'moar-tests' of https://github.com/wren/jrnl into moar-tests 2020-09-24 20:46:15 -07:00
Micah Jerome Ellison
5d9fe76f86 Add search tests so far (broken) 2020-09-24 20:46:07 -07:00
Jonathan Wren
242467da37
add flush output steps to behave, update delete flag tests 2020-09-24 20:41:08 -07:00
Micah Jerome Ellison
bb5f7a830a Fix basic folder journal reference 2020-09-24 20:24:34 -07:00
Micah Jerome Ellison
7baec00ab0 Merge branch 'moar-tests' of https://github.com/wren/jrnl into moar-tests 2020-09-24 20:18:40 -07:00
Micah Jerome Ellison
8c9dce4bc5 Add more journal types in search 2020-09-24 20:18:27 -07:00
Jonathan Wren
777f69ec73
update configs 2020-09-24 20:17:45 -07:00
Micah Jerome Ellison
56a7cc97a4 Change "basic" config reference to "simple" 2020-09-24 20:03:09 -07:00
Micah Jerome Ellison
f740145e11 Merge branch 'moar-tests' of https://github.com/wren/jrnl into moar-tests 2020-09-24 19:54:14 -07:00
Jonathan Wren
69c0f5e0a3
rename files, add some basic journals for each journal type 2020-09-24 19:50:56 -07:00
Micah Jerome Ellison
2ac8f61a75 Add journal types to some search tests 2020-09-24 19:40:08 -07:00
Micah Jerome Ellison
66b9f5a461 Standardize and clean up star and write features 2020-09-24 19:27:07 -07:00
Jonathan Wren
379a63c8f1
update datetime tests 2020-09-19 17:17:30 -07:00
Micah Jerome Ellison
e5c1114ca2
Add tests for starring with various journal types 2020-09-19 17:17:29 -07:00
Jonathan Wren
40941752fc
add config test outlines 2020-09-19 17:17:29 -07:00
Jonathan Wren
899dd5037b
update version tests, add new regex match behave step 2020-09-19 17:17:28 -07:00
Micah Jerome Ellison
a6b646bb44 Add write tests for each journal type 2020-09-19 15:29:54 -07:00
Jonathan Wren
607aa7a5a1
move tests to be more behavior driven 2020-09-19 11:51:39 -07:00
Jonathan Wren
d1692ab771
move tests to be more behavior driven 2020-09-19 11:43:18 -07:00
Jonathan Wren
80bc2ae4ae
move tests to be more behavior driven 2020-09-19 11:40:24 -07:00
Jonathan Wren
e3f3904cf7
rename files 2020-09-19 11:18:50 -07:00
Jonathan Wren
1d11f3db32
More test shuffling
- Move more tests around
- Rename some test files
- Disable one test (markdown-355)
  Not sure why it's now failing. We should come back to this.
- Add more placeholder test scenarios (marked with @todo)
  You can run just these tests with `behave --no-skipped --tags=todo`
- Fix "missing_directory" test
  This test was missing the config file it was trying to use. So, it was
  really a very useless, broken test that we absolutely should not have
  approved the PR (#963) for.
2020-09-05 19:05:13 -07:00
Jonathan Wren
78d362e0db
take out old test 2020-09-05 17:34:28 -07:00
Jonathan Wren
6ada26d629
clean up some code around keyrings, clean up more tests 2020-09-05 17:34:15 -07:00
Jonathan Wren
764227d2f2
move around behave tests, get rid of regression files 2020-09-05 16:00:13 -07:00
Jonathan Wren
b0be986759
add more tests, add more functionality to behave for calling mock editor 2020-09-05 15:26:39 -07:00
Jonathan Wren
3c10766372
clean up txt file after tests 2020-09-05 12:12:57 -07:00
Jonathan Wren
131477c7e3
standardize behave tests 2020-09-05 12:11:37 -07:00
Jonathan Wren
6b73eb786e
make behave slightly less verbose for use with behave --format progress2 2020-09-05 12:10:29 -07:00
Jonathan Wren
631e08a557
Clean up help screen, get rid of util.py (#1027)
* More refactoring of cli.py

break up code from cli.py (now in jrnl.py) up into smaller functions
get rid of export mode
move --encrypt and --decrypt to commands.py
clean up the help screen even more
update flag name for import

* reorganize code, move around lots of functions

* clean up import statements

* move run function out of cli and into jrnl

* rename confusingly named function

* move editor function into editor file

* rename parse_args.py to args.py to make room for more args functions

* Fix error in test suite for windows

I accidentally flipped the conditional, so this fixes it.

Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>

* Update app description on help screen

Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2020-08-22 11:40:39 -07:00
Jonathan Wren
2553c1244d fix typo in test 2020-08-01 15:54:13 -07:00
Jonathan Wren
6b1ac328fd Fix small bug related to starring an entry with a date
If a date was given with an entry, and the star was also was added, the
star wouldn't be recognized if it was at the start of the title.

Example that didn't work, but now works with this fix:
  jrnl "saturday: *Title words."

This is to be consistent in starring functionality with and without a
date in the entry.
2020-08-01 15:54:13 -07:00
Jonathan Wren
a54ed90259 Move import to be standalone command to reduce clutter in cli.py 2020-08-01 15:54:13 -07:00
Jonathan Wren
5922ca41ee Update arg parsing to better handle optinal journal name
Fixes #520 -and parameter seems to only work for the default journal
2020-08-01 15:54:13 -07:00
Jonathan Wren
a11aa24c7e Allow editing of DayOne entries (#1001)
* add test to repro issue #955

* Allow editing of DayOne entries

* Add broken test for Dayone

Add test for editing Dayone entries (this test currently fails)

Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>

* Fix editing logic for DayOneJournal

DayOneJournal previously reimplemented Journal._parse inside of
DayOneJournal.parse_editable_string, and in doing so caused issues
between itself and the class it was inheriting from. This commit fixes
the issue by moving the UUID to be in the body of the entry, rather than
above it. So, then Journal._parse still finds the correct boundaries
between entries, and DayOneJournal then parses the UUID afterward.

Co-authored-by: MinchinWeb <w_minchin@hotmail.com>
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2020-07-18 12:54:52 -07:00
Micah Jerome Ellison
4ca6e3f95f Display warning if Python version is less than 3.7 (#994)
* Add Python version check and faulty test to confirm it's working (should fail on 3.6 build only)
* Apply formatting
* Fix behave Python version test
* Make error message more descriptive and friendly
2020-07-12 16:24:46 -07:00
Micah Jerome Ellison
28093894ad Add diagnostic argument #727 (#984) 2020-06-20 11:18:53 -07:00
eshrh
be38cfa87a Add tags to json and xml exporters (#975)
* tag array for json
* add tags to entry in xml
* xml test
* json test
* black
* removed called
2020-06-13 11:58:35 -07:00
eshrh
2a3fd820b9 Create journal with absolute path when no path is specified (#972)
* create jrnl with abspath

Co-authored-by: = <esrh@netc.eu>
2020-06-13 11:08:22 -07:00
Eshan
74724b2185 Create directory if it doesn't exist (#963)
* create dir if it doesn't exist
* switch order of print and creation
* makedirs instead of mkdir and stderr printing
* add test
* black reformatting
2020-06-06 12:46:06 -07:00