Skip to content

Commit

Permalink
fix(ActionSheetItem): hover on desktop without border-radius (#6309) (#…
Browse files Browse the repository at this point in the history
…6399)

Убираем border-radius у ActionSheetItem на desktop, потому что при hover-эффекте загруглений не должно быть видно.
Проверяем hover-эффект в e2e тестах.
  • Loading branch information
mendrew authored and actions-user committed Jan 18, 2024
1 parent ec1b138 commit a10ce32
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,13 @@ const propSets = [
<ActionSheetItem key="8" subtitle="Есть подзаголовок" meta="Meta">
Восьмой элемент
</ActionSheetItem>,
<ActionSheetItem key="9" subtitle="Meta прижата справа" meta="Meta" multiline>
<ActionSheetItem
key="9"
subtitle="Meta прижата справа"
meta="Meta"
multiline
data-testid="last-item-test-id"
>
Девятый элемент
</ActionSheetItem>,
],
Expand Down
10 changes: 10 additions & 0 deletions packages/vkui/src/components/ActionSheet/ActionSheet.e2e.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,15 @@ test.describe('ActionSheet', () => {
});
test('ViewWidth.MOBILE sizeY=regular', async ({
mount,
page,
expectScreenshotClippedToContent,
componentPlaygroundProps,
}) => {
await mount(<ActionSheetPlayground {...componentPlaygroundProps} />);

const item = page.getByTestId('last-item-test-id');
await item.hover();

await expectScreenshotClippedToContent();
});
});
Expand All @@ -35,10 +40,15 @@ test.describe('ActionSheet', () => {
});
test('ViewWidth.DESKTOP sizeY=regular', async ({
mount,
page,
expectScreenshotClippedToContent,
componentPlaygroundProps,
}) => {
await mount(<ActionSheetPlayground {...componentPlaygroundProps} />);

const item = page.getByTestId('last-item-test-id');
await item.hover();

await expectScreenshotClippedToContent();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@
.ActionSheetItem--menu {
width: auto;
cursor: pointer;
border-radius: 0;
}

/**
Expand Down

0 comments on commit a10ce32

Please sign in to comment.