Feature: GTD Sync should remember the location of todo.txt across computers and platforms
In order to be able to use GTD Sync across computers and platforms with the same GTD mind map and todo.txt
As a GTD Sync user
I want GTD Sync to remember the location of todo.txt across computers and platforms
Scenario Outline: GTD Sync should prompt me to specify a folder for todo.txt
Given <situation>
When I run the GTD Sync function for my GTD mind map
Then GTD Sync should notify me that <notification>
And GTD Sync should offer me the choice to specify a folder for todo.txt or to cancel
Examples:
| situation | notification |
| I have never run the GTD Sync function for the current GTD mind map | I should specify the folder for todo.txt |
| todo.txt is missing from the folder I specified in a previous run | todo.txt is missing from the specified folder |
Scenario Outline: I should be able to specify a folder for todo.txt or to cancel
Given I have never run the GTD Sync function for the current GTD mind map
And the GTD Sync function prompts me to specify the folder for todo.txt
When I choose to <action>
Then <result>
Examples:
| action | result |
| specify a folder | GTD Sync should use the specified folder for todo.txt |
| cancel folder specification | GTD Sync should abort the synchronisation operation |
Scenario Outline: I should be able to change the folder for todo.txt or to cancel
Given todo.txt is missing from the folder I specified in a previous run
And the GTD Sync function prompts me to specify the folder for todo.txt
When I choose to <action>
Then <result>
Examples:
| action | result |
| specify a folder containing todo.txt | GTD Sync should use the specified folder for todo.txt |
| specify a folder not containing todo.txt | GTD Sync should abort the synchronisation operation |
| cancel folder specification | GTD Sync should abort the synchronisation operation |
Scenario: GTD Sync should remember the specified folder for todo.txt
Given I have run the GTD Sync function for the current GTD mind map
And todo.txt is present in the previously specified folder
When I run the GTD Sync function
Then GTD Sync should use todo.txt in the specified folder for further processing
And GTD Sync should not prompt me to specify the folder for todo.txt
# Note for development:
# The GTD Sync function will store the name of the folder for todo.txt as an attribute
# in the root node and read it from this attribute in the following runs.
Scenario Outline: GTD Sync should remember the location of todo.txt across computers and platforms
Given I have used GTD Sync to synchronise actions between my GTD mind map and todo.txt
And I have access to the same files on another <environment>
And I have never run GTD Sync in this other environment
And my GTD mind map is currently the active mind map in Freeplane in this other environment
When I run GTD Sync
Then GTD Sync should synchronise actions with my todo.txt file
And GTD Sync should not prompt me to specify the location of todo.txt
And GTD Sync should not create a todo.txt file in the wrong location
Examples:
| environment |
| computer to which these files are synchronised (e.g. with Dropbox) |
| platform (Windows, Linux or Mac) on the same, multi-boot computer |
# Note for development:
# The location is stored as a path relative to the path of the current mind map. The
# absolute paths to the GTD mind map and the archive mind map probably differ between
# environments. It is an implicit given or at least a very plausible assumption that
# the relative path between the locations of both files remain the same across
# environments. An exception to this assumption will be caught by situation "The
# archive mind map specified in a previous run is missing, relocated or renamed" in
# scenario outline "The user should be prompted to specify an archive mind map".
Scenario: GTD Sync should function with an absolute paths specified in a GTD Sync version prior to v0.7.7
Given I have run the GTD Sync function for the current GTD mind map with a GTD Sync version prior to v0.7.7
And todo.txt is present in the previously specified folder
When I run the GTD Sync function
Then GTD Sync should use todo.txt in the specified folder for further processing
And GTD Sync should not prompt me to specify the folder for todo.txt
And GTD Sync should leave the absolute path unchanged
Scenario: GTD Sync should change from an absolute to a relative path in case of a folder change
Given I have run the GTD Sync function for the current GTD mind map with a GTD Sync version prior to v0.7.7
And todo.txt is missing from the previously specified folder
When I run the GTD Sync function
And I specify the correct folder
Then GTD Sync should use todo.txt in the newly specified folder for further processing
And GTD Sync should store the new location as a relative path
Scenario: The current mind map has never been saved
Given I have never saved the current mind map
When I run the GTD Sync function
Then the feature should warn me that the current mind map has never been saved
And the feature should advise me to save the mind map first
And the feature should abort the archive operation
Scenario Outline: The path for the todo.txt folder is too long for Windows
Given I have specified the todo.txt folder path for the current GTD mind map <specification>
And the current platform is Windows
And the specified todo.txt folder path exceeds 238 characters
When I <action>
Then the feature should inform me that the specified path is too long
And the feature should <result>
Examples:
| specification | action | result |
| on another system during a previous run | run the GTD Sync function | abort the archive operation |
| during the current run | submit the path | let me specify another path |
# This seems to concern a low risk, so this has low priority. An alternative scenario
# is that the GTD Sync wiki informs me about this risk.
#
# Note for development:
# Windows file name restrictions have more restrictions that file names under Linux or
# Mac. These restrictions are:
# - reserved characters or names are not allowed
# - a maximum length of 260 characters
# See also https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx
# for more details.
Scenario Outline: The path for the todo.txt folder contains Windows reserved characters or names
Given I have specified the todo.txt folder path for the current GTD mind map <specification>
And the current platform is <platform>
And the specified todo.txt folder path contains Windows reserved characters or names
When I <action>
Then the feature should inform me that the specified path is invalid
And the feature should <result>
Examples:
| specification | platform | action | result |
| on another system during a previous run | Windows | run the GTD Sync function | abort the archive operation |
| during the current run | Windows | submit the new path | let me specify another path |
| during the current run | Linux or Mac | submit the new path | let me specify another path |
# See comment previous scenario.
#
# Note for development:
# See note for previous scenario. I have found class ValidatedFileChooser that extends
# JFileChooser and performs a check on invalid characters, names and length
Scenario Outline: No files can be written to the todo.txt folder
Given I have specified the todo.txt folder path for the current GTD mind map <specification>
And no files can be written to the specified todo.txt folder
When I <action>
Then the feature should inform me that no files can be written to the specified todo.txt folder
And the feature should abort the archive operation
Examples:
| specification | action |
| on another system during a previous run | run the GTD Sync function |
| during the current run | submit the new path |
Scenario Outline: Todo.txt does not have write access
Given I have specified the todo.txt folder path for the current GTD mind map <specification>
And todo.txt is present in that folder
And todo.txt does not have write access
When I <action>
Then the feature should inform me that todo.txt does not have write access
And the feature should abort the archive operation
Examples:
| specification | action |
| on another system during a previous run | run the GTD Sync function |
| during the current run | submit the new path |