Change the folder where backup files are stored
The Freeplane add-on that syncs a GTD mind map with a todo.txt file
Status: Beta
Brought to you by:
haaihenkie
Feature: Move the history snapshot and backup files to a separate folder optionally
In order to keep my folder with the todo.txt file clean
As a GTD Sync user
I want GTD Sync to move auxiliary files to a separate directory of my choice
# GTD Sync auxiliary files:
# todo.history.txt - a snapshot of todo.txt directly after synchronisation
# todo.bak.txt - a backup of todo.txt as it was just before synchronisation
# todo.history.bak.txt - a backup of todo.history.txt as it was just before synchronisation
Scenario: GTD Sync should ask whether it should store auxiliary files to a separate folder
Given I have never run the GTD Sync function for my GTD mind map
When I run the GTD Sync function for my GTD mind map
Then GTD Sync should ask if I would like to store the auxiliary files to another folder than the folder for todo.txt
And GTD Sync should offer me the choices "Yes" or "No"
Scenario Outline: I should be able to choose for a separate folder for auxiliary files
Given I have never run the GTD Sync function for the current GTD mind map
And the GTD Sync function asks me if I would like to store the auxiliary files in a separate folder
When I choose <answer>
Then GTD Sync should <result>
Examples:
| answer | result |
| "Yes" | prompt to specify the folder for auxiliary files |
| "No" | use the todo.txt folder for auxiliary files |
Scenario Outline: I should be able to specify a folder for auxiliary files 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 auxiliary files
When I choose to <action>
Then GTD Sync should <result>
Examples:
| action | result |
| specify a folder | use the specified folder for auxiliary files |
| cancel folder specification | abort the synchronisation operation |
Scenario: The auxiliary files are missing from the folder I specified
Given todo.history.txt is missing from the folder I specified for auxiliary files in a previous run
When I run the GTD Sync function for my GTD mind map
Then GTD Sync should notify me that the auxiliary files are missing from the specified folder
And GTD Sync should prompt me to specify the folder for the auxiliary files
Scenario Outline: I should be able to change the folder for auxiliary files or to cancel
Given todo.history.txt is missing from the folder I specified for auxiliary files in a previous run
And the GTD Sync function prompts me to specify the folder for auxiliary files
When I choose to <action>
Then <result>
Examples:
| action | result |
| specify a folder containing todo.history.txt | GTD Sync should use the specified folder for auxiliary files |
| specify a folder not containing todo.history.txt | GTD Sync should prompt me to specify the folder for auxiliary files |
| cancel | GTD Sync should abort the synchronisation operation |
Scenario Outline: GTD Sync should remember the specified folder for auxiliary files
Given I have run the GTD Sync function for the current GTD mind map
And I <specified> specified a separate folder for auxiliary files in a previous run
And todo.history.txt is present in the <folder>
When I run the GTD Sync function
Then GTD Sync should use auxiliary files in the <folder> for further processing
And GTD Sync should not prompt me to specify the folder for auxiliary files
Examples:
| specified | folder |
| have | previously specified folder |
| have not | 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 auxiliary files across computers and platforms
Given I have used GTD Sync to synchronise action between my GTD mind map and todo.txt
And I <specified> specified a separate folder for auxiliary files in a previous run
And I have access to the auxiliary 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 use auxiliary files in the <folder> for further processing
And GTD Sync should not prompt me to specify the location of the auxiliary files
And GTD Sync should not create auxiliary files in the wrong location
Examples:
| specified | environment | folder |
| have | computer to which these files are synchronised (e.g. with Dropbox) | previously specified folder |
| have not | platform (Windows, Linux or Mac) on the same, multi-boot computer | folder for todo.txt |
# 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 Outline: The path for the auxiliary files folder is too long for Windows
Given I have specified the auxiliary files folder path for the current GTD mind map <specification>
And the current platform is Windows
And the specified auxiliary files 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 auxiliary files folder contains Windows reserved characters or names
Given I have specified the auxiliary files folder path for the current GTD mind map <specification>
And the current platform is <platform>
And the specified auxiliary files 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 auxiliary files folder
Given I have specified the auxiliary files folder path for the current GTD mind map <specification>
And no files can be written to the specified auxiliary files folder
When I <action>
Then the feature should inform me that no files can be written to the specified auxiliary files 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: An auxiliary file does not have write access
Given I have specified the todo.txt folder path for the current GTD mind map <specification>
And <file> is present in that folder
And <file> does not have write access
When I <action>
Then the feature should inform me that <file> does not have write access
And the feature should abort the archive operation
Examples:
| file | specification | action |
| todo.history.txt | on another system during a previous run | run the GTD Sync function |
| todo.history.txt | during the current run | submit the new path |
| todo.bak.txt | on another system during a previous run | run the GTD Sync function |
| todo.bak.txt | during the current run | submit the new path |
| todo.history.bak.txt | on another system during a previous run | run the GTD Sync function |
| todo.history.bak.txt | during the current run | submit the new path |
In my own experience it is convenient to have all files in one directory in Dropbox sync scenario where I use de free version of Dropsync.
Last edit: Henk van den Akker 2017-06-16
Last edit: Henk van den Akker 2017-07-02