Skip to content
Snippets Groups Projects
Commit c930a42a authored by ilyaukin's avatar ilyaukin
Browse files

Issue #3389608: Add a test for empty input

parent 05b3e41b
No related branches found
No related tags found
1 merge request!12Resolve #3389608 "Search"
......@@ -92,6 +92,28 @@ test.describe('Search tests.', () => {
}
});
test('(ATK-PW-1162) Search by a keyword: empty input @ATK-PW-1162 @search @content @empty', async ({ page }) => {
await page.goto(baseUrl);
await page.getByRole("button", { name: "Search Form" }).click();
await page.getByRole("button", { name: "Search", exact: true }).click();
await expect(page.getByText("Enter some keywords.")).toBeVisible();
});
test('(ATK-PW-1163) Advanced search: empty input @ATK-PW-1163 @search @content @empty', async ({ page, context }) => {
// In the default installation, only admin can do advanced search.
// Change if it's configured different way on your site.
await atkCommands.logInViaForm(page, context, qaUserAccounts.admin);
await page.goto(baseUrl + 'search/node');
// Expand "Advanced search".
await page.getByRole("button", { name: "Advanced search" }).click();
await page.locator('input[value="Advanced search"]').click();
// Wait for search result to be shown.
await expect(page.getByText("Enter some keywords.")).toBeVisible();
});
async function checkResult(page, item) {
const resultLocatorList = await page.locator('.search-result__title').all();
const resultList = [];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment