summaryrefslogtreecommitdiffstats
path: root/apps/files_external/tests
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-02-27 12:27:25 +0100
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-02-27 12:27:25 +0100
commitf1634cd3e28d7b2117af5074755745015b3237e7 (patch)
treed0a12541a46a304f0a8aa7a754965ba052aa888a /apps/files_external/tests
parent324e96b780ecbe77088d490ebb32c48cc42c7a97 (diff)
downloadnextcloud-server-f1634cd3e28d7b2117af5074755745015b3237e7.tar.gz
nextcloud-server-f1634cd3e28d7b2117af5074755745015b3237e7.zip
fixup! Fixed tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files_external/tests')
-rw-r--r--apps/files_external/tests/js/settingsSpec.js40
1 files changed, 20 insertions, 20 deletions
diff --git a/apps/files_external/tests/js/settingsSpec.js b/apps/files_external/tests/js/settingsSpec.js
index 9edf0deee66..d68b2a5dd88 100644
--- a/apps/files_external/tests/js/settingsSpec.js
+++ b/apps/files_external/tests/js/settingsSpec.js
@@ -213,7 +213,7 @@ describe('OCA.External.Settings tests', function() {
expect($mountOptionsField.length).toEqual(1);
$mountOptionsField.val(JSON.stringify({previews:true}));
- var $saveButton = $tr.find('td.save img');
+ var $saveButton = $tr.find('td.save .icon-save');
$saveButton.click();
expect(fakeServer.requests.length).toEqual(1);
@@ -238,17 +238,17 @@ describe('OCA.External.Settings tests', function() {
// TODO: respond and check data-id
});
- it('saves storage after closing mount options dropdown', function() {
- $tr.find('.mountOptionsToggle img').click();
+ it('saves storage after closing mount options popovermenu', function() {
+ $tr.find('.mountOptionsToggle .icon-settings-dark').click();
$tr.find('[name=previews]').trigger(new $.Event('keyup', {keyCode: 97}));
$tr.find('input[data-parameter=field1]').val('test');
- // does not save inside the dropdown
+ // does not save inside the popovermenu
expect(fakeServer.requests.length).toEqual(0);
$('body').mouseup();
- // but after closing the dropdown
+ // but after closing the popovermenu
expect(fakeServer.requests.length).toEqual(1);
});
// TODO: status indicator
@@ -320,7 +320,7 @@ describe('OCA.External.Settings tests', function() {
describe('recheck storages', function() {
// TODO
});
- describe('mount options dropdown', function() {
+ describe('mount options popovermenu', function() {
var $tr;
var $td;
@@ -330,45 +330,45 @@ describe('OCA.External.Settings tests', function() {
selectBackend('\\OC\\TestBackend');
});
- it('shows dropdown when clicking on toggle button, hides when clicking outside', function() {
- $td.find('img').click();
+ it('shows popovermenu when clicking on toggle button, hides when clicking outside', function() {
+ $td.find('.icon-settings-dark').click();
- expect($td.find('.dropdown').length).toEqual(1);
+ expect($td.find('.popovermenu.open').length).toEqual(1);
$('body').mouseup();
- expect($td.find('.dropdown').length).toEqual(0);
+ expect($td.find('.popovermenu.open').length).toEqual(0);
});
it('doesnt show the encryption option when encryption is disabled', function () {
view._encryptionEnabled = false;
- $td.find('img').click();
+ $td.find('.icon-settings-dark').click();
- expect($td.find('.dropdown [name=encrypt]:visible').length).toEqual(0);
+ expect($td.find('.popovermenu [name=encrypt]:visible').length).toEqual(0);
$('body').mouseup();
- expect($td.find('.dropdown').length).toEqual(0);
+ expect($td.find('.popovermenu.open').length).toEqual(0);
});
it('reads config from mountOptions field', function() {
$tr.find('input.mountOptions').val(JSON.stringify({previews:false}));
- $td.find('img').click();
- expect($td.find('.dropdown [name=previews]').prop('checked')).toEqual(false);
+ $td.find('.icon-settings-dark').click();
+ expect($td.find('.popovermenu [name=previews]').prop('checked')).toEqual(false);
$('body').mouseup();
$tr.find('input.mountOptions').val(JSON.stringify({previews:true}));
- $td.find('img').click();
- expect($td.find('.dropdown [name=previews]').prop('checked')).toEqual(true);
+ $td.find('.icon-settings-dark').click();
+ expect($td.find('.popovermenu [name=previews]').prop('checked')).toEqual(true);
});
it('writes config into mountOptions field', function() {
- $td.find('img').click();
+ $td.find('.icon-settings-dark').click();
// defaults to true
- var $field = $td.find('.dropdown [name=previews]');
+ var $field = $td.find('.popovermenu [name=previews]');
expect($field.prop('checked')).toEqual(true);
- $td.find('.dropdown [name=filesystem_check_changes]').val(0);
+ $td.find('.popovermenu [name=filesystem_check_changes]').val(0);
$('body').mouseup();
expect(JSON.parse($tr.find('input.mountOptions').val())).toEqual({