进行了一些小修复

This commit is contained in:
2026-08-26 19:51:31 +08:00
parent 02cbff1ddf
commit fbada8bd6a
20 changed files with 294 additions and 191 deletions
@@ -88,3 +88,17 @@ test('public theme does not inject a global focus-visible ring', () => {
assert.doesNotMatch(publicCss, globalFocusRule);
assert.doesNotMatch(publicMinCss, globalFocusRule);
});
test('front submit TinyMCE status bar shows one live character counter', () => {
const editor = read('assets/js/front-submit-editor.js');
const submitCss = read('assets/css/frontend/pages/submit.css');
const legacyPageEdit = read('assets/js/page-edit.js');
assert.match(editor, /querySelector\('\.mce-statusbar \.mce-container-body'\)/);
assert.match(editor, /data-submit-word-count/);
assert.match(editor, /textContent\s*=\s*'字数:'\s*\+\s*count/);
assert.match(editor, /editor\.on\('init SetContent input keyup change Undo Redo'/);
assert.match(editor, /replace\(\/\\s\+\/g, ''\)\.length/);
assert.match(submitCss, /\.newposts-editor \.aksrt-submit-word-count\s*{[^}]*float:\s*right;/);
assert.doesNotMatch(legacyPageEdit, /initWordCount|updateWordCount|aksrt-page-edit__word-count|字数:/);
});