fix: match Code microphone and send button order
This commit is contained in:
1 parent
f61efaf046
commit
ddb942f944
4 files changed
+13
-2
No files matched your search
@@ -359,6 +359,14 @@ test('personal cloud Agent identity, configuration and separate published chat i
|
||||
expect(sendGeometry.width).toBe(32);
|
||||
expect(sendGeometry.height).toBe(32);
|
||||
expect(sendGeometry.radius).toBeGreaterThanOrEqual(sendGeometry.width / 2);
|
||||
const toolbarPositions = await voiceComposer.locator('[aria-label="添加文件或图片"], [aria-label="语音输入"], [aria-label="发送"]').evaluateAll(elements =>
|
||||
Object.fromEntries(elements.map(element => {
|
||||
const bounds = element.getBoundingClientRect();
|
||||
return [element.getAttribute('aria-label'), { left: bounds.left, right: bounds.right }];
|
||||
})));
|
||||
expect(toolbarPositions['语音输入'].left).toBeGreaterThan(toolbarPositions['添加文件或图片'].right);
|
||||
expect(toolbarPositions['发送'].left).toBeGreaterThan(toolbarPositions['语音输入'].right);
|
||||
expect(toolbarPositions['发送'].left - toolbarPositions['语音输入'].right).toBeCloseTo(4, 1);
|
||||
await voiceDraft.fill('原来的想法');
|
||||
await voiceComposer.getByRole('button', { name: '语音输入', exact: true }).click();
|
||||
await expect(voiceComposer.getByRole('button', { name: '停止语音输入' })).toBeVisible();
|
||||
|
||||
Reference in new issue
Block a user