feat(auth): clarify login identity and speed up mobile entry
This commit is contained in:
@@ -22,6 +22,7 @@ await page.addInitScript(() => {
|
||||
});
|
||||
try {
|
||||
await page.goto(base, { waitUntil: 'domcontentloaded' });
|
||||
await page.addScriptTag({ url: base + 'vendor/faceapi/face-api.js' });
|
||||
// Real models from production paths, actual landmark inference on the sample image.
|
||||
const detected = await page.evaluate(async data => {
|
||||
await Promise.all([
|
||||
@@ -35,11 +36,13 @@ try {
|
||||
assert(detected && detected.landmarks === 68 && detected.score > 0.3);
|
||||
console.log('PASS: real production models load and detect sample face with 68 landmarks');
|
||||
// Keep subsequent error-flow uploads independent of angle validation.
|
||||
await page.route('**/vendor/faceapi/face-api.js', route => route.abort());
|
||||
await page.evaluate(() => { window.faceapi = undefined; });
|
||||
await page.waitForFunction(() => !document.querySelector('#login-message').textContent.includes('检查'));
|
||||
await page.check('#login-consent');
|
||||
await page.click('[data-action="login-browser"]');
|
||||
await page.waitForSelector('#s-splash.active');
|
||||
await page.click('[data-action="login-confirm"]');
|
||||
await page.click('[data-action="open-privacy"]');
|
||||
await page.click('#privacy-check');
|
||||
await page.click('[data-action="agree-continue"]');
|
||||
|
||||
Reference in New Issue
Block a user