Skip to content

Commit

Permalink
Increase wait times in chat snapshot tests to 5000ms
Browse files Browse the repository at this point in the history
  • Loading branch information
swuecho committed Jul 17, 2024
1 parent 8b6d550 commit 99efdbc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions e2e/tests/11_chat_snapshot.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,20 @@ test('test', async ({ page }) => {
await page.getByTestId('repwd').locator('input').fill('@ThisIsATestPass5');
await page.getByTestId('signup').click();

await page.waitForTimeout(2000);
await page.waitForTimeout(5000);
let input_area = await page.$("#message_textarea textarea")
await input_area?.click();
await input_area?.fill('test_demo_bestqa');
// await page.fill("#message_textarea", 'test_demo_bestqa');
//await page.getByPlaceholder('来说点什么吧...(Shift + Enter = 换行)').press('Enter');
await input_area?.press('Enter');
// sleep 500ms
await page.waitForTimeout(2000);
await page.waitForTimeout(5000);
await input_area?.click();
await input_area?.fill('test_demo_bestqa');
await input_area?.press('Enter');

await page.waitForTimeout(2000);
await page.waitForTimeout(5000);

const user = await selectUserByEmail(pool, test_email);
expect(user.email).toBe(test_email);
Expand All @@ -49,12 +49,12 @@ test('test', async ({ page }) => {
expect(prompts.length).toBe(1);
expect(prompts[0].updated_by).toBe(user.id);
// sleep 500ms
await page.waitForTimeout(2000);;
await page.waitForTimeout(5000);;
const messages = await selectChatMessagesBySessionUUID(pool, session.uuid)
expect(messages.length).toBe(3);
const page1Promise = page.waitForEvent('popup');
await page.getByTestId('snpashot-button').getByRole('button').click();
await page.waitForTimeout(2000);
await page.waitForTimeout(5000);
const page_snapshot = await page1Promise;
await page_snapshot.waitForTimeout(500)
snapshot_url = page_snapshot.url()
Expand Down

0 comments on commit 99efdbc

Please sign in to comment.