[test] Separate tests for forms

This commit is contained in:
Ilya Kirillov
2025-10-08 14:06:58 +03:00
parent dd4ef70fd2
commit d574239a1f
5 changed files with 143 additions and 57 deletions

View File

@ -33,64 +33,65 @@
const path = require("path");
const allTests = [
'cell/spreadsheet-calculation/FormulaTests.html',
'cell/spreadsheet-calculation/PivotTests.html',
'cell/spreadsheet-calculation/copy-paste-tests.html',
'cell/spreadsheet-calculation/SheetStructureTests.html',
'cell/spreadsheet-calculation/autoFilterTests.html',
'cell/spreadsheet-calculation/UserProtectedRangesTest.html',
'cell/spreadsheet-calculation/FormulaTrace.html',
'cell/spreadsheet-calculation/whatIfAnalysisTests.html',
'cell/spreadsheet-calculation/NumFormatParse.html',
'cell/spreadsheet-calculation/DataValidationTests.html',
'cell/spreadsheet-calculation/conditionalFormattingTests.html',
'cell/spreadsheet-calculation/ExternalReference.html',
'cell/spreadsheet-calculation/SheetMemoryTest.html',
'word/unit-tests/paragraphContentPos.html',
'word/unit-tests/deleted-text-recovery.html',
'word/content-control/block-level/cursorAndSelection.html',
'word/content-control/inline-level/checkbox.html',
'word/content-control/inline-level/cursorAndSelection.html',
'word/content-control/inline-level/date-time.html',
'word/custom-xml/custom-xml.html',
'word/document-calculation/floating-position/drawing.html',
'word/document-calculation/paragraph.html',
'word/document-calculation/table/correctBadTable.html',
'word/document-calculation/table/flowTablePosition.html',
'word/document-calculation/table/pageBreak.html',
'word/document-calculation/table/table-flow.html',
'word/document-calculation/table/table-header.html',
'word/document-calculation/textShaper/textShaper.html',
'word/document-calculation/text-hyphenator/text-hyphenator.html',
'word/forms/forms.html',
'word/forms/complexForm.html',
'word/numbering/numberingApplicator.html',
'word/numbering/numberingCalculation.html',
'word/numbering/numberingAutocorrect.html',
'word/api/api.html',
'word/api/cross-ref.html',
'word/api/textInput.html',
'word/styles/displayStyle.html',
'word/styles/paraPr.html',
'word/styles/styleApplicator.html',
'word/text-autocorrection/as-you-type.html',
'word/plugins/pluginsApi.html',
'word/revisions/document-content.html',
'word/revisions/paragraph.html',
'word/merge-documents/mergeDocuments.html',
'word/math-autocorrection/math-autocorrection.html',
'word/math-ml/math-ml.html',
// 'cell/spreadsheet-calculation/FormulaTests.html',
// 'cell/spreadsheet-calculation/PivotTests.html',
// 'cell/spreadsheet-calculation/copy-paste-tests.html',
// 'cell/spreadsheet-calculation/SheetStructureTests.html',
// 'cell/spreadsheet-calculation/autoFilterTests.html',
// 'cell/spreadsheet-calculation/UserProtectedRangesTest.html',
// 'cell/spreadsheet-calculation/FormulaTrace.html',
// 'cell/spreadsheet-calculation/whatIfAnalysisTests.html',
// 'cell/spreadsheet-calculation/NumFormatParse.html',
// 'cell/spreadsheet-calculation/DataValidationTests.html',
// 'cell/spreadsheet-calculation/conditionalFormattingTests.html',
// 'cell/spreadsheet-calculation/ExternalReference.html',
// 'cell/spreadsheet-calculation/SheetMemoryTest.html',
//
// 'word/unit-tests/paragraphContentPos.html',
// 'word/unit-tests/deleted-text-recovery.html',
// 'word/content-control/block-level/cursorAndSelection.html',
// 'word/content-control/inline-level/checkbox.html',
// 'word/content-control/inline-level/cursorAndSelection.html',
// 'word/content-control/inline-level/date-time.html',
// 'word/custom-xml/custom-xml.html',
// 'word/document-calculation/floating-position/drawing.html',
// 'word/document-calculation/paragraph.html',
// 'word/document-calculation/table/correctBadTable.html',
// 'word/document-calculation/table/flowTablePosition.html',
// 'word/document-calculation/table/pageBreak.html',
// 'word/document-calculation/table/table-flow.html',
// 'word/document-calculation/table/table-header.html',
// 'word/document-calculation/textShaper/textShaper.html',
// 'word/document-calculation/text-hyphenator/text-hyphenator.html',
// 'word/forms/forms.html',
// 'word/forms/complexForm.html',
// 'word/numbering/numberingApplicator.html',
// 'word/numbering/numberingCalculation.html',
// 'word/numbering/numberingAutocorrect.html',
// 'word/api/api.html',
// 'word/api/cross-ref.html',
// 'word/api/textInput.html',
// 'word/styles/displayStyle.html',
// 'word/styles/paraPr.html',
// 'word/styles/styleApplicator.html',
// 'word/text-autocorrection/as-you-type.html',
// 'word/plugins/pluginsApi.html',
// 'word/revisions/document-content.html',
// 'word/revisions/paragraph.html',
// 'word/merge-documents/mergeDocuments.html',
// 'word/math-autocorrection/math-autocorrection.html',
// 'word/math-ml/math-ml.html',
'word/change-case/change-case.html',
'word/js-api/js-api.html',
'word/js-api/js-api-forms.html',
'cell/shortcuts/shortcuts.html',
'slide/shortcuts/shortcuts.html',
'word/shortcuts/shortcuts.html',
//related ooxml tests
'oform/xml/oformXml.html',
'word/custom-xml/custom-xml-ooxml.html',
// 'cell/shortcuts/shortcuts.html',
// 'slide/shortcuts/shortcuts.html',
// 'word/shortcuts/shortcuts.html',
//
// //related ooxml tests
// 'oform/xml/oformXml.html',
// 'word/custom-xml/custom-xml-ooxml.html',
];
const maxTestsAtOnce = require('events').defaultMaxListeners;

