From 1e160c54948b6b121c93a56a2fca86e4ae54c6e6 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 26 Sep 2020 12:36:09 -0700 Subject: [PATCH 1/4] add more password tests --- features/password.feature | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/features/password.feature b/features/password.feature index ead0f6fe..9fd8f9d5 100644 --- a/features/password.feature +++ b/features/password.feature @@ -12,7 +12,7 @@ Feature: Using the installed keyring Then the config for journal "simple" should have "encrypt" set to "bool:True" When we run "jrnl simple -n 1" Then the output should contain "2013-06-10 15:40 Life is good" - But the output should not contain "Password" + But we should not be prompted for a password Scenario: Encrypt journal with no keyring backend and do not store in keyring Given we use the config "simple.yaml" @@ -37,6 +37,7 @@ Feature: Using the installed keyring y """ Then we should get no error + # @todo add step to check contents of keyring @todo Scenario: Open an encrypted journal with wrong password in keyring @@ -46,11 +47,15 @@ Feature: Using the installed keyring Scenario: Open encrypted journal when keyring exists but fails # This should ask the user for the password after the keyring fails - Scenario: Loading an encrypted journal - Given we use the config "encrypted.yaml" - When we run "jrnl -n 1" and enter "bad doggie no biscuit" - Then we should be prompted for a password - And the output should contain "2013-06-10 15:40 Life is good" + @todo + Scenario: Decrypt journal with password in keyring + + @todo + Scenario: Decrypt journal without a keyring + + @todo + Scenario: Decrypt journal when keyring exists but fails + # This should ask the user for the password after the keyring fails Scenario: Mistyping your password Given we use the config "simple.yaml" From 694c8cdf6269305c84ba8e49dea11900bd0d5b4d Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 26 Sep 2020 12:38:22 -0700 Subject: [PATCH 2/4] clean up linting issues --- features/environment.py | 1 - features/steps/core.py | 8 +++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/features/environment.py b/features/environment.py index f3a0e13b..71ed8969 100644 --- a/features/environment.py +++ b/features/environment.py @@ -84,4 +84,3 @@ def after_scenario(context, scenario): clean_all_working_dirs() else: clean_all_working_dirs() - diff --git a/features/steps/core.py b/features/steps/core.py index 756f260b..43a3bad7 100644 --- a/features/steps/core.py +++ b/features/steps/core.py @@ -368,11 +368,13 @@ def flush_stderr(context): @then("we flush all the output") -def flush_stderr(context): - context.execute_steps(''' +def flush_all_output(context): + context.execute_steps( + """ Then we flush the output Then we flush the error output - ''') + """ + ) @then("the output should be") From 03c1304177079c0fb40c669fa32e36bba1e9ee68 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 26 Sep 2020 12:40:46 -0700 Subject: [PATCH 3/4] fix password test --- features/password.feature | 1 - 1 file changed, 1 deletion(-) diff --git a/features/password.feature b/features/password.feature index 9fd8f9d5..06c65faa 100644 --- a/features/password.feature +++ b/features/password.feature @@ -12,7 +12,6 @@ Feature: Using the installed keyring Then the config for journal "simple" should have "encrypt" set to "bool:True" When we run "jrnl simple -n 1" Then the output should contain "2013-06-10 15:40 Life is good" - But we should not be prompted for a password Scenario: Encrypt journal with no keyring backend and do not store in keyring Given we use the config "simple.yaml" From 54eaeb0c7e1fbc3c705a75707275b53e031913cc Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 26 Sep 2020 13:11:32 -0700 Subject: [PATCH 4/4] oops whitespace error --- features/format.feature | 1 - 1 file changed, 1 deletion(-) diff --git a/features/format.feature b/features/format.feature index d5189aad..789fda1d 100644 --- a/features/format.feature +++ b/features/format.feature @@ -75,7 +75,6 @@ Feature: Custom formats ####### ATX H4 - ######## ATX H5 ######### ATX H6