Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
… into develop
  • Loading branch information
Matthew Mulholland committed Jun 2, 2018
2 parents aeddc89 + e5c1467 commit 192567a
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 1 deletion.
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
"unit": "karma start test/unit/karma.conf.js",
"e2e": "yarn run pack && (yarn run cucumber:postpack:impl || yarn -v) && yarn run cucumber:report",
"e2e:dev": "(yarn run cucumber:postpack:dev || yarn -v) && yarn run cucumber:report",
=======
"e2e": "yarn run pack && (yarn run cucumber:postpack:impl || true) && yarn run cucumber:report",
"e2e:dev": "(yarn run cucumber:postpack:dev || true) && yarn run cucumber:report",
>>>>>>> 2107affe02974388d9ea6cc752a880851d534d36
"cucumber:postpack": "cross-env BABEL_ENV=test nyc cucumber-js --require-module babel-core/register test/features -f json:test/cucumber_report.json",
"cucumber:postpack:dev": "cross-env BABEL_ENV=test nyc cucumber-js --require-module babel-core/register --tags @dev test/features -f json:test/cucumber_report.json",
"cucumber:postpack:impl": "cross-env BABEL_ENV=test nyc cucumber-js --require-module babel-core/register --tags @impl test/features -f json:test/cucumber_report.json",
Expand Down
27 changes: 27 additions & 0 deletions test/features/backlog/save-as.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
@backlog

Feature: Save as
As an Data Packager
I want to save the data changes in the active data tab to a valid separated value file format
So that the data can be retrieved later

RULES
=====

- The default file type will be a comma separated file and the and CSV dialect delimiter ","
- If available in Preferences, update the default the file type and CSV dialect delimiter
- The CSV dialect selected may change the file extension e.g. tab separated values files use .tsv
- The "Save as..." command can be invoked from the menu or using a keyboard shortcut
- The "Save as..." command can be cancelled

NOTES
=====

- This will replace the file type specific save as commands

Scenario: Save the data
Given I have opened Data Curator
And a CSV Dialect Preference may have been set
When "Save As..." is invoked
Then a prompt using the defaults and requesting the file type, name and location should be displayed
And the file should be saved with that file type, name and location
8 changes: 7 additions & 1 deletion test/features/file/save-as-comma-separated-file.feature
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,17 @@ Feature: Save As Comma separated value file
=====

- The file extension of the saved file must be .csv
- The "Save As Comma separated" command can be invoked by a menu item or keyboard shortcut
- The "Save As Comma separated" command can be invoked by a menu item or keyboard shortcut

LATER
=====

- Write the size of the file to the `bytes` table property

Scenario: Save As Comma separated value file
Given Data Curator is open
And one data tab is open
When "Save As Comma separated" is invoked
Then a prompt, requesting the filename and location should be displayed
And the data should be saved at the filename.csv and location using the correct CSV Dialect
And the file size in bytes should be written to the `bytes` table property
7 changes: 7 additions & 0 deletions test/features/file/save-as-semi-colon-separated-file.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ Feature: Save As Semicolon separated value file

- The file extension of the saved file must be .csv
- The "Save As Semicolon separated" command can be invoked by a menu item

LATER
=====

- Write the size of the file to the `bytes` table property


Scenario: Save As Semicolon separated value file
Given Data Curator is open
Expand All @@ -16,3 +22,4 @@ Feature: Save As Semicolon separated value file
Then a prompt, requesting the filename and location should be displayed
And the data should be saved at the filename.csv and location using the correct CSV Dialect
And the 'delimiter' should be set to ';' in the Table CSV Dialect
And the file size in bytes should be written to the `bytes` table property
6 changes: 6 additions & 0 deletions test/features/file/save-as-tab-separated-file.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ Feature: Save As Tab separated value file

- The file extension of the saved file must be .tsv
- The "Save As Tab separated" command can be invoked by a menu item

LATER
=====

- Write the size of the file to the `bytes` table property

Scenario: Save As Comma separated value file
Given Data Curator is open
Expand All @@ -16,3 +21,4 @@ Feature: Save As Tab separated value file
Then a prompt, requesting the filename and location should be displayed
And the data should be saved at the filename.tsv and location using the correct CSV Dialect
And the 'delimiter' should be set to '\t' in the Table CSV Dialect
And the file size in bytes should be written to the `bytes` table property
6 changes: 6 additions & 0 deletions test/features/file/save.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@ Feature: Save

- The "Save" command can be invoked from a menu item or a keyboard shortcut
- The "Save" command is only enabled after a file has been saved for the first time using "Save As"

LATER
=====

- Write the size of the file to the `bytes` table property

Scenario: Save data
Given Data Curator is open
And one data tab is open
And the data has been saved at least once
When "Save" is invoked
Then the data in the active tab should be saved at its current location and filename
And the file size in bytes should be written to the `bytes` table property

0 comments on commit 192567a

Please sign in to comment.