Improve lobby screen header design
This commit is contained in:
1 parent
1db8e51023
commit
4bff948290
8 files changed
+49
-21
No files matched your search
@@ -88,8 +88,8 @@ describe('统计数据 page (real server, headless Chrome)', { skip: !ENABLED &&
|
||||
}
|
||||
const texts = (c, sel) => c.page.$$eval(sel, (els) => els.map((e) => e.innerText.replace(/\s+/g, ' ').trim()));
|
||||
const stored = (c) => c.page.evaluate(() => { const r = localStorage.getItem('sp.pref.stats'); return r ? JSON.parse(r) : null; });
|
||||
const openStats = async (c, from = '.lobby-screen .topbar__right .btn') => {
|
||||
await c.click(from, '统计');
|
||||
const openStats = async (c, from = '.lobby-screen .me-chip--btn') => {
|
||||
await c.click(from, from.includes('me-chip') ? null : '统计');
|
||||
await c.page.waitForSelector('.st .st-tab', { visible: true, timeout: 15000 });
|
||||
};
|
||||
const toast = (c) => c.page.waitForFunction(() => document.querySelector('.toast')?.textContent || false, { timeout: 8000 }).then((h) => h.jsonValue());
|
||||
@@ -305,7 +305,7 @@ describe('统计数据: the real flows (a fast real server, headless Chrome)', {
|
||||
assert.equal(env.records[0].players[0].roundsPassed, 1, 'one round cleared — the server\'s own count for a quit in round 2');
|
||||
assert.ok(env.records[0].players[0].bandId, 'its strategy');
|
||||
// the page: one game counted, one left out, both in the history
|
||||
await c.click('.lobby-screen .topbar__right .btn', '统计');
|
||||
await c.click('.lobby-screen .me-chip--btn');
|
||||
await c.page.waitForSelector('.st .st-card', { visible: true });
|
||||
assert.equal((await c.page.$$eval('.st-card__num', (els) => els.map((e) => e.textContent)))[0], '1');
|
||||
assert.match(await c.page.$eval('.st-rule', (e) => e.textContent), /另有 1 局未计入统计/);
|
||||
|
||||
Reference in new issue
Block a user