进行了一些小修复
This commit is contained in:
1 parent
b80ac46147
commit
5121b33ad5
8 files changed
+663
-86
No files matched your search
@@ -49,6 +49,29 @@ test('front submit follows the reference newposts shell and cards', () => {
|
||||
assert.match(submit, /new-posts-submit/);
|
||||
});
|
||||
|
||||
test('front submit image and visibility actions live in the TinyMCE toolbar', () => {
|
||||
const main = read('templates/parts/submit/editor-main.php');
|
||||
const page = read('templates/pages/page-submit.php');
|
||||
const submit = read('assets/js/front-submit.js');
|
||||
const editor = read('assets/js/front-submit-editor.js');
|
||||
|
||||
assert.match(main, /\$toolbar1\[\]\s*=\s*'aksrt_image'/);
|
||||
assert.match(main, /\$toolbar1\[\]\s*=\s*'aksrt_hide'/);
|
||||
assert.match(main, /mce_external_plugins/);
|
||||
assert.match(main, /aksrt_editor_tools/);
|
||||
assert.match(editor, /PluginManager\.add\('aksrt_editor_tools'/);
|
||||
assert.match(editor, /addButton\('aksrt_image'/);
|
||||
assert.match(editor, /addButton\('aksrt_hide'/);
|
||||
assert.match(editor, /type:\s*'menubutton'/);
|
||||
assert.match(editor, /data-editor-media-tab="upload"/);
|
||||
assert.match(editor, /data-editor-media-tab="external"/);
|
||||
assert.match(editor, /\(cfg\.uploads \|\| \{\}\)\.image/);
|
||||
assert.match(page, /'canUploadImage'\s*=>\s*!empty\(\$ctx\['can_upload_img'\]\)/);
|
||||
assert.doesNotMatch(main, /newposts-editor-tools|data-insert-shortcode|data-insert-upload-image/);
|
||||
assert.doesNotMatch(submit, /bindShortcodes|data-insert-shortcode|data-insert-upload-image/);
|
||||
assert.doesNotMatch(editor, /hidecontent|shop|forum|bbs_/i);
|
||||
});
|
||||
|
||||
test('article paid-content metabox follows the reference field set without shop enhancements', () => {
|
||||
const meta = read('src/Core/ResourceMetaBox.php');
|
||||
const fields = [
|
||||
|
||||
Reference in new issue
Block a user