进行了一些小修复
This commit is contained in:
@@ -16,6 +16,22 @@ test('front submit enqueues the WordPress editor before wp_head is rendered', ()
|
||||
assert.ok(enqueueAt < headerAt, 'editor assets must be queued before get_header()/wp_head');
|
||||
});
|
||||
|
||||
test('front submit uploads use the effective WordPress server limit', () => {
|
||||
const controller = read('src/Core/FrontSubmit.php');
|
||||
const page = read('templates/pages/page-submit.php');
|
||||
|
||||
assert.match(controller, /function upload_limit_bytes\(string \$kind\): int/);
|
||||
assert.match(controller, /min\(\$configured_mb \* MB_IN_BYTES, \(int\) wp_max_upload_size\(\)\)/);
|
||||
assert.match(controller, /UPLOAD_ERR_INI_SIZE/);
|
||||
assert.match(controller, /UPLOAD_ERR_FORM_SIZE/);
|
||||
assert.match(controller, /UPLOAD_ERR_PARTIAL/);
|
||||
assert.match(controller, /\['status' => 413\]/);
|
||||
assert.match(page, /FrontSubmit::upload_limit_bytes\('image'\)/);
|
||||
assert.match(page, /FrontSubmit::upload_limit_bytes\('video'\)/);
|
||||
assert.match(page, /FrontSubmit::upload_limit_bytes\('resource'\)/);
|
||||
assert.doesNotMatch(page, /\$attachment_settings\s*=/);
|
||||
});
|
||||
|
||||
test('published post content reaches the front submit editor unchanged', () => {
|
||||
const context = read('templates/parts/submit/context.php');
|
||||
const editor = read('templates/parts/submit/editor-main.php');
|
||||
|
||||
@@ -100,6 +100,9 @@ test('the article cashier uses the reference modal contract and one direct asset
|
||||
assert.match(css, /\.aksrt-dl-modal \.modal-colorful-header/);
|
||||
assert.match(css, /\.aksrt-dl-modal \.payment-method-radio/);
|
||||
assert.match(css, /\.aksrt-dl-modal \.but\.initiate-pay/);
|
||||
assert.match(css, /\.aksrt-dl-modal\.is-cashier \.aksrt-dl-modal__body\s*\{[^}]*padding-top:\s*120px;/s);
|
||||
assert.match(css, /\.aksrt-dl-modal \.modal-pay-body\s*\{[^}]*margin-top:\s*0;/s);
|
||||
assert.doesNotMatch(css, /\.aksrt-dl-modal \.modal-pay-body\s*\{[^}]*margin-top:\s*120px;/s);
|
||||
assert.match(assets, /assets\/css\/frontend\/cms-download\.css/);
|
||||
assert.match(assets, /filemtime\(\$cms_download_css_path\)/);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user