fix(tests): repair stale pagination/lazyload contracts and ban defaults script
- pay-pages-pagination asserts the $parent_file base URL added in b74381cf
- Drop native loading="lazy" from message avatars and medal presets per
the lazyload contract
- verify-ban-settings-defaults requires SchemaUsersTicket and new deps
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
57ff405691
commit
ed1487d505
4 files changed
+9
-3
No files matched your search
@@ -172,7 +172,9 @@ test('共享助手自身:页码夹取、四按钮标记与显式基准 URL', (
|
||||
assert.match(helper, /\$current_page = min\(max\(1, \$current_page\), \$total_pages\);/);
|
||||
|
||||
// 基准 URL 显式拼装:add_query_arg 必带第三个参数(两参数写法会退回 REQUEST_URI)。
|
||||
assert.match(helper, /\$base\s*=\s*add_query_arg\(array_merge\(\['page' => \$page_slug\], \$query_args\), admin_url\('admin\.php'\)\);/);
|
||||
// 宿主菜单文件可传入(users.php 子菜单保持菜单高亮),默认 admin.php。
|
||||
assert.match(helper, /string \$parent_file = 'admin\.php'/);
|
||||
assert.match(helper, /\$base\s*=\s*add_query_arg\(array_merge\(\['page' => \$page_slug\], \$query_args\), admin_url\(\$parent_file\)\);/);
|
||||
assert.match(helper, /\$page_url = static function \(int \$page\) use \(\$base\): string \{/);
|
||||
assert.match(helper, /return add_query_arg\('paged', \$page, \$base\);/);
|
||||
assert.doesNotMatch(helper, /add_query_arg\('paged',\s*'[^']*'\s*\)/);
|
||||
|
||||
Reference in new issue
Block a user