/**
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
describe('OCA.Sharing.PublicApp tests', function() {
var App = OCA.Sharing.PublicApp;
var hostStub, protocolStub;
var originalWebroot;
var $preview;
beforeEach(function() {
originalWebroot = window._oc_webroot;
window._oc_webroot = '/owncloud';
protocolStub = sinon.stub(OC, 'getProtocol').returns('https');
hostStub = sinon.stub(OC, 'getHost').returns('example.com:9876');
$preview = $('
');
$('#testArea').append($preview);
$preview.append(
'' +
'' +
''
);
});
afterEach(function() {
window._oc_webroot = originalWebroot;
protocolStub.restore();
hostStub.restore();
});
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(
'