修复了一些问题

This commit is contained in:
2026-08-21 13:27:53 +08:00
parent 28d57f2b7c
commit 0b8d7cdab5
3 changed files with 17 additions and 4 deletions
@@ -19,6 +19,7 @@ const headerMenuButtons = read('inc/helpers/aksrt-header-menu-buttons.php')
const frontendRenderer = read('src/WidgetSystem/FrontendRenderer.php')
const userRenderer = read('src/WidgetSystem/Renderers/UserRenderer.php')
const headerNavbar = read('inc/helpers/header/aksrt-header-navbar.php')
const headerUserbox = read('inc/helpers/aksrt-header-userbox.php')
const headerSearch = read('inc/helpers/header/aksrt-header-menu-search.php')
const headerCss = read('assets/css/frontend/header-userbox.css')
@@ -244,6 +245,13 @@ test('header user-card publish controls are removed from configuration and runti
assert.match(headerNavbar, /esc_html__\('发布内容', 'aksrt'\)/)
})
test('header user-card membership stays on one row with a date-only expiry', () => {
assert.match(headerUserbox, /wp_date\('Y年m月d日', \$expires\)/)
assert.doesNotMatch(headerUserbox, /wp_date\('Y-m-d H:i', \$expires\)/)
assert.match(headerCss, /\.aksrt-header-payvip__active\s*\{[^}]*flex-direction:\s*row;[^}]*gap:\s*8px !important;[^}]*white-space:\s*nowrap;/s)
assert.match(headerCss, /\.aksrt-header-payvip__exp\s*\{[^}]*display:\s*inline;[^}]*white-space:\s*nowrap;/s)
})
test('save contract rejects invalid input and round-trips canonical nested values', () => {
const result = spawnSync(process.env.PHP_BINARY || 'php', [path.join(__dirname, 'page-display-save-harness.php')], {
cwd: root,