View File

@ -37,10 +37,10 @@ $(function()
AscTest.Editor.CreateRun = AscCommon.DocumentEditorApi.prototype.CreateRun.bind(AscTest.Editor);
AscTest.Editor.CreateParagraph = AscCommon.DocumentEditorApi.prototype.CreateParagraph.bind(AscTest.Editor);
AscTest.Editor.CreateInlineLvlSdt = AscCommon.DocumentEditorApi.prototype.CreateInlineLvlSdt.bind(AscTest.Editor);
AscTest.Editor.CreateTextForm = AscCommon.DocumentEditorApi.prototype.CreateTextForm.bind(AscTest.Editor);
QUnit.testStart(function()
{
AscTest.CreateLogicDocument();
AscCommon.History.Clear();
AscTest.ClearDocument();
});

View File

@ -0,0 +1,36 @@
/*
* (c) Copyright Ascensio System SIA 2010-2025
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
$(function()
{
AscTest.Editor.CreateTextForm = AscCommon.DocumentEditorApi.prototype.CreateTextForm.bind(AscTest.Editor);
});

View File

@ -0,0 +1,49 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title><!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Test the paragraph review</title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/qunit/2.16.0/qunit.css" rel="stylesheet" media="screen"/>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/qunit/2.16.0/qunit.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/xregexp/3.2.0/xregexp-all.min.js"></script>
<script type="text/javascript" src="../../../develop/sdkjs/word/scripts.js"></script>
<script type="text/javascript">
window.sdk_scripts.forEach(function(item)
{
document.write('<script type="text/javascript" src="' + item + '"><\/script>');
});
</script>
<script type="text/javascript" src="../common/common.js"></script>
<script type="text/javascript" src="../common/editor.js"></script>
<script type="text/javascript" src="../common/document.js"></script>
<script type="text/javascript" src="../common/measurer.js"></script>
<script type="text/javascript" src="common.js"></script>
<script type="text/javascript" src="forms.js"></script>
<script type="text/javascript" src="api-text-form.js"></script>
</head>
<body>
<h1 id="qunit-header">Test forms js-api</h1>
<h2 id="qunit-banner"></h2>
<div id="qunit-testrunner-toolbar"></div>
<h2 id="qunit-userAgent"></h2>
<ol id="qunit-tests"></ol>
<div id="qunit-fixture">test markup, will be hidden</div>
</body>
</html>
</title>
</head>
<body>
</body>
</html>

View File

@ -29,7 +29,7 @@
<script type="text/javascript" src="api-inline-level-sdt.js"></script>
<script type="text/javascript" src="api-paragraph.js"></script>
<script type="text/javascript" src="api-run.js"></script>
<script type="text/javascript" src="api-text-form.js"></script>
</head>
<body>
<h1 id="qunit-header">Test document js-api</h1>