diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-11-13 12:19:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-13 12:19:05 +0100 |
commit | ff2d4432d8af7f8d1d17d9740f985bb36db531fc (patch) | |
tree | 3bae3c8530c0e1cf9bce78e2b1d02966660e6be4 /apps/files/tests/js/filelistSpec.js | |
parent | 26bcf40e9e0b35b851ff1aecab8dd9fd2b1be80e (diff) | |
parent | 8c2dbeb13a71ca320f6953302f75ce491c4f1aff (diff) | |
download | nextcloud-server-ff2d4432d8af7f8d1d17d9740f985bb36db531fc.tar.gz nextcloud-server-ff2d4432d8af7f8d1d17d9740f985bb36db531fc.zip |
Merge pull request #7051 from nextcloud/breadcrumbs-refactor
Breadcrumbs refactor
Diffstat (limited to 'apps/files/tests/js/filelistSpec.js')
-rw-r--r-- | apps/files/tests/js/filelistSpec.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js index fd011474eb1..c590275e1cf 100644 --- a/apps/files/tests/js/filelistSpec.js +++ b/apps/files/tests/js/filelistSpec.js @@ -1657,7 +1657,7 @@ describe('OCA.Files.FileList tests', function() { fileList.changeDirectory('/subdir/two/three with space/four/five'); deferredList.resolve(200, [testRoot].concat(testFiles)); var changeDirStub = sinon.stub(fileList, 'changeDirectory'); - fileList.breadcrumb.$el.find('.crumb:eq(0)').trigger({type: 'click', which: 1}); + fileList.breadcrumb.$el.find('.crumb:eq(1) > a').trigger({type: 'click', which: 1}); expect(changeDirStub.calledOnce).toEqual(true); expect(changeDirStub.getCall(0).args[0]).toEqual('/'); @@ -1667,7 +1667,7 @@ describe('OCA.Files.FileList tests', function() { fileList.changeDirectory('/subdir/two/three with space/four/five'); deferredList.resolve(200, [testRoot].concat(testFiles)); var changeDirStub = sinon.stub(fileList, 'changeDirectory'); - fileList.breadcrumb.$el.find('.crumb:eq(3)').trigger({type: 'click', which: 1}); + fileList.breadcrumb.$el.find('.crumb:eq(4) > a').trigger({type: 'click', which: 1}); expect(changeDirStub.calledOnce).toEqual(true); expect(changeDirStub.getCall(0).args[0]).toEqual('/subdir/two/three with space'); @@ -1678,7 +1678,7 @@ describe('OCA.Files.FileList tests', function() { var moveStub = sinon.stub(filesClient, 'move').returns($.Deferred().promise()); fileList.changeDirectory(testDir); deferredList.resolve(200, [testRoot].concat(testFiles)); - var $crumb = fileList.breadcrumb.$el.find('.crumb:eq(3)'); + var $crumb = fileList.breadcrumb.$el.find('.crumb:eq(4)'); // no idea what this is but is required by the handler var ui = { helper: { @@ -3013,7 +3013,7 @@ describe('OCA.Files.FileList tests', function() { it('drop on a breadcrumb inside the table triggers upload to target folder', function() { var ev; fileList.changeDirectory('a/b/c/d'); - ev = dropOn(fileList.$el.find('.crumb:eq(2)'), uploadData); + ev = dropOn(fileList.$el.find('.crumb:eq(3)'), uploadData); expect(ev).not.toEqual(false); expect(uploadData.targetDir).toEqual('/a/b'); |