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
Убираем border-radius у ActionSheetItem на desktop, потому что при hover-эффекте загруглений не должно быть видно.
Проверяем hover-эффект в e2e тестах.
  • Loading branch information
mendrew authored Dec 22, 2023
1 parent dd23113 commit e3ec245
Show file tree
Hide file tree
Showing 13 changed files with 38 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,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 @@ -13,10 +13,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 @@ -34,10 +39,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();
});
});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@
.ActionSheetItem--menu {
inline-size: auto;
cursor: pointer;
border-radius: 0;
}

/**
Expand Down

0 comments on commit e3ec245

Please sign in to comment.