diff --git a/features/core.feature b/features/core.feature index 36601fde..c023cd4c 100644 --- a/features/core.feature +++ b/features/core.feature @@ -20,6 +20,7 @@ Feature: Basic reading and writing to a journal When we run "jrnl -n 1" Then the output should contain "2013-07-23 09:00 A cold and stormy day." + @skip_win Scenario: Writing an empty entry from the editor Given we use the config "editor.yaml" When we open the editor and enter "" @@ -40,14 +41,6 @@ Feature: Basic reading and writing to a journal When we run "jrnl -on 'june 6 2013' --short" Then the output should be "2013-06-10 15:40 Life is good." - Scenario: Emoji support - Given we use the config "basic.yaml" - When we run "jrnl 23 july 2013: 🌞 sunny day. Saw an 🐘" - Then we should see the message "Entry added" - When we run "jrnl -n 1" - Then the output should contain "🌞" - and the output should contain "🐘" - Scenario: Writing an entry at the prompt Given we use the config "basic.yaml" When we run "jrnl" and enter "25 jul 2013: I saw Elvis. He's alive." diff --git a/features/dayone_regressions.feature b/features/dayone_regressions.feature index c3b700b9..f6098ba6 100644 --- a/features/dayone_regressions.feature +++ b/features/dayone_regressions.feature @@ -13,17 +13,18 @@ Feature: Zapped Dayone bugs stay dead! # fails when system time is UTC (as on Travis-CI) @skip - Scenario: Title with an embedded period on DayOne journal - Given we use the config "dayone.yaml" - When we run "jrnl 04-24-2014: "Ran 6.2 miles today in 1:02:03. I'm feeling sore because I forgot to stretch."" - Then we should see the message "Entry added" - When we run "jrnl -1" - Then the output should be - """ - 2014-04-24 09:00 Ran 6.2 miles today in 1:02:03. - | I'm feeling sore because I forgot to stretch. - """ + Scenario: Title with an embedded period on DayOne journal + Given we use the config "dayone.yaml" + When we run "jrnl 04-24-2014: "Ran 6.2 miles today in 1:02:03. I'm feeling sore because I forgot to stretch."" + Then we should see the message "Entry added" + When we run "jrnl -1" + Then the output should be + """ + 2014-04-24 09:00 Ran 6.2 miles today in 1:02:03. + | I'm feeling sore because I forgot to stretch. + """ + @skip_win Scenario: Opening an folder that's not a DayOne folder gives a nice error message Given we use the config "empty_folder.yaml" When we run "jrnl Herro" diff --git a/features/encryption.feature b/features/encryption.feature index 787fa850..081a208f 100644 --- a/features/encryption.feature +++ b/features/encryption.feature @@ -12,6 +12,7 @@ Then we should see the message "Journal decrypted" And the journal should have 2 entries + @skip_win Scenario: Encrypting a journal Given we use the config "basic.yaml" When we run "jrnl --encrypt" and enter @@ -26,6 +27,7 @@ Then the output should contain "Password" And the output should contain "2013-06-10 15:40 Life is good" + @skip_win Scenario: Mistyping your password Given we use the config "basic.yaml" When we run "jrnl --encrypt" and enter @@ -43,6 +45,7 @@ Then the output should contain "Password" And the output should contain "2013-06-10 15:40 Life is good" + @skip_win Scenario: Storing a password in Keychain Given we use the config "multiple.yaml" When we run "jrnl simple --encrypt" and enter diff --git a/features/environment.py b/features/environment.py index 8ba781ac..02f2747e 100644 --- a/features/environment.py +++ b/features/environment.py @@ -1,5 +1,6 @@ import shutil import os +import sys def before_feature(context, feature): @@ -9,6 +10,10 @@ def before_feature(context, feature): feature.skip("Marked with @skip") return + if "skip_win" in feature.tags and "win32" in sys.platform: + feature.skip("Skipping on Windows") + return + def before_scenario(context, scenario): """Before each scenario, backup all config and journal test data.""" @@ -36,6 +41,10 @@ def before_scenario(context, scenario): scenario.skip("Marked with @skip") return + if "skip_win" in scenario.effective_tags and "win32" in sys.platform: + scenario.skip("Skipping on Windows") + return + def after_scenario(context, scenario): """After each scenario, restore all test data and remove working_dirs.""" diff --git a/features/upgrade.feature b/features/upgrade.feature index ef597d4f..b2c569c7 100644 --- a/features/upgrade.feature +++ b/features/upgrade.feature @@ -1,5 +1,6 @@ Feature: Upgrading Journals from 1.x.x to 2.x.x + @skip_win Scenario: Upgrade and parse journals with square brackets Given we use the config "upgrade_from_195.json" When we run "jrnl -9" and enter "Y" @@ -11,6 +12,7 @@ Feature: Upgrading Journals from 1.x.x to 2.x.x """ Then the journal should have 2 entries + @skip_win Scenario: Upgrading a journal encrypted with jrnl 1.x Given we use the config "encrypted_old.json" When we run "jrnl -n 1" and enter @@ -22,6 +24,7 @@ Feature: Upgrading Journals from 1.x.x to 2.x.x Then the output should contain "Password" and the output should contain "2013-06-10 15:40 Life is good" + @skip_win Scenario: Upgrade and parse journals with little endian date format Given we use the config "upgrade_from_195_little_endian_dates.json" When we run "jrnl -9" and enter "Y"