mirror of
https://github.com/wekan/wekan.git
synced 2026-11-25 04:49:41 -05:00
The newest test run had two failures. tests/changelogFormat.test.cjs failed on "the binaries table follows the summary": the Upcoming section written after v10.71 had lost the binaries table that every release section carries. It is restored from what v10.71 shipped, and two group lines that had wrapped onto a second line are one line again, which is what the grouping guard requires. The mocha stage did not run at all. client/lib/tests/boardTriggersClass.tests.js reads boardTriggers.jade and boardTriggers.js off disk with fs and path, which worked only while node-polyfill-webpack-plugin's browser shims were in the client bundle; the @meteorjs/rspack 2.1.0 update dropped that plugin and the client build stopped with "Cannot find module 'path' for matched aliased key 'path'". That is not one suite failing - the bundle does not build, so every mocha suite is skipped and the stage reports a crash where its results should be. The suite was on the wrong side rather than wrong: it now lives in server/lib/tests, and tests/clientTestsNoNodeBuiltins.test.cjs is the mirror of the existing guard that keeps browser-only packages out of the server bundle. Issue #6274, "export includes only comments from current year", and its fix in PR #6275 were then checked against the current source. The fix is intact and survived the streaming-export rewrite that came after it: both exporters select comments by cardId and activities by boardId OR cardId. The follow-up its reporter left on that PR - "the export is now missing the lists part" - is not reproducible: result.lists has been written by the JSON exporter continuously since the CSV/TSV export was added, both JSON writers emit the same fourteen sections, and the flat formats carry each list's name on the card's own row. So no export code changed; what was missing was the guard, and tests/exportBoardSections.test.cjs pins the section list, that the two JSON writers agree on it, that no exporter selects comments by board again, and the two smaller fixes from that PR. Not run here: this sandbox has no node, meteor or any other JS runtime, so the new and changed guards were verified by porting them assertion-for-assertion to Python and running that against the same files - changelogFormat 16/16, the export and client-bundle guards clean. The mocha suites behind the fixed build have not executed yet; the next run is what shows them. Thanks to Tuphal, KhaoulaMaleh and xet7 !
75 lines
3.3 KiB
JavaScript
75 lines
3.3 KiB
JavaScript
// Bootstrap the collection-prototype shim (.helpers / .attachSchema / hooks)
|
|
// BEFORE any test pulls in a model. The normal server entry (server/main.js)
|
|
// require()s this first; the `meteor test` entry does not, so without this the
|
|
// first model that calls Collection.helpers({...}) — e.g. models/positionHistory.js
|
|
// reached via utils.tests → models/boards — throws "helpers is not a function".
|
|
// ES import statements evaluate in source order, so this must stay the first one.
|
|
import '/imports/collectionHelpers';
|
|
|
|
// i18n (TAPi18n) is isomorphic and used on the server too, so run its tests here
|
|
// as the old tests/main.js did (top-level import, no block import for swc/Meteor 3).
|
|
import '/imports/i18n/i18n.test.js';
|
|
import './utils.tests';
|
|
import './users.security.tests';
|
|
import './boards.security.tests';
|
|
import './cards.security.tests';
|
|
import './cards.methods.tests';
|
|
import './attachmentApi.tests';
|
|
import './attachmentApi.authContext.tests';
|
|
import './headerLoginAuth.tests';
|
|
import './search.logic.tests';
|
|
import './fileStoreStrategy.security.tests';
|
|
import './clonebleed.security.tests';
|
|
import './permissions.security.tests';
|
|
import './dependencies.metadata.tests';
|
|
import './dependencies.openapi.tests';
|
|
import './cards.dependencies.move.tests';
|
|
import './jiraCreator.dependencies.tests';
|
|
import './attachmentActivity.tests';
|
|
import './comments.permissions.tests';
|
|
import './announcementDismiss.tests';
|
|
import './boardSearch.comments.tests';
|
|
import './dueDateEdits.tests';
|
|
import './icsImport.tests';
|
|
import './orgTeamRestriction.tests';
|
|
import './cardsCopyDueFixes.tests';
|
|
import './archivePermission.tests';
|
|
import './selectAllSwimlane.tests';
|
|
import './swimlaneCopyLabels.tests';
|
|
import './attachmentDeleteActor.tests';
|
|
import './titleChangeActivity.tests';
|
|
import './removeMissingMember.tests';
|
|
import './boardListFilter.tests';
|
|
import './restCardFixes.tests';
|
|
import './checklistHideToggle.tests';
|
|
import './listColor.tests';
|
|
import './customNumberFormat.tests';
|
|
import './languageNames.tests';
|
|
import './subtaskSettings.tests';
|
|
import './subtaskCreation.tests';
|
|
import './deleteWebhookActivity.tests';
|
|
import './webhookNonBlocking.tests';
|
|
import './apiResponseHelpers.tests';
|
|
import './dnsbleed.security.tests';
|
|
import './fileValidationBypass.security.tests';
|
|
import './importExportSecurity.tests';
|
|
import './impersonationReportQuery.tests';
|
|
import './brokenCardsRepair.tests';
|
|
|
|
// #6520: these three suites existed but were never imported here, so `meteor test`
|
|
// silently skipped them - including two *bleed security regression suites, exactly
|
|
// the kind of test whose absence lets a fixed vulnerability come back unnoticed.
|
|
import './checklistbleed.security.tests';
|
|
import './proxybleed.security.tests';
|
|
import './filenameTruncation.tests';
|
|
|
|
// Moved here from client/lib/tests in v10.72. It reads boardTriggers.jade and
|
|
// boardTriggers.js off disk with fs/path, which are server-only: while the
|
|
// client bundle still carried node-polyfill-webpack-plugin's browser shims it
|
|
// bundled anyway, and when that plugin left with the @meteorjs/rspack 2.1.0
|
|
// update the whole `meteor test` client build stopped with "Cannot find module
|
|
// 'path' for matched aliased key 'path'" - one file's imports failing every
|
|
// mocha suite there is. A test that reads the repository belongs on the side
|
|
// that has a filesystem.
|
|
import './boardTriggersClass.tests';
|