fix(widgets): align user card action buttons

This commit is contained in:
2026-09-03 21:33:30 +08:00
parent 5b48be68da
commit 4f8ab94fac
5 changed files with 15 additions and 61 deletions
@@ -39,6 +39,10 @@ test('user and author widgets render the reference state contract', () => {
assert.match(data.logged, /<div class="user-desc mt10 muted-2-color em09">/)
assert.doesNotMatch(data.logged, /data-post-type=/)
assert.match(data.logged_buttons, /class="newadd-btns but pw-1em mr6 jb-pink" href="https:\/\/example\.test\/new-post">发布文章<\/a>/)
assert.match(data.logged_buttons, /rel="nofollow" href="https:\/\/example\.test\/user-center" class="but pw-1em ml6 jb-blue">用户中心<\/a>/)
assert.doesNotMatch(data.logged_buttons, /<icon|<text>/)
assert.match(data.author, /^<div class="mb20"><div class="user-card zib-widget widget">/)
assert.match(data.author, /data-lazy-type="lazy_cover"/)
assert.match(data.author, /data-post-type="post" data-post-style="card"/)