aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external/tests
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2017-03-23 11:55:36 +0100
committerGitHub <noreply@github.com>2017-03-23 11:55:36 +0100
commit1a80960a27ddb0ff542782b84409a2cc329e3847 (patch)
tree9426b6f3ca1508b2c25499cb75db575dc8c60959 /apps/files_external/tests
parentd6cff564f636e4990cf4f74f33e1330c392dd91c (diff)
parent11ee0b14bba1d9a88d1d49072771ba7bc8273f51 (diff)
downloadnextcloud-server-1a80960a27ddb0ff542782b84409a2cc329e3847.tar.gz
nextcloud-server-1a80960a27ddb0ff542782b84409a2cc329e3847.zip
Merge pull request #3989 from nextcloud/files-external-save-button
replace autosave with a save button for external storage configuration
Diffstat (limited to 'apps/files_external/tests')
-rw-r--r--apps/files_external/tests/js/settingsSpec.js13
1 files changed, 5 insertions, 8 deletions
diff --git a/apps/files_external/tests/js/settingsSpec.js b/apps/files_external/tests/js/settingsSpec.js
index 8f01c16b38c..2639f634b26 100644
--- a/apps/files_external/tests/js/settingsSpec.js
+++ b/apps/files_external/tests/js/settingsSpec.js
@@ -46,7 +46,8 @@ describe('OCA.External.Settings tests', function() {
'<input type="hidden" class="applicableUsers">' +
'</td>' +
'<td class="mountOptionsToggle"><input type="hidden" class="mountOptions"/><img class="svg action"/></td>' +
- '<td><img alt="Delete" title="Delete" class="svg action"/></td>' +
+ '<td class="remove"><img alt="Delete" title="Delete" class="svg action"/></td>' +
+ '<td class="save"><img alt="Save" title="Save" class="svg action"/></td>' +
'</tr>' +
'</tbody>' +
'</table>'
@@ -195,7 +196,7 @@ describe('OCA.External.Settings tests', function() {
$tr = view.$el.find('tr:first');
selectBackend('\\OC\\TestBackend');
});
- it('saves storage after editing config', function() {
+ it('saves storage after clicking the save button', function() {
var $field1 = $tr.find('input[data-parameter=field1]');
expect($field1.length).toEqual(1);
$field1.val('test');
@@ -205,7 +206,8 @@ describe('OCA.External.Settings tests', function() {
expect($mountOptionsField.length).toEqual(1);
$mountOptionsField.val(JSON.stringify({previews:true}));
- clock.tick(4000);
+ var $saveButton = $tr.find('td.save img');
+ $saveButton.click();
expect(fakeServer.requests.length).toEqual(1);
var request = fakeServer.requests[0];
@@ -242,11 +244,6 @@ describe('OCA.External.Settings tests', function() {
// but after closing the dropdown
expect(fakeServer.requests.length).toEqual(1);
});
- // TODO: tests with "applicableUsers" and "applicableGroups"
- // TODO: test with missing mount point value
- // TODO: test with personal mounts (no applicable fields)
- // TODO: test save triggers: paste, keyup, checkbox
- // TODO: test "custom" field with addScript
// TODO: status indicator
});
describe('validate storage configuration', function() {