feat(forum): rebuild forum home page
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
51d5b8a2a1
commit
024ecddfed
16 files changed
+1061
-198
No files matched your search
@@ -69,7 +69,7 @@ async function run() {
|
||||
})
|
||||
await sleep(800)
|
||||
const result = await call('Runtime.evaluate', {
|
||||
expression: `({forum:!!document.getElementById('forum'),posts:document.querySelectorAll('.jio-forum__post').length,locked:document.body.textContent.includes('内容已隐藏'),leaked:document.documentElement.innerHTML.includes('需要积分查看的正文'),overflow:document.documentElement.scrollWidth>document.documentElement.clientWidth,width:innerWidth})`,
|
||||
expression: `({forum:!!document.getElementById('forum'),posts:document.querySelectorAll('.forum-posts').length,locked:document.body.textContent.includes('内容已隐藏'),leaked:document.documentElement.innerHTML.includes('需要积分查看的正文'),overflow:document.documentElement.scrollWidth>document.documentElement.clientWidth,width:innerWidth})`,
|
||||
returnByValue: true,
|
||||
})
|
||||
const state = result.result.value
|
||||
|
||||
@@ -23,12 +23,12 @@ test('every forum page mounts the dedicated runtime and the public write routes
|
||||
test('paid content has server-side presentation guards beyond its page body', () => {
|
||||
const access = read('src/Forum/Access.php')
|
||||
const integration = read('src/Forum/Integration.php')
|
||||
const view = read('src/Forum/View.php')
|
||||
const cards = read('src/Forum/Cards.php')
|
||||
assert.match(access, /function can_view\(/)
|
||||
assert.match(integration, /add_filter\('the_content'/)
|
||||
assert.match(integration, /add_filter\('get_the_excerpt'/)
|
||||
assert.match(integration, /add_filter\('jio_seo_head_payload'/)
|
||||
assert.match(view, /Access::can_view\(get_current_user_id\(\), \$post->ID\)/)
|
||||
assert.match(cards, /Access::can_view\(get_current_user_id\(\), \$id\)/)
|
||||
})
|
||||
|
||||
test('forum management, account, search and responsive styles remain connected', () => {
|
||||
|
||||
Reference in new issue
Block a user