进行了一些小修复

This commit is contained in:
kate522 committed 2026-08-26 16:59:42 +08:00
1 parent b80ac46147
commit 5121b33ad5
8 files changed
+663 -86

No files matched your search

+4 -2
View File
@@ -369,6 +369,8 @@ test('settings actions use rehydrated fixed-id notyf flows', () => {
test('front submit actions use direct fixed-id notyf flows', () => {
const submit = read('assets/js/front-submit.js');
const editor = read('assets/js/front-submit-editor.js');
const source = submit + '\n' + editor;
const page = read('templates/pages/page-submit.php');
[
@@ -382,7 +384,7 @@ test('front submit actions use direct fixed-id notyf flows', () => {
'aksrt-front-submit-editor-image-toast',
'aksrt-front-submit-ai-tags-toast',
'aksrt-front-submit-ai-summary-toast',
].forEach((id) => assert.match(submit, new RegExp("['\"]" + id + "['\"]")));
].forEach((id) => assert.match(source, new RegExp("['\"]" + id + "['\"]")));
assert.match(submit, /submit: function[\s\S]*?notyf\([^;]+?'load'[^;]+?toastId[\s\S]*?notyf\([^;]+?'success'[^;]+?toastId[\s\S]*?notyf\([^;]+?'danger'[^;]+?toastId/);
assert.match(submit, /bindDraftDelete: function[\s\S]*?'aksrt-front-submit-delete-draft-toast'[\s\S]*?'load'[\s\S]*?'success'[\s\S]*?'danger'/);
@@ -398,7 +400,7 @@ test('front submit actions use direct fixed-id notyf flows', () => {
});
assert.match(submit, /aksrt-front-submit-resource-upload-toast[\s\S]*?'load'[\s\S]*?'success'[\s\S]*?'danger'/);
assert.match(submit, /aksrt-front-submit-editor-image-toast[\s\S]*?'load'[\s\S]*?'success'[\s\S]*?'danger'/);
assert.match(editor, /aksrt-front-submit-editor-image-toast[\s\S]*?'load'[\s\S]*?'success'[\s\S]*?'danger'/);
assert.match(submit, /aksrt-front-submit-ai-tags-toast[\s\S]*?aksrt-front-submit-ai-summary-toast[\s\S]*?'load'[\s\S]*?'success'[\s\S]*?'danger'/);
assert.match(submit, /needContent[^;]+?'warning'/);
assert.doesNotMatch(submit, /\b(?:window\.)?alert\s*\(/);