冒烟: 标题断言按bootstrap状态自适应
This commit is contained in:
+3
-1
@@ -18,7 +18,9 @@ const sleep = (ms) => new Promise(r => setTimeout(r, ms));
|
||||
|
||||
console.log('== 1. 初始化页面 ==');
|
||||
await p.goto(BASE + '/', { waitUntil: 'networkidle' });
|
||||
ok('标题=初始化超管账号', await $('#loginTitle').textContent() === '初始化超管账号');
|
||||
const boot1 = await p.evaluate(async () => (await (await fetch('/api/bootstrap')).json()));
|
||||
const wantTitle = boot1.needsInit ? '初始化超管账号' : '登录';
|
||||
ok(`标题=${wantTitle}`, await $('#loginTitle').textContent() === wantTitle);
|
||||
ok('详情弹窗隐藏', await p.evaluate(() => getComputedStyle(document.getElementById('detailModal')).display === 'none'));
|
||||
await p.screenshot({ path: '/tmp/smoke-shots/01-init.png' });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user