Restore Ultracite + fix sidebar (#1233)
This commit is contained in:
parent
8fbfc253fa
commit
947ed094a6
177 changed files with 6908 additions and 8306 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import { ChatPage } from '../pages/chat';
|
||||
import { test, expect } from '../fixtures';
|
||||
import { expect, test } from "../fixtures";
|
||||
import { ChatPage } from "../pages/chat";
|
||||
|
||||
test.describe('Chat activity', () => {
|
||||
test.describe("Chat activity", () => {
|
||||
let chatPage: ChatPage;
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
|
|
@ -9,16 +9,16 @@ test.describe('Chat activity', () => {
|
|||
await chatPage.createNewChat();
|
||||
});
|
||||
|
||||
test('Send a user message and receive response', async () => {
|
||||
await chatPage.sendUserMessage('Why is grass green?');
|
||||
test("Send a user message and receive response", async () => {
|
||||
await chatPage.sendUserMessage("Why is grass green?");
|
||||
await chatPage.isGenerationComplete();
|
||||
|
||||
const assistantMessage = await chatPage.getRecentAssistantMessage();
|
||||
expect(assistantMessage.content).toContain("It's just green duh!");
|
||||
});
|
||||
|
||||
test('Redirect to /chat/:id after submitting message', async () => {
|
||||
await chatPage.sendUserMessage('Why is grass green?');
|
||||
test("Redirect to /chat/:id after submitting message", async () => {
|
||||
await chatPage.sendUserMessage("Why is grass green?");
|
||||
await chatPage.isGenerationComplete();
|
||||
|
||||
const assistantMessage = await chatPage.getRecentAssistantMessage();
|
||||
|
|
@ -26,21 +26,21 @@ test.describe('Chat activity', () => {
|
|||
await chatPage.hasChatIdInUrl();
|
||||
});
|
||||
|
||||
test('Send a user message from suggestion', async () => {
|
||||
test("Send a user message from suggestion", async () => {
|
||||
await chatPage.sendUserMessageFromSuggestion();
|
||||
await chatPage.isGenerationComplete();
|
||||
|
||||
const assistantMessage = await chatPage.getRecentAssistantMessage();
|
||||
expect(assistantMessage.content).toContain(
|
||||
'With Next.js, you can ship fast!',
|
||||
"With Next.js, you can ship fast!"
|
||||
);
|
||||
});
|
||||
|
||||
test('Toggle between send/stop button based on activity', async () => {
|
||||
test("Toggle between send/stop button based on activity", async () => {
|
||||
await expect(chatPage.sendButton).toBeVisible();
|
||||
await expect(chatPage.sendButton).toBeDisabled();
|
||||
|
||||
await chatPage.sendUserMessage('Why is grass green?');
|
||||
await chatPage.sendUserMessage("Why is grass green?");
|
||||
|
||||
await expect(chatPage.sendButton).not.toBeVisible();
|
||||
await expect(chatPage.stopButton).toBeVisible();
|
||||
|
|
@ -51,22 +51,22 @@ test.describe('Chat activity', () => {
|
|||
await expect(chatPage.sendButton).toBeVisible();
|
||||
});
|
||||
|
||||
test('Stop generation during submission', async () => {
|
||||
await chatPage.sendUserMessage('Why is grass green?');
|
||||
test("Stop generation during submission", async () => {
|
||||
await chatPage.sendUserMessage("Why is grass green?");
|
||||
await expect(chatPage.stopButton).toBeVisible();
|
||||
await chatPage.stopButton.click();
|
||||
await expect(chatPage.sendButton).toBeVisible();
|
||||
});
|
||||
|
||||
test('Edit user message and resubmit', async () => {
|
||||
await chatPage.sendUserMessage('Why is grass green?');
|
||||
test("Edit user message and resubmit", async () => {
|
||||
await chatPage.sendUserMessage("Why is grass green?");
|
||||
await chatPage.isGenerationComplete();
|
||||
|
||||
const assistantMessage = await chatPage.getRecentAssistantMessage();
|
||||
expect(assistantMessage.content).toContain("It's just green duh!");
|
||||
|
||||
const userMessage = await chatPage.getRecentUserMessage();
|
||||
await userMessage.edit('Why is the sky blue?');
|
||||
await userMessage.edit("Why is the sky blue?");
|
||||
|
||||
await chatPage.isGenerationComplete();
|
||||
|
||||
|
|
@ -74,20 +74,20 @@ test.describe('Chat activity', () => {
|
|||
expect(updatedAssistantMessage.content).toContain("It's just blue duh!");
|
||||
});
|
||||
|
||||
test('Hide suggested actions after sending message', async () => {
|
||||
await chatPage.isElementVisible('suggested-actions');
|
||||
test("Hide suggested actions after sending message", async () => {
|
||||
await chatPage.isElementVisible("suggested-actions");
|
||||
await chatPage.sendUserMessageFromSuggestion();
|
||||
await chatPage.isElementNotVisible('suggested-actions');
|
||||
await chatPage.isElementNotVisible("suggested-actions");
|
||||
});
|
||||
|
||||
test('Upload file and send image attachment with message', async () => {
|
||||
test("Upload file and send image attachment with message", async () => {
|
||||
await chatPage.addImageAttachment();
|
||||
|
||||
await chatPage.isElementVisible('attachments-preview');
|
||||
await chatPage.isElementVisible('input-attachment-loader');
|
||||
await chatPage.isElementNotVisible('input-attachment-loader');
|
||||
await chatPage.isElementVisible("attachments-preview");
|
||||
await chatPage.isElementVisible("input-attachment-loader");
|
||||
await chatPage.isElementNotVisible("input-attachment-loader");
|
||||
|
||||
await chatPage.sendUserMessage('Who painted this?');
|
||||
await chatPage.sendUserMessage("Who painted this?");
|
||||
|
||||
const userMessage = await chatPage.getRecentUserMessage();
|
||||
expect(userMessage.attachments).toHaveLength(1);
|
||||
|
|
@ -95,22 +95,22 @@ test.describe('Chat activity', () => {
|
|||
await chatPage.isGenerationComplete();
|
||||
|
||||
const assistantMessage = await chatPage.getRecentAssistantMessage();
|
||||
expect(assistantMessage.content).toBe('This painting is by Monet!');
|
||||
expect(assistantMessage.content).toBe("This painting is by Monet!");
|
||||
});
|
||||
|
||||
test('Call weather tool', async () => {
|
||||
test("Call weather tool", async () => {
|
||||
await chatPage.sendUserMessage("What's the weather in sf?");
|
||||
await chatPage.isGenerationComplete();
|
||||
|
||||
const assistantMessage = await chatPage.getRecentAssistantMessage();
|
||||
|
||||
expect(assistantMessage.content).toBe(
|
||||
'The current temperature in San Francisco is 17°C.',
|
||||
"The current temperature in San Francisco is 17°C."
|
||||
);
|
||||
});
|
||||
|
||||
test('Upvote message', async () => {
|
||||
await chatPage.sendUserMessage('Why is the sky blue?');
|
||||
test("Upvote message", async () => {
|
||||
await chatPage.sendUserMessage("Why is the sky blue?");
|
||||
await chatPage.isGenerationComplete();
|
||||
|
||||
const assistantMessage = await chatPage.getRecentAssistantMessage();
|
||||
|
|
@ -118,8 +118,8 @@ test.describe('Chat activity', () => {
|
|||
await chatPage.isVoteComplete();
|
||||
});
|
||||
|
||||
test('Downvote message', async () => {
|
||||
await chatPage.sendUserMessage('Why is the sky blue?');
|
||||
test("Downvote message", async () => {
|
||||
await chatPage.sendUserMessage("Why is the sky blue?");
|
||||
await chatPage.isGenerationComplete();
|
||||
|
||||
const assistantMessage = await chatPage.getRecentAssistantMessage();
|
||||
|
|
@ -127,8 +127,8 @@ test.describe('Chat activity', () => {
|
|||
await chatPage.isVoteComplete();
|
||||
});
|
||||
|
||||
test('Update vote', async () => {
|
||||
await chatPage.sendUserMessage('Why is the sky blue?');
|
||||
test("Update vote", async () => {
|
||||
await chatPage.sendUserMessage("Why is the sky blue?");
|
||||
await chatPage.isGenerationComplete();
|
||||
|
||||
const assistantMessage = await chatPage.getRecentAssistantMessage();
|
||||
|
|
@ -139,25 +139,25 @@ test.describe('Chat activity', () => {
|
|||
await chatPage.isVoteComplete();
|
||||
});
|
||||
|
||||
test('Create message from url query', async ({ page }) => {
|
||||
await page.goto('/?query=Why is the sky blue?');
|
||||
test("Create message from url query", async ({ page }) => {
|
||||
await page.goto("/?query=Why is the sky blue?");
|
||||
|
||||
await chatPage.isGenerationComplete();
|
||||
|
||||
const userMessage = await chatPage.getRecentUserMessage();
|
||||
expect(userMessage.content).toBe('Why is the sky blue?');
|
||||
expect(userMessage.content).toBe("Why is the sky blue?");
|
||||
|
||||
const assistantMessage = await chatPage.getRecentAssistantMessage();
|
||||
expect(assistantMessage.content).toContain("It's just blue duh!");
|
||||
});
|
||||
|
||||
test('auto-scrolls to bottom after submitting new messages', async () => {
|
||||
test("auto-scrolls to bottom after submitting new messages", async () => {
|
||||
test.fixme();
|
||||
await chatPage.sendMultipleMessages(5, (i) => `filling message #${i}`);
|
||||
await chatPage.waitForScrollToBottom();
|
||||
});
|
||||
|
||||
test('scroll button appears when user scrolls up, hides on click', async () => {
|
||||
test("scroll button appears when user scrolls up, hides on click", async () => {
|
||||
test.fixme();
|
||||
await chatPage.sendMultipleMessages(5, (i) => `filling message #${i}`);
|
||||
await expect(chatPage.scrollToBottomButton).not.toBeVisible();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue