mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 09:59:47 -05:00
Remove the progressive HTML4/Legacy Omi middleware, cookieless sessions, page controllers, assets, parity refactors, design documents and associated tests. Restore the standard Meteor interface and operations from before the HTML4 work began. Preserve intervening translations, backup screenshots, session upgrades, cryptographic test identifiers, local image storage, document previews and lazy browser loading. Extract the GIF utilities still required by image features into imageGif. Validate the Node suites and add standard-interface and GIF regressions. Two existing failures remain in docsLinksResolve and ruleDetailsLocalization; browser regressions are registered but require a running server. Thanks to xet7 !
62 lines
1.5 KiB
JavaScript
62 lines
1.5 KiB
JavaScript
#!/usr/bin/env node
|
|
|
|
const assert = require('node:assert/strict');
|
|
const fs = require('node:fs');
|
|
const path = require('node:path');
|
|
|
|
const root = path.resolve(__dirname, '..');
|
|
const cardDate = fs.readFileSync(
|
|
path.join(root, 'client/components/cards/cardDate.js'),
|
|
'utf8',
|
|
);
|
|
const cardDetails = fs.readFileSync(
|
|
path.join(root, 'client/components/cards/cardDetails.js'),
|
|
'utf8',
|
|
);
|
|
const datePicker = fs.readFileSync(
|
|
path.join(root, 'client/lib/datepicker.js'),
|
|
'utf8',
|
|
);
|
|
|
|
for (const method of ['setReceived', 'setStart', 'setDue', 'setEnd']) {
|
|
assert.match(
|
|
cardDate,
|
|
new RegExp(`return currentCard\\.${method}\\(date\\);`),
|
|
`${method} callback must return its update promise`,
|
|
);
|
|
}
|
|
|
|
for (const method of ['unsetReceived', 'unsetStart', 'unsetDue', 'unsetEnd']) {
|
|
assert.match(
|
|
cardDate,
|
|
new RegExp(`return currentCard\\.${method}\\(\\);`),
|
|
`${method} callback must return its update promise`,
|
|
);
|
|
}
|
|
|
|
for (const method of [
|
|
'cards.setVoteEnd',
|
|
'cards.unsetVoteEnd',
|
|
'cards.setPokerEnd',
|
|
'cards.unsetPokerEnd',
|
|
]) {
|
|
assert.match(
|
|
cardDetails,
|
|
new RegExp(`await Meteor\\.callAsync\\('${method.replace('.', '\\.')}'`),
|
|
`${method} callback must await the server method`,
|
|
);
|
|
}
|
|
|
|
assert.match(
|
|
datePicker,
|
|
/datePicker\.date\.set\(dateObj\);/,
|
|
'a valid edited date must update the reactive popup draft',
|
|
);
|
|
assert.match(
|
|
datePicker,
|
|
/datePicker\.date\.set\(draftDate\);/,
|
|
'a valid edited time must update the reactive popup draft',
|
|
);
|
|
|
|
console.log('datePickerCallbacks: 14 tests passed');
|