fix(events): show raw codes in test selectors

This commit is contained in:
RockChinQ
2026-08-26 14:12:52 +08:00
parent 4787799cd8
commit 8b63cc0281
5 changed files with 59 additions and 7 deletions
+12 -1
View File
@@ -474,13 +474,24 @@ test.describe('bot advanced flows', () => {
await expect(
routeDialog.getByRole('button', { name: 'Run full test' }),
).toBeVisible();
await routeDialog.getByRole('combobox').first().click();
const routeEventPicker = routeDialog.getByRole('combobox', {
name: 'Event type',
});
await expect(routeEventPicker).toContainText('message.received');
await routeEventPicker.click();
await expect(
page.getByText('Messages', { exact: true }).last(),
).toBeVisible();
await expect(
page.getByText('Groups', { exact: true }).last(),
).toBeVisible();
const receivedMessageOption = page
.getByRole('option')
.filter({ hasText: 'Message received' });
await expect(receivedMessageOption).toContainText('message.received');
await expect(receivedMessageOption).toContainText(
'A user or group sends a new message to the bot.',
);
await page.keyboard.press('Escape');
await routeDialog.getByRole('button', { name: 'Preview match' }).click();