Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

e2e: add screenshot state custom height #8246

Merged
merged 6 commits into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/vkui/src/components/Cell/Cell.e2e-playground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ export const CellPlayground = (props: ComponentPlaygroundProps) => {
return (
<ComponentPlayground
{...props}
componentStateHeight={{
android: 155,
ios: 155,
vkcom: 100,
}}
propSets={[
{
mode: ['selectable'],
Expand Down
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 @@ -8,6 +8,11 @@ export const CellButtonPlayground = (props: ComponentPlaygroundProps) => {
return (
<ComponentPlayground
{...props}
componentStateHeight={{
android: 125,
ios: 125,
vkcom: 110,
}}
propSets={[
{
centered: [undefined, true],
Expand Down
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 @@ -15,6 +15,11 @@ export const MiniInfoCellPlayground = (props: ComponentPlaygroundProps) => {
return (
<ComponentPlayground
{...props}
componentStateHeight={{
android: 100,
ios: 100,
vkcom: 60,
}}
propSets={[
{
before: [<Icon20PlaceOutline key="icon" />],
Expand All @@ -34,6 +39,10 @@ export const MiniInfoCellPlayground = (props: ComponentPlaygroundProps) => {
before: [<Icon20ArticleOutline key="icon" />],
textWrap: ['nowrap', 'short', 'full'],
children: [longChildrenValue],
$componentStateHeight: {
android: 175,
ios: 175,
},
},
{
before: [<Icon20WorkOutline key="icon" />],
Expand Down
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.
59 changes: 37 additions & 22 deletions packages/vkui/src/components/RichCell/RichCell.e2e-playground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,43 @@ export const RichCellPlayground = (props: ComponentPlaygroundProps) => {
</ButtonGroup>,
],
$adaptivity: 'y',
$componentStateHeight: {
android: 300,
ios: 300,
vkcom: 210,
},
},
{
before: [<Avatar size={48} key="48" />],
children: ['Михаил Лихачев'],
overTitle: ['Команда ВКонтакте, Санкт-Петербург'],
after: [
<RichCell.Icon key="icon">
<Icon24UserAddOutline />
</RichCell.Icon>,
],
$componentStateHeight: {
android: 150,
ios: 150,
vkcom: 100,
},
},
{
before: [<Avatar size={24} key="24" />],
children: ['Михаил'],
after: [
withLabel(
<div style={{ maxWidth: 150 }}>Very very very very very very very long after</div>,
'Very long after',
),
],
beforeAlign: ['center', 'end'],
contentAlign: ['center', 'end'],
$componentStateHeight: {
android: 140,
ios: 140,
vkcom: 100,
},
},
{
before: [<Avatar size={72} key="72" />],
Expand Down Expand Up @@ -70,28 +107,6 @@ export const RichCellPlayground = (props: ComponentPlaygroundProps) => {
after: [<Button key="After">Подписаться</Button>],
afterAlign: ['start', 'center'],
},
{
before: [<Avatar size={48} key="48" />],
children: ['Михаил Лихачев'],
overTitle: ['Команда ВКонтакте, Санкт-Петербург'],
after: [
<RichCell.Icon key="icon">
<Icon24UserAddOutline />
</RichCell.Icon>,
],
},
{
before: [<Avatar size={24} key="24" />],
children: ['Михаил'],
after: [
withLabel(
<div style={{ maxWidth: 150 }}>Very very very very very very very long after</div>,
'Very long after',
),
],
beforeAlign: ['center', 'end'],
contentAlign: ['center', 'end'],
},
// Проверяем, что при отсутствии after контент в основной части рястягивается на всю доступную ширину
{
children: ['Children'],
Expand Down
Loading
Loading