Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip Broken Windows Tests #772

Merged
merged 8 commits into from
Jan 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions features/core.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""
Expand All @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not forget bring back the Emoji support test

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."
Expand Down
21 changes: 11 additions & 10 deletions features/dayone_regressions.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 3 additions & 0 deletions features/encryption.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
9 changes: 9 additions & 0 deletions features/environment.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import shutil
import os
import sys


def before_feature(context, feature):
Expand All @@ -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."""
Expand Down Expand Up @@ -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."""
Expand Down
3 changes: 3 additions & 0 deletions features/upgrade.feature
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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
Expand All @@ -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"
Expand Down