新增搜尋框,放兩個開源連結
This commit is contained in:
1 parent
61e8580c72
commit
695e29324e
11 files changed
+82
-11
No files matched your search
@@ -1,2 +1,2 @@
|
||||
"""版本號只寫在這裡,頁尾會顯示;發布新版本時改這一行。"""
|
||||
__version__ = "1.1.0"
|
||||
__version__ = "1.2.0"
|
||||
@@ -127,3 +127,17 @@ def test_new_copy(client):
|
||||
for lang in config.LANGS: # 每個語系都要有新加的字
|
||||
d = client.get(f"/assets/i18n/{lang}.json").json()
|
||||
assert set(zh) == set(d), (lang, set(zh) ^ set(d))
|
||||
|
||||
|
||||
def test_uid_search_and_oss_links(client):
|
||||
html = client.get("/").text
|
||||
assert 'id="uid-input"' in html
|
||||
start = html.index('id="uid-search"')
|
||||
assert start < html.index('id="menu-toggle"') # 在 ☰ 左邊
|
||||
form = html[start:html.index("</form>", start)]
|
||||
assert "<button" not in form # 只有輸入框,按 Enter 送出
|
||||
assert 'href="https://github.com/Sthkm3/ZhiwuProject"' in html
|
||||
assert 'href="https://gitea.sthkm3.org/sthkm3/ZhiwuProject"' in html
|
||||
zh = client.get("/assets/i18n/zh-TW.json").json()
|
||||
assert zh["oss.label"] == "開源連結" and "search.go" not in zh
|
||||
assert client.get("/u/00000001").status_code == 200
|
||||
Reference in new issue
Block a user