mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-22 10:21:36 +03:00
768511c7cc
refs https://github.com/TryGhost/Team/issues/3349 Tidies up the remaining major pieces which were not covered by tests. Extends the existing test patterns, although the API mocks are getting a bit unmanageable.
23 lines
709 B
TypeScript
23 lines
709 B
TypeScript
import {expect, test} from '@playwright/test';
|
|
import {mockApi} from '../utils/e2e';
|
|
|
|
test.describe('Search', async () => {
|
|
test('Hiding and showing groups based on the search term', async ({page}) => {
|
|
await mockApi({page});
|
|
|
|
await page.goto('/');
|
|
|
|
const searchBar = page.getByLabel('Search');
|
|
|
|
await searchBar.fill('theme');
|
|
|
|
await expect(page.getByTestId('theme')).toBeVisible();
|
|
await expect(page.getByTestId('title-and-description')).not.toBeVisible();
|
|
|
|
await searchBar.fill('title');
|
|
|
|
await expect(page.getByTestId('theme')).not.toBeVisible();
|
|
await expect(page.getByTestId('title-and-description')).toBeVisible();
|
|
});
|
|
});
|