进行了一些小修复
This commit is contained in:
@@ -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|字数:/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user