1
0
mirror of synced 2025-12-21 10:57:10 -05:00

Copilot cookbook: avoiding deadlocks and data inconsistency (#53286)

Co-authored-by: Sarita Iyer <66540150+saritai@users.noreply.github.com>
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
Co-authored-by: Tiago Pascoal <tspascoal@github.com>
Co-authored-by: Christopher Harrison <geektrainer@github.com>
Co-authored-by: Sophie <29382425+sophietheking@users.noreply.github.com>
Co-authored-by: Sunbrye Ly <56200261+sunbrye@users.noreply.github.com>
Co-authored-by: sunbrye <sunbrye@github.com>
Co-authored-by: Hector Alfaro <hectorsector@github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jules <19994093+jules-p@users.noreply.github.com>
This commit is contained in:
hubwriter
2024-12-03 14:58:00 +00:00
committed by GitHub
parent 880864b00e
commit c782030838
5 changed files with 246 additions and 6 deletions

View File

@@ -121,10 +121,10 @@ test.describe('ProductDetails Component', () => {
test('displays product details correctly', async ({ page }) => {
await page.goto('/product/1');
// Wait for loading to disappear
await expect(page.getByText('Loading...')).toBeHidden();
// Check all product details
await expect(page.locator('h2')).toHaveText('Test Product');
await expect(page.locator('text=This is a test product')).toBeVisible();
@@ -133,10 +133,10 @@ test.describe('ProductDetails Component', () => {
test('displays error message when product not found', async ({ page }) => {
await page.goto('/product/999');
// Wait for loading to disappear
await expect(page.getByText('Loading...')).toBeHidden();
// Check error message
await expect(page.locator('text=Error: Product not found')).toBeVisible();
});

View File

@@ -70,7 +70,7 @@ describe('load function', () => {
beforeEach(() => {
// Reset mock before each test
vi.resetAllMocks();
// Setup default mock implementation
(service.getRunner as any).mockResolvedValue(mockRunner);
});