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:
@@ -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();
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user