Skip to content

Commit

Permalink
[add-filter] upd browser test
Browse files Browse the repository at this point in the history
  • Loading branch information
Valeria-Zimnitskaya committed Jan 14, 2025
1 parent c37cdab commit 754a5e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions semcore/add-filter/__tests__/add-filter.browser-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ test.describe('Add filter button', () => {

await test.step('Verify filter list exapnded by click on Add filter', async () => {
await locators.addFilterBtn.click();
await expect(locators.addFilterListItem('Color')).toBeVisible();
await expect(page).toHaveScreenshot();
await locators.addFilterListItem('Color').click();
await expect(page).toHaveScreenshot();
await expect(locators.addFilterSelectTrigger('Color')).toBeFocused();
await expect(page).toHaveScreenshot();
});

await test.step('Verify filter hidden and filters list exapnded when cliking on Add filter', async () => {
Expand All @@ -50,7 +51,7 @@ test.describe('Add filter button', () => {

await test.step('Verify filter removes and filters list remain hidden when clicking outside', async () => {
await locators.addFilterListItem('Color').click();
const box = await page.$eval('div.___SFlex_11pya_gg_', (el: any) => {
const box = await page.$eval('div.___SFlex_1wav9_gg_', (el: any) => {
const rect = el.getBoundingClientRect();
return { x: rect.left + rect.width / 2, y: rect.top + rect.height / 2 };
});
Expand Down Expand Up @@ -86,7 +87,6 @@ test.describe('Add filter button', () => {
await page.keyboard.press('Enter');

await expect(locators.addFilterSelectTrigger('Color')).toBeFocused();
//await expect(locators.addFilterSelectOption('Blue')).toBeFocused();
});

await test.step('Verify filter hidden, filters list not expanded and Add filter focused by ESC', async () => {
Expand Down

0 comments on commit 754a5e9

Please sign in to comment.