anbot

e6541c4 / test/webui.sh

View file at this commit

diff --git a/test/webui.sh b/test/webui.sh
index 5b29385..f0914e4 100755
--- a/test/webui.sh
+++ b/test/webui.sh
@@ -81,11 +81,11 @@ function checkHtml(page, live = false) {
   assert.deepEqual(scripts, live ? ['<script src="./feed-live.js" defer>'] : [])
 }
 
-const index = await get('/')
+const index = await get('/git')
 checkHtml(index)
 assert.match(index.text, /<h1>webui<\/h1>/)
 assert.match(index.text, /Clone URL/)
-assert.match(index.text, /href="\.\/feed"/)
+assert.match(index.text, /href="\/">Social feed/)
 assert.match(index.text, /&lt;script&gt;/)
 assert.match(index.text, /\/blob\/README\.md/)
 assert.match(index.text, /\/tree\/sub/)
@@ -126,6 +126,8 @@ assert.equal((await getRaw('/blob/%2e%2e%2fREADME.md')).status, 404)
 
 const feed = await get('/feed')
 checkHtml(feed, true)
+assert.equal((await get('/')).text, feed.text)
+assert.match(feed.text, /href="\/git">Git/)
 assert.match(feed.text, /id="feed-entries"/)
 const liveScript = await get('/feed-live.js')
 assert.equal(liveScript.status, 200)
@@ -138,6 +140,7 @@ assert.ok(feed.text.includes(`?post=${encodeURIComponent(post)}`))
 assert.ok(feed.text.indexOf('Reply from another author') < feed.text.indexOf('Hello'))
 const ownFeed = await get(`/feed?author=${encodeURIComponent(author)}`)
 checkHtml(ownFeed, true)
+assert.equal((await get(`/?author=${encodeURIComponent(author)}`)).text, ownFeed.text)
 assert.match(ownFeed.text, /Hello/)
 assert.doesNotMatch(ownFeed.text, /Reply from another author/)
 const peerFeed = await get(`/feed?author=${encodeURIComponent(other)}`)

Git ยท Social feed