修正原生壳公开主站配置
将原生壳公开主站统一为 www.genarrative.world 调整 Tauri release 直接加载线上主站并移除 frontendDist 打包 补齐创作入口配置开发代理与回归测试 同步原生壳方案文档和共享记忆
This commit is contained in:
@@ -300,7 +300,7 @@ describe('ShellApp QR scanner HostBridge flow', () => {
|
||||
};
|
||||
const sourceUrl = new URL(webViewProps.source?.uri ?? '');
|
||||
|
||||
expect(sourceUrl.origin).toBe('https://app.genarrative.world');
|
||||
expect(sourceUrl.origin).toBe('https://www.genarrative.world');
|
||||
expect(sourceUrl.searchParams.get('clientRuntime')).toBe('native_app');
|
||||
expect(sourceUrl.searchParams.get('hostShell')).toBe('expo_mobile');
|
||||
});
|
||||
@@ -335,12 +335,12 @@ describe('ShellApp QR scanner HostBridge flow', () => {
|
||||
source?: { uri?: string };
|
||||
};
|
||||
const webViewUrl = webViewProps.source?.uri;
|
||||
expect(webViewUrl).toContain('https://app.genarrative.world');
|
||||
expect(webViewUrl).toContain('https://www.genarrative.world');
|
||||
|
||||
webViewProps.onMessage?.({
|
||||
nativeEvent: {
|
||||
data: JSON.stringify(buildRequest()),
|
||||
url: webViewUrl ?? 'https://app.genarrative.world/',
|
||||
url: webViewUrl ?? 'https://www.genarrative.world/',
|
||||
},
|
||||
});
|
||||
|
||||
@@ -353,7 +353,7 @@ describe('ShellApp QR scanner HostBridge flow', () => {
|
||||
};
|
||||
cameraViewProps.onBarcodeScanned?.({
|
||||
type: 'qr',
|
||||
data: ' https://app.genarrative.world/works/detail?work=PZ-1 ',
|
||||
data: ' https://www.genarrative.world/works/detail?work=PZ-1 ',
|
||||
});
|
||||
|
||||
await waitFor(() => {
|
||||
@@ -377,7 +377,7 @@ describe('ShellApp QR scanner HostBridge flow', () => {
|
||||
ok: true,
|
||||
result: {
|
||||
format: 'qr_code',
|
||||
value: 'https://app.genarrative.world/works/detail?work=PZ-1',
|
||||
value: 'https://www.genarrative.world/works/detail?work=PZ-1',
|
||||
},
|
||||
});
|
||||
});
|
||||
@@ -395,7 +395,7 @@ describe('ShellApp QR scanner HostBridge flow', () => {
|
||||
}) => void;
|
||||
source?: { uri?: string };
|
||||
};
|
||||
const webViewUrl = webViewProps.source?.uri ?? 'https://app.genarrative.world/';
|
||||
const webViewUrl = webViewProps.source?.uri ?? 'https://www.genarrative.world/';
|
||||
const injectionError = new Error('response injection failed');
|
||||
const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => undefined);
|
||||
shellHarness.injectJavaScriptError.current = injectionError;
|
||||
@@ -446,7 +446,7 @@ describe('ShellApp QR scanner HostBridge flow', () => {
|
||||
}) => void;
|
||||
source?: { uri?: string };
|
||||
};
|
||||
const webViewUrl = webViewProps.source?.uri ?? 'https://app.genarrative.world/';
|
||||
const webViewUrl = webViewProps.source?.uri ?? 'https://www.genarrative.world/';
|
||||
|
||||
webViewProps.onMessage?.({
|
||||
nativeEvent: {
|
||||
@@ -487,7 +487,7 @@ describe('ShellApp HostBridge event injection', () => {
|
||||
originWhitelist?: string[];
|
||||
source?: { uri?: string };
|
||||
};
|
||||
const webViewUrl = webViewProps.source?.uri ?? 'https://app.genarrative.world/';
|
||||
const webViewUrl = webViewProps.source?.uri ?? 'https://www.genarrative.world/';
|
||||
|
||||
expect(webViewProps.originWhitelist).toEqual([new URL(webViewUrl).origin]);
|
||||
});
|
||||
@@ -583,7 +583,7 @@ describe('ShellApp HostBridge event injection', () => {
|
||||
onNavigationStateChange?: (event: { canGoBack: boolean }) => void;
|
||||
source?: { uri?: string };
|
||||
};
|
||||
const webViewUrl = webViewProps.source?.uri ?? 'https://app.genarrative.world/';
|
||||
const webViewUrl = webViewProps.source?.uri ?? 'https://www.genarrative.world/';
|
||||
|
||||
shellHarness.injectedScripts.length = 0;
|
||||
webViewProps.onNavigationStateChange?.({ canGoBack: true });
|
||||
@@ -626,7 +626,7 @@ describe('ShellApp HostBridge event injection', () => {
|
||||
}) => void;
|
||||
source?: { uri?: string };
|
||||
};
|
||||
const webViewUrl = webViewProps.source?.uri ?? 'https://app.genarrative.world/';
|
||||
const webViewUrl = webViewProps.source?.uri ?? 'https://www.genarrative.world/';
|
||||
const networkError = new Error('network replay failed');
|
||||
const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => undefined);
|
||||
vi.mocked(Network.getNetworkStateAsync).mockRejectedValueOnce(networkError);
|
||||
@@ -689,7 +689,7 @@ describe('ShellApp HostBridge event injection', () => {
|
||||
};
|
||||
const downloadEvent = {
|
||||
nativeEvent: {
|
||||
downloadUrl: 'blob:https://app.genarrative.world/download-id',
|
||||
downloadUrl: 'blob:https://www.genarrative.world/download-id',
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user