|
@@ -35,7 +35,7 @@ try{
|
|
|
assert.equal(calls.at(-1).page,1);assert.ok((await page.locator('.request-meta').allTextContents()).every(t=>t.includes('老师')&&t.includes('休假申请')));checks.push('身份与类型组合筛选,查询回到第一页');
|
|
assert.equal(calls.at(-1).page,1);assert.ok((await page.locator('.request-meta').allTextContents()).every(t=>t.includes('老师')&&t.includes('休假申请')));checks.push('身份与类型组合筛选,查询回到第一页');
|
|
|
await page.getByLabel('搜索',{exact:true}).fill('不存在的内容');await page.getByRole('button',{name:'查询',exact:true}).click();await page.getByText('暂无符合条件的反馈或申请').waitFor();
|
|
await page.getByLabel('搜索',{exact:true}).fill('不存在的内容');await page.getByRole('button',{name:'查询',exact:true}).click();await page.getByText('暂无符合条件的反馈或申请').waitFor();
|
|
|
await page.getByRole('button',{name:'重置',exact:true}).click();await page.locator('.request-row').first().waitFor();
|
|
await page.getByRole('button',{name:'重置',exact:true}).click();await page.locator('.request-row').first().waitFor();
|
|
|
- fail=true;await page.getByRole('button',{name:'刷新',exact:true}).click();await page.getByRole('alert').filter({hasText:'模拟读取失败'}).waitFor();assert.equal(await page.locator('.request-row').count(),0);
|
|
|
|
|
|
|
+ fail=true;await page.getByRole('button',{name:'查询',exact:true}).click();await page.getByRole('alert').filter({hasText:'模拟读取失败'}).waitFor();assert.equal(await page.locator('.request-row').count(),0);
|
|
|
fail=false;await page.getByRole('button',{name:'重新加载',exact:true}).click();await page.locator('.request-row').first().waitFor();checks.push('空状态、失败不伪装为空记录、重试恢复');
|
|
fail=false;await page.getByRole('button',{name:'重新加载',exact:true}).click();await page.locator('.request-row').first().waitFor();checks.push('空状态、失败不伪装为空记录、重试恢复');
|
|
|
for(const width of [768,390]){await page.setViewportSize({width,height:900});assert.ok(await page.evaluate(()=>document.documentElement.scrollWidth<=innerWidth+1));await page.screenshot({path:output+'/admin-'+width+'.png',fullPage:true});}checks.push('1440/768/390宽度布局');
|
|
for(const width of [768,390]){await page.setViewportSize({width,height:900});assert.ok(await page.evaluate(()=>document.documentElement.scrollWidth<=innerWidth+1));await page.screenshot({path:output+'/admin-'+width+'.png',fullPage:true});}checks.push('1440/768/390宽度布局');
|
|
|
for(const [index,decision,comment] of [[0,'approved','已同意休假,请提前完成交接。'],[3,'rejected','当天已有排课,请另行选择时间。'],[1,'processed','提醒设置已调整,感谢反馈。']]){
|
|
for(const [index,decision,comment] of [[0,'approved','已同意休假,请提前完成交接。'],[3,'rejected','当天已有排课,请另行选择时间。'],[1,'processed','提醒设置已调整,感谢反馈。']]){
|