Files
juzi/taobao/test/h5-compatibility.cjs
T
xsl 9eec4369da feat(taobao): add native mini program with shared backend
Preserve H5 flows while adding Taobao identity, native capture, reports and isolated local development. Fix canceled province selection and expired-session logout. Record passing local regressions, two pre-existing H5 assertion failures and pending platform validation.
2026-10-19 20:14:31 +08:00

15 lines
1.2 KiB
JavaScript

'use strict';
const { spawnSync } = require('node:child_process'), path = require('node:path'), fs = require('node:fs');
const root = path.resolve(__dirname, '../..'), artifacts = path.join(root, 'temp/taobao-h5-compatibility');
const gitOpenSSL = 'C:\\Program Files\\Git\\usr\\bin';
const testEnv = { ...process.env, H5_ARTIFACT_DIR: artifacts };
if (process.platform === 'win32' && fs.existsSync(path.join(gitOpenSSL, 'openssl.exe'))) testEnv.Path = gitOpenSSL + path.delimiter + (process.env.Path || process.env.PATH);
fs.mkdirSync(artifacts, { recursive: true });
for (const name of ['guest-privacy.mjs', 'wechat-browser.mjs', 'report-persistence.mjs', 'wrinkle-async-browser.mjs']) {
console.log('H5 compatibility: ' + name);
const result = spawnSync(process.execPath, ['--require', path.join(__dirname, 'legacy-playwright.cjs'), path.join(root, 'h5/test', name)],
{ cwd: root, env: testEnv, stdio: 'inherit', timeout: 120000 });
if (result.status !== 0) { if (result.error) console.error(result.error.message); process.exit(result.status || 1); }
}
console.log('PASS: H5 guest privacy, WeChat /state/ OAuth flow, full report persistence and async wrinkle layers');