Fix Web 2.0.3 log panel layout

This commit is contained in:
AttilaNet
2026-11-11 16:43:52 +08:00
parent b78f2f97d5
commit 7605a9bfb1
16 changed files with 664 additions and 477 deletions
@@ -126,14 +126,17 @@ class BasePathBrowserTests(unittest.TestCase):
self.assertEqual(context.cookies()[0]["path"], prefix or "/")
self.assertEqual(page.evaluate("localStorage.length + sessionStorage.length"), 0)
page.locator("#log-panel").evaluate("node => {window.__originalLogPanel=node;}")
for key in "login incubator bag ranch daily hatching mainline battles gifts commissions exploration maps statistics plans yields".split():
page.locator(f'.page-tab[data-page="{key}"]').click()
panel = page.locator(f'.page-panel[data-page="{key}"]:not([hidden])')
expect(panel.locator('.page-loading[data-loading="false"]')).to_have_count(1)
self.assertEqual(panel.locator(".page-error:not([hidden])").count(), 0)
if key in "login ranch daily hatching mainline gifts commissions exploration maps".split():
expect(panel.locator(f'.task-log-panel[data-task-log="{key}"]')).to_have_count(1)
expect(panel.locator('.task-log-lines')).to_have_attribute('aria-live', 'off')
expect(page.locator('[data-task-log], .task-log-panel')).to_have_count(0)
expect(page.locator('#log-panel')).to_be_hidden()
expect(page.locator('#log-lines')).to_have_attribute('role', 'log')
expect(page.locator('#log-lines')).to_have_attribute('aria-live', 'off')
self.assertTrue(page.locator('#log-panel').evaluate("node => node===window.__originalLogPanel && node.parentElement===document.querySelector('#workspace').parentElement && !document.querySelector('#workspace').contains(node)"))
# The server redirects an authenticated login URL back to this workbench.
page.goto(base + "/login", wait_until="networkidle")