mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
test(core): enable no-floating-promises rule for tests (#11915)
Sometimes, missing `await` in the test code can cause timing issues, leading to test failures. This PR enables the `no-floating-promises` rule for the test code to ensure that such errors do not occur.
This commit is contained in:
@@ -113,7 +113,7 @@ test.describe('AIBasic/Chat', () => {
|
||||
},
|
||||
]);
|
||||
|
||||
expect(page.getByTestId('chat-action-list')).toBeVisible();
|
||||
await expect(page.getByTestId('chat-action-list')).toBeVisible();
|
||||
await utils.chatPanel.makeChat(page, 'Nice to meet you');
|
||||
await utils.chatPanel.waitForHistory(page, [
|
||||
{
|
||||
@@ -458,7 +458,7 @@ test.describe('AIBasic/Chat', () => {
|
||||
await sendButton.click();
|
||||
|
||||
await expect(page.getByTestId('sidebar-tab-content-chat')).toBeVisible();
|
||||
expect(await page.locator('chat-content-images')).toBeVisible();
|
||||
await expect(page.locator('chat-content-images')).toBeVisible();
|
||||
await utils.chatPanel.waitForHistory(page, [
|
||||
{
|
||||
role: 'user',
|
||||
|
||||
Reference in New Issue
Block a user