aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2018-08-02 11:45:04 +0200
committerJulius Härtl <jus@bitgrid.net>2018-08-02 11:45:04 +0200
commit84f99db7ab96746b9dc3fa662c136912c34274eb (patch)
treeb4ec81e295c5ac115bcc487952914d8503662d11
parent0dd519cff180d93d62c06b30b2706b2413c2895c (diff)
downloadnextcloud-server-84f99db7ab96746b9dc3fa662c136912c34274eb.tar.gz
nextcloud-server-84f99db7ab96746b9dc3fa662c136912c34274eb.zip
files_external: Fix jsunit tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
-rw-r--r--apps/files_external/tests/js/settingsSpec.js17
1 files changed, 7 insertions, 10 deletions
diff --git a/apps/files_external/tests/js/settingsSpec.js b/apps/files_external/tests/js/settingsSpec.js
index fbbb341c307..78136fc6bf6 100644
--- a/apps/files_external/tests/js/settingsSpec.js
+++ b/apps/files_external/tests/js/settingsSpec.js
@@ -46,12 +46,9 @@ describe('OCA.External.Settings tests', function() {
'<input type="hidden" class="applicableUsers">' +
'</td>' +
'<td class="mountOptionsToggle">'+
- '<div class="icon-settings-dark" title="Advanced settings" deluminate_imagetype="unknown"></div>'+
+ '<div class="icon-more" title="Advanced settings" deluminate_imagetype="unknown"></div>'+
'<input type="hidden" class="mountOptions"/>'+
'</td>'+
- '<td class="remove">'+
- '<div class="icon-delete" title="Delete" deluminate_imagetype="unknown"></div>'+
- '</td>'+
'<td class="save">'+
'<div class="icon-checkmark" title="Save" deluminate_imagetype="unknown"></div>'+
'</td>'+
@@ -239,7 +236,7 @@ describe('OCA.External.Settings tests', function() {
// TODO: respond and check data-id
});
it('saves storage after closing mount options popovermenu', function() {
- $tr.find('.mountOptionsToggle .icon-settings-dark').click();
+ $tr.find('.mountOptionsToggle .icon-more').click();
$tr.find('[name=previews]').trigger(new $.Event('keyup', {keyCode: 97}));
$tr.find('input[data-parameter=field1]').val('test');
@@ -331,7 +328,7 @@ describe('OCA.External.Settings tests', function() {
});
it('shows popovermenu when clicking on toggle button, hides when clicking outside', function() {
- $td.find('.icon-settings-dark').click();
+ $td.find('.icon-more').click();
expect($td.find('.popovermenu.open').length).toEqual(1);
@@ -342,7 +339,7 @@ describe('OCA.External.Settings tests', function() {
it('doesnt show the encryption option when encryption is disabled', function () {
view._encryptionEnabled = false;
- $td.find('.icon-settings-dark').click();
+ $td.find('.icon-more').click();
expect($td.find('.popovermenu [name=encrypt]:visible').length).toEqual(0);
@@ -354,17 +351,17 @@ describe('OCA.External.Settings tests', function() {
it('reads config from mountOptions field', function() {
$tr.find('input.mountOptions').val(JSON.stringify({previews:false}));
- $td.find('.icon-settings-dark').click();
+ $td.find('.icon-more').click();
expect($td.find('.popovermenu [name=previews]').prop('checked')).toEqual(false);
$('body').mouseup();
$tr.find('input.mountOptions').val(JSON.stringify({previews:true}));
- $td.find('.icon-settings-dark').click();
+ $td.find('.icon-more').click();
expect($td.find('.popovermenu [name=previews]').prop('checked')).toEqual(true);
});
it('writes config into mountOptions field', function() {
- $td.find('.icon-settings-dark').click();
+ $td.find('.icon-more').click();
// defaults to true
var $field = $td.find('.popovermenu [name=previews]');
expect($field.prop('checked')).toEqual(true);