ui: simplify helper copy and center page loading feedback
This commit is contained in:
@@ -74,14 +74,14 @@ class RunIntentBrowserTests(unittest.TestCase):
|
||||
self.poll()
|
||||
expect(self.page.locator("#connection")).to_have_text("已登录")
|
||||
expect(self.page.locator("#refresh")).to_be_enabled()
|
||||
expect(self.page.locator("#data-summary")).to_contain_text("等待恢复")
|
||||
expect(self.page.locator("#data-summary")).to_contain_text("等待自动恢复")
|
||||
expect(self.page.locator("#data-summary")).to_contain_text("上次失败")
|
||||
expect(self.page.locator("#data-summary")).to_contain_text("游戏请求超时")
|
||||
expect(toggle).to_have_text("停止")
|
||||
expect(self.page.locator(f'.account-tab[data-account="{self.first}"] .account-dot')).not_to_have_class("account-dot error")
|
||||
self.online()
|
||||
self.poll()
|
||||
expect(self.page.locator("#data-summary")).to_contain_text("正在自动执行")
|
||||
expect(self.page.locator("#data-summary")).to_contain_text("策略运行中")
|
||||
expect(self.page.locator("#data-summary")).to_contain_text("上次失败")
|
||||
expect(self.page.locator("#connection")).to_have_text("已登录")
|
||||
expect(self.page.locator("#log-panel")).to_be_hidden()
|
||||
@@ -122,7 +122,7 @@ class RunIntentBrowserTests(unittest.TestCase):
|
||||
expect(self.page.locator("#data-summary")).to_contain_text("用户暂停")
|
||||
toggle.click()
|
||||
expect(toggle).to_have_text("停止")
|
||||
expect(self.page.locator("#data-summary")).to_contain_text("正在自动执行")
|
||||
expect(self.page.locator("#data-summary")).to_contain_text("策略运行中")
|
||||
self.assertEqual([(account, operation) for account, operation, _ in self.actions],
|
||||
[(self.first, "stop"), (self.first, "start")])
|
||||
self.assertEqual(self.writes, [])
|
||||
@@ -138,7 +138,7 @@ class RunIntentBrowserTests(unittest.TestCase):
|
||||
expect(self.page.locator("#strategy-toggle")).to_be_enabled()
|
||||
expect(self.page.locator("#data-summary")).to_contain_text(reason)
|
||||
expect(self.page.locator("#data-summary img")).to_have_count(0)
|
||||
expect(self.page.locator("#data-summary")).not_to_contain_text("正在自动执行")
|
||||
expect(self.page.locator("#data-summary")).not_to_contain_text("策略运行中")
|
||||
expect(self.page.locator("#data-summary")).not_to_contain_text("用户暂停")
|
||||
self.assertEqual(self.actions, [])
|
||||
|
||||
@@ -167,7 +167,7 @@ class RunIntentBrowserTests(unittest.TestCase):
|
||||
panel = self.go("hatching")
|
||||
panel.locator('button[data-operation="apply_preset"]').click()
|
||||
expect(self.page.locator("#notice")).to_contain_text("预设已保存")
|
||||
expect(self.page.locator("#notice")).to_contain_text("正在自动执行")
|
||||
expect(self.page.locator("#notice")).to_contain_text("策略运行中")
|
||||
expect(self.page.locator("#strategy-toggle")).to_have_text("停止")
|
||||
self.assertEqual(len(self.writes), 1)
|
||||
self.assertTrue(self.configs[self.first]["policy"]["egg_rules"]["1001010"]["enabled"])
|
||||
|
||||
Reference in New Issue
Block a user