Skip to content

Commit

Permalink
Fix some e2es
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewrisse committed Sep 30, 2024
1 parent 578dfe3 commit 1742527
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@
}
return;
}
console.log(resJson.text);
// save translation response
let responseMessage;
try {
Expand Down
2 changes: 2 additions & 0 deletions src/leapfrogai_ui/tests/helpers/threadHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import type { Profile } from '$lib/types/profile';
import { supabase } from './helpers';

export const clickToDeleteThread = async (page: Page, label: string) => {
const threads = page.getByTestId('threads');
await threads.getByText(label).hover();
await page.getByTestId(`thread-menu-btn-${label}`).click();
await page.getByRole('button', { name: /delete/i }).click();
const deleteBtns = await page.getByRole('button', { name: /delete/i }).all();
Expand Down
2 changes: 2 additions & 0 deletions src/leapfrogai_ui/tests/sidebar.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ test('can edit thread labels', async ({ page, openAIClient }) => {
await sendMessage(page, newMessage1);
await expect(messages).toHaveCount(2);

const threads = page.getByTestId('threads');
await threads.getByText(newMessage1).hover();
const threadMenuBtn = page.getByTestId(`thread-menu-btn-${newMessage1}`);
await threadMenuBtn.click();

Expand Down

0 comments on commit 1742527

Please sign in to comment.