修正桌面壳分享动作表达

Tauri 桌面分享按钮按剪贴板复制语义展示

Expo 移动分享继续保留系统分享表达

测试和门禁覆盖跨宿主分享文案差异

文档和项目记忆同步 share.open 能力语义
This commit is contained in:
2026-06-20 18:11:31 +08:00
parent ae3cdf4e69
commit 6f91ebc787
6 changed files with 130 additions and 10 deletions
+44
View File
@@ -2055,6 +2055,47 @@ function assertH5NativeAppRouteFlows() {
}
}
function assertH5NativeSharePresentation() {
const modalSource = fs.readFileSync(
'src/components/common/PublishShareModal.tsx',
'utf8',
);
const modalTestSource = fs.readFileSync(
'src/components/common/PublishShareModal.test.tsx',
'utf8',
);
for (const snippet of [
'function resolveNativeSharePresentation',
"hostShell === 'tauri_desktop'",
"idleLabel: '复制分享文案'",
"successLabel: '已复制'",
"failedLabel: '复制失败'",
"idleLabel: '系统分享'",
"successLabel: '已打开'",
"failedLabel: '分享失败'",
]) {
if (!modalSource.includes(snippet)) {
throw new Error(`PublishShareModal native share presentation missing: ${snippet}`);
}
}
for (const snippet of [
'uses clipboard copy wording for Tauri native host share action',
'hostShell=tauri_desktop',
"queryByRole('button', { name: '系统分享' })",
"getByRole('button', { name: '复制分享文案' })",
"getByRole('button', { name: '已复制' })",
'keeps system share wording for Expo native host share action',
'hostShell=expo_mobile',
"getByRole('button', { name: '系统分享' })",
"getByRole('button', { name: '已打开' })",
]) {
if (!modalTestSource.includes(snippet)) {
throw new Error(`PublishShareModal native share test missing: ${snippet}`);
}
}
}
function assertWechatPaymentResultBoundaries() {
const paymentSource = fs.readFileSync(
'miniprogram/host-bridge/payment.js',
@@ -2466,6 +2507,9 @@ assertWechatMiniProgramCapabilityFlows();
console.log('[check:native-shells] h5-native-app-route-flows');
assertH5NativeAppRouteFlows();
console.log('[check:native-shells] h5-native-share-presentation');
assertH5NativeSharePresentation();
console.log('[check:native-shells] wechat-payment-result-boundaries');
assertWechatPaymentResultBoundaries();