From 8be9b04981c4f0bdf0a2b8d424f55c797ad90a32 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Wed, 27 Jul 2022 10:23:44 +0200 Subject: Remove legacy #dir element in files list Removed legacy "#dir" input element in the DOM. Apps should use OCA.Files.App.currentFileList or OCA.Sharing.PublicApp.fileList and call getCurrentDirectory() to retrieve the current directory and changeDirectory() to change it. Signed-off-by: Vincent Petry --- apps/files_sharing/tests/js/publicAppSpec.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'apps/files_sharing/tests/js') diff --git a/apps/files_sharing/tests/js/publicAppSpec.js b/apps/files_sharing/tests/js/publicAppSpec.js index e8e5f0a5109..59ac4bd7bbd 100644 --- a/apps/files_sharing/tests/js/publicAppSpec.js +++ b/apps/files_sharing/tests/js/publicAppSpec.js @@ -51,12 +51,12 @@ describe('OCA.Sharing.PublicApp tests', function() { }); describe('File list', function() { + var parseUrlQueryStub // TODO: this should be moved to a separate file once the PublicFileList is extracted from public.js beforeEach(function() { $preview.append( '
' + // init horrible parameters - '' + '' + // dummy controls '
' + @@ -88,10 +88,13 @@ describe('OCA.Sharing.PublicApp tests', function() { '
' ); + parseUrlQueryStub = sinon.stub(OC.Util.History, 'parseUrlQuery'); + parseUrlQueryStub.returns({path: '/subdir'}); App.initialize($('#preview')); }); afterEach(function() { App._initialized = false; + parseUrlQueryStub.restore(); }); it('Uses public webdav endpoint', function() { -- cgit v1.2.3