diff options
author | Christian Paier <hallo+git@cpaier.com> | 2022-01-30 16:32:48 +0100 |
---|---|---|
committer | Christian Paier <hallo+git@cpaier.com> | 2022-02-02 21:19:23 +0100 |
commit | 0942aed8db353b29d39ed4f895111262af2e755a (patch) | |
tree | fa33936f0abe1ea427ae5e0e4c4c2f2299a45d42 /apps/files/tests | |
parent | 5e5c31ea845c9551e3846a193f9e00c212b9b4ce (diff) | |
download | nextcloud-server-0942aed8db353b29d39ed4f895111262af2e755a.tar.gz nextcloud-server-0942aed8db353b29d39ed4f895111262af2e755a.zip |
Show the parent folders in the breadcrumb menu when on a child entry.
Previously, clicking on an menu item in the breadcrumb menu removed the
parent entries of the path, i.e.:
Clicking on the "to" entry in "/path/to/some/folder" changed the
breadcrumb menu to show only the "/path/to" entries.
With this change the breadcrumb menu changes this behaviour as the full
path is still visible (and usable) but with the "to" entry beeing
highlighted.
Signed-off-by: Christian Paier <hallo+git@cpaier.com>
Diffstat (limited to 'apps/files/tests')
-rw-r--r-- | apps/files/tests/js/breadcrumbSpec.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/files/tests/js/breadcrumbSpec.js b/apps/files/tests/js/breadcrumbSpec.js index 820b0f70569..b83ec78be7b 100644 --- a/apps/files/tests/js/breadcrumbSpec.js +++ b/apps/files/tests/js/breadcrumbSpec.js @@ -56,13 +56,15 @@ describe('OCA.Files.BreadCrumb tests', function() { expect($crumbs.eq(1).find('a').hasClass('icon-home')).toEqual(true); expect($crumbs.eq(1).data('dir')).toEqual('/'); }); - it('Renders root when switching to root', function() { + it('Renders complete directory when switching to root', function() { var $crumbs; bc.setDirectory('/somedir'); bc.setDirectory('/'); $crumbs = bc.$el.find('.crumb'); - expect($crumbs.length).toEqual(2); + expect($crumbs.length).toEqual(3); expect($crumbs.eq(1).data('dir')).toEqual('/'); + expect($crumbs.eq(2).data('dir')).toEqual('/somedir'); + expect($crumbs.eq(2).attr('class').includes("active")).toEqual(false); }); it('Renders single path section', function() { var $crumbs; |