test(deploy): verify second feedback release on public site
This commit is contained in:
@@ -55,7 +55,11 @@ try {
|
||||
await page.waitForLoadState('networkidle');
|
||||
assert(!requests.some(p => /\.woff2$|faceapi/.test(p)), 'home typography must not add full fonts or face engine');
|
||||
await page.click('[data-action="open-privacy"]');
|
||||
await page.waitForSelector('#p-privacy.show');
|
||||
await page.waitForSelector('link[href="css/fonts.css"]', { state: 'attached' });
|
||||
// A link being attached does not mean its font faces are registered yet,
|
||||
// especially through the public reverse proxy rather than localhost.
|
||||
await page.waitForFunction(() => [...document.fonts].some(font => /MiSans Demibold/.test(font.family)));
|
||||
await page.evaluate(async () => { await document.fonts.load('700 23px "MiSans Demibold"', "欢迎体验肌肤状态评估服务"); });
|
||||
await page.waitForLoadState('networkidle');
|
||||
assert(requests.some(p => /MiSans-Demibold\.woff2$/.test(p)), 'consent must load PSD Demibold before profile');
|
||||
@@ -108,6 +112,7 @@ try {
|
||||
}
|
||||
await page.goto(base + '?mock=1&screen=report');
|
||||
await page.waitForFunction(() => document.querySelector('#stat-score b').textContent !== '--');
|
||||
await page.waitForFunction(() => [...document.fonts].some(font => /MiSans Demibold/.test(font.family)));
|
||||
await page.evaluate(async () => { await document.fonts.load('700 40px "MiSans Demibold"', '0123456789'); await document.fonts.load('600 23px MiSans', '护理建议您的肌肤状态表现紧塑力'); });
|
||||
await page.waitForLoadState('networkidle');
|
||||
for (const selector of ['#stat-score b', '#stat-age b', '.dim-score b']) await actualFont(selector, 'Demibold');
|
||||
|
||||
Reference in New Issue
Block a user