Skip to content

Commit a8bf055

Browse files
committed
test: ✅ add RecipeFilter testronaut test
1 parent 788de23 commit a8bf055

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { test, expect } from '@testronaut/angular';
2+
import { RecipeFilter } from './recipe-filter.ng';
3+
4+
test('recipe filter', async ({ page, mount }) => {
5+
const { outputs } = await mount(RecipeFilter);
6+
7+
await page.getByText('Keywords').fill('Burger');
8+
9+
expect(outputs.filterChange.calls).toHaveLength(1);
10+
expect(outputs.filterChange.calls[0]).toMatchObject({ keywords: 'Burger' });
11+
});

apps/5-testronaut-solution/src/app/recipe/recipe-search.pw.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ test('recipe search', async ({ page, mount, runInBrowser }) => {
2020
});
2121

2222
await mount(RecipeSearch);
23-
await page.getByText('Keywords').click();
23+
2424
await page.getByRole('textbox', { name: 'Keywords' }).fill('Bur');
2525
await expect(page.getByRole('heading')).toHaveText(['Burger']);
2626
});

0 commit comments

Comments
 (0)