标签改双组独立设计: 时间组×级别组自由组合(今日+推荐/有效等), 互不顶掉
This commit is contained in:
+13
-6
@@ -61,16 +61,23 @@ const sleep = (ms) => new Promise(r => setTimeout(r, ms));
|
||||
const kwOk = await p.evaluate(() => document.querySelectorAll('#tbody tr').length >= 0);
|
||||
ok('关键词筛选不报错', kwOk);
|
||||
|
||||
console.log('== 4b. 快捷标签页 ==');
|
||||
await p.evaluate(() => quickTab('valid')); await sleep(700);
|
||||
console.log('== 4b. 组合标签(时间×级别) ==');
|
||||
await p.evaluate(() => levelTab('valid')); await sleep(700);
|
||||
const validOk = await p.evaluate(() => {
|
||||
const rows = [...document.querySelectorAll('#tbody tr')];
|
||||
return rows.length > 0 && rows.every(tr => tr.textContent.includes('推荐') || tr.textContent.includes('待定'));
|
||||
});
|
||||
ok('"有效人员"页全部为推荐/待定', validOk);
|
||||
const todayRows = await p.evaluate(async () => { quickTab('today'); await new Promise(r => setTimeout(r, 600)); return document.querySelectorAll('#tbody tr.today').length; });
|
||||
ok(`"今日"页当天高亮行(${todayRows})`, todayRows >= 0);
|
||||
await p.evaluate(() => quickTab('')); await sleep(500);
|
||||
ok('"有效人员"全部为推荐/待定', validOk);
|
||||
await p.evaluate(() => timeTab('today')); await sleep(700);
|
||||
const combo = await p.evaluate(() => {
|
||||
const rows = [...document.querySelectorAll('#tbody tr')];
|
||||
const allToday = rows.every(tr => tr.classList.contains('today'));
|
||||
const allValid = rows.every(tr => tr.textContent.includes('推荐') || tr.textContent.includes('待定'));
|
||||
const tabs = [document.querySelector('#timeTabs .tab.on')?.dataset.q, document.querySelector('#levelTabs .tab.on')?.dataset.q];
|
||||
return { n: rows.length, allToday, allValid, tabs: tabs.join('+') };
|
||||
});
|
||||
ok(`组合"今日+有效"正确(${combo.n}行, 标签=${combo.tabs})`, (combo.n === 0 || combo.allToday) && (combo.n === 0 || combo.allValid) && combo.tabs === 'today+valid');
|
||||
await p.evaluate(() => { timeTab(''); levelTab(''); }); await sleep(500);
|
||||
|
||||
console.log('== 5. 候选人详情弹窗 ==');
|
||||
await p.evaluate(() => document.querySelector('#tbody tr')?.click()); await sleep(800);
|
||||
|
||||
Reference in New Issue
Block a user