diff --git a/package.json b/package.json index b106950fb..6e7b6fb66 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/test/features/backlog/save-as.feature b/test/features/backlog/save-as.feature new file mode 100644 index 000000000..838b28144 --- /dev/null +++ b/test/features/backlog/save-as.feature @@ -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 diff --git a/test/features/file/save-as-comma-separated-file.feature b/test/features/file/save-as-comma-separated-file.feature index 953075e9d..2cdc7b584 100644 --- a/test/features/file/save-as-comma-separated-file.feature +++ b/test/features/file/save-as-comma-separated-file.feature @@ -7,7 +7,12 @@ 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 @@ -15,3 +20,4 @@ Feature: Save As Comma separated value file 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 diff --git a/test/features/file/save-as-semi-colon-separated-file.feature b/test/features/file/save-as-semi-colon-separated-file.feature index 5e1bf7e6c..3d7cd1cb3 100644 --- a/test/features/file/save-as-semi-colon-separated-file.feature +++ b/test/features/file/save-as-semi-colon-separated-file.feature @@ -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 @@ -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 diff --git a/test/features/file/save-as-tab-separated-file.feature b/test/features/file/save-as-tab-separated-file.feature index 3b4fd0d2f..a80a60b07 100644 --- a/test/features/file/save-as-tab-separated-file.feature +++ b/test/features/file/save-as-tab-separated-file.feature @@ -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 @@ -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 diff --git a/test/features/file/save.feature b/test/features/file/save.feature index d6d44b8b0..c535d8110 100644 --- a/test/features/file/save.feature +++ b/test/features/file/save.feature @@ -8,6 +8,11 @@ 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 @@ -15,3 +20,4 @@ Feature: Save 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