From 0d60b08702c496756b8b43b54a9063f9300ead38 Mon Sep 17 00:00:00 2001 From: ansuz Date: Fri, 2 Apr 2021 19:30:48 +0530 Subject: [PATCH] test that XLSX export headers are correctly set in checkup app --- .../src/less2/pages/page-checkup.less | 2 +- www/checkup/main.js | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/customize.dist/src/less2/pages/page-checkup.less b/customize.dist/src/less2/pages/page-checkup.less index 2a05600c7..9119a4b72 100644 --- a/customize.dist/src/less2/pages/page-checkup.less +++ b/customize.dist/src/less2/pages/page-checkup.less @@ -52,7 +52,7 @@ html, body { .advisory-text { display: inline-block; - word-break: break-all; + word-break: break-word; padding: 5px; //font-size: 16px; border: 1px solid red; diff --git a/www/checkup/main.js b/www/checkup/main.js index 5dcd1e8cf..42864b4f3 100644 --- a/www/checkup/main.js +++ b/www/checkup/main.js @@ -202,6 +202,24 @@ define([ }, _alert("Login block is not working (write/read/remove)")); + assert(function (cb) { + var url = '/common/onlyoffice/v4/web-apps/apps/spreadsheeteditor/main/index.html'; + var expect = { + 'cross-origin-resource-policy': 'cross-origin', + 'cross-origin-embedder-policy': 'require-corp', + }; + + $.ajax(url, { + success: function (data, textStatus, xhr) { + cb(!Object.keys(expect).some(function (k) { + var response = xhr.getResponseHeader(k); + console.log(k, response); + return response !== expect[k]; + })); + }, + }); + }, _alert("Missing HTTP headers required for XLSX export")); + var row = function (cells) { return h('tr', cells.map(function (cell) { return h('td', cell);