mirror of
https://wget.la/https://github.com/Wxw-Gu/WechatExplorer
synced 2026-10-06 13:54:10 +08:00
feat: mac发送能力重构为libtmwechat
- 发送改走本地host, 在微信登录时触发 - 删除旧OneBot及对应UI控制面
This commit is contained in:
+7
-12
@@ -429,7 +429,7 @@ test('GUIDE-01 first-use welcome is keyboard-safe and fits the viewport', async
|
||||
}
|
||||
})
|
||||
|
||||
test('SETTINGS-01 supported WeChat versions dialog is keyboard-safe and fits the viewport', async () => {
|
||||
test('SETTINGS-01 macOS WeChat setup keeps the binding guidance focused', async () => {
|
||||
test.skip(process.platform !== 'darwin', 'The personal WeChat runtime is currently macOS-only')
|
||||
const fixture = await launchTestApp()
|
||||
const pageErrors: Error[] = []
|
||||
@@ -441,22 +441,17 @@ test('SETTINGS-01 supported WeChat versions dialog is keyboard-safe and fits the
|
||||
.click()
|
||||
await fixture.page.getByRole('button', { name: '微信发送' }).click()
|
||||
|
||||
const trigger = fixture.page.getByRole('button', { name: '支持版本' })
|
||||
await expect(trigger).toBeVisible()
|
||||
await trigger.click()
|
||||
const dialog = fixture.page.getByRole('dialog', { name: '支持的微信版本' })
|
||||
await expect(dialog).toBeVisible()
|
||||
await expect(dialog.getByText('4.1.6.12')).toBeVisible()
|
||||
await expect(dialog.getByText('4.1.11.53')).toBeVisible()
|
||||
await expect(
|
||||
fixture.page.getByText('请保持微信未登录窗口状态,点击“绑定微信”后,再点击微信窗口登录。')
|
||||
).toBeVisible()
|
||||
await expect(fixture.page.getByRole('button', { name: '支持版本' })).toHaveCount(0)
|
||||
await expect(fixture.page.getByText('查看支持的微信版本')).toHaveCount(0)
|
||||
await expect(fixture.page.getByText('高级诊断')).toHaveCount(0)
|
||||
expect(
|
||||
await fixture.page.evaluate(() => document.documentElement.scrollWidth <= window.innerWidth)
|
||||
).toBe(true)
|
||||
expect(pageErrors).toEqual([])
|
||||
|
||||
await fixture.page.keyboard.press('Escape')
|
||||
await expect(dialog).toHaveCount(0)
|
||||
await expect(trigger).toBeFocused()
|
||||
|
||||
await fixture.page.getByRole('button', { name: '文字转语音' }).click()
|
||||
const modelSelect = fixture.page.getByRole('combobox', { name: '合成模型' })
|
||||
await modelSelect.scrollIntoViewIfNeeded()
|
||||
|
||||
@@ -21,7 +21,6 @@ const personalWechatSupported = process.platform === 'darwin' || process.platfor
|
||||
const unsignedMacUpdate = process.env.WXE_E2E_UNSIGNED_MAC_UPDATE === '1'
|
||||
const fixtureNowMs =
|
||||
Number.isFinite(configuredNow) && configuredNow > 0 ? configuredNow : Date.now()
|
||||
let keepOneBotProcess = false
|
||||
|
||||
const formatFixtureDateTime = (timestampSeconds) => {
|
||||
const date = new Date(timestampSeconds * 1000)
|
||||
@@ -400,17 +399,6 @@ handle('tts:getSettings', () => ({
|
||||
},
|
||||
voices: []
|
||||
}))
|
||||
handle('wechat-personal:getRuntimeStatus', () => ({
|
||||
version: 'v0.0.18',
|
||||
state: 'ready',
|
||||
downloadedBytes: 100,
|
||||
totalBytes: 100,
|
||||
progress: 1,
|
||||
platform: 'darwin',
|
||||
architecture: 'arm64',
|
||||
supported: true,
|
||||
removable: true
|
||||
}))
|
||||
handle('wechat-personal:getStatus', () => ({
|
||||
state: 'online',
|
||||
platform: process.platform,
|
||||
@@ -419,8 +407,7 @@ handle('wechat-personal:getStatus', () => ({
|
||||
wechatRunning: true,
|
||||
wechatPid: 4668,
|
||||
boundWechatPid: 4668,
|
||||
oneBotPid: 5401,
|
||||
endpoint: '127.0.0.1:58080',
|
||||
endpoint: '127.0.0.1:4290',
|
||||
endpointReady: true,
|
||||
wechatVersion: '4.1.11.53',
|
||||
runtimeReady: true,
|
||||
@@ -454,7 +441,7 @@ handle('wechat-personal:getSendCapability', () => ({
|
||||
sipDisabled: true,
|
||||
wechatRunning: true,
|
||||
boundWechatPid: 4668,
|
||||
endpoint: '127.0.0.1:58080',
|
||||
endpoint: '127.0.0.1:4290',
|
||||
endpointReady: true,
|
||||
runtimeReady: true,
|
||||
attachReady: true,
|
||||
@@ -474,11 +461,6 @@ handle('wechat-personal:getSendCapability', () => ({
|
||||
? '个人微信已准备好发送日报'
|
||||
: '微信消息发送目前仅支持 macOS 和 Windows'
|
||||
}))
|
||||
handle('wechat-personal:getKeepProcess', () => keepOneBotProcess)
|
||||
handle('wechat-personal:setKeepProcess', (keep) => {
|
||||
keepOneBotProcess = Boolean(keep)
|
||||
return keepOneBotProcess
|
||||
})
|
||||
handle('scheduled-report:list', () => [...scheduledReportTasks])
|
||||
handle('scheduled-report:listExecutions', (taskId) =>
|
||||
taskId
|
||||
|
||||
Reference in New Issue
Block a user