-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(plasma-web):
Radiobox
: check only for id existance
- Loading branch information
Showing
25 changed files
with
100 additions
and
15 deletions.
There are no files selected for viewing
Binary file added
BIN
+54.3 KB
...ts/Checkbox/Checkbox.component-test.tsx/plasma-web Checkbox -- default.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed
BIN
-13 KB
.../CheckboxBase.component-test.tsx/plasma-core Checkbox -- __description.snap.png
Binary file not shown.
Binary file removed
BIN
-7.82 KB
...eckbox/CheckboxBase.component-test.tsx/plasma-core Checkbox -- __label.snap.png
Binary file not shown.
Binary file removed
BIN
-13.4 KB
...ckbox/CheckboxBase.component-test.tsx/plasma-core Checkbox -- _checked.snap.png
Binary file not shown.
Binary file removed
BIN
-17.1 KB
...kbox/CheckboxBase.component-test.tsx/plasma-core Checkbox -- _disabled.snap.png
Binary file not shown.
Binary file removed
BIN
-19.5 KB
...ckbox/CheckboxBase.component-test.tsx/plasma-core Checkbox -- _focused.snap.png
Binary file not shown.
Binary file removed
BIN
-9.17 KB
...CheckboxBase.component-test.tsx/plasma-core Checkbox -- _indeterminate.snap.png
Binary file not shown.
Binary file removed
BIN
-2.11 KB
...heckbox/CheckboxBase.component-test.tsx/plasma-core Checkbox -- simple.snap.png
Binary file not shown.
Binary file removed
BIN
-11.6 KB
...ckbox/CheckboxBase.component-test.tsx/plasma-core Checkbox -- squeezes.snap.png
Binary file not shown.
Binary file removed
BIN
-6.06 KB
...box/CheckboxBase.component-test.tsx/plasma-core Checkbox -- with focus.snap.png
Binary file not shown.
Binary file added
BIN
+54.8 KB
...ts/Checkbox/Checkbox.component-test.tsx/plasma-web Checkbox -- default.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed
BIN
-13.1 KB
.../CheckboxBase.component-test.tsx/plasma-core Checkbox -- __description.snap.png
Binary file not shown.
Binary file removed
BIN
-7.81 KB
...eckbox/CheckboxBase.component-test.tsx/plasma-core Checkbox -- __label.snap.png
Binary file not shown.
Binary file removed
BIN
-13.3 KB
...ckbox/CheckboxBase.component-test.tsx/plasma-core Checkbox -- _checked.snap.png
Binary file not shown.
Binary file removed
BIN
-17.4 KB
...kbox/CheckboxBase.component-test.tsx/plasma-core Checkbox -- _disabled.snap.png
Binary file not shown.
Binary file removed
BIN
-19.3 KB
...ckbox/CheckboxBase.component-test.tsx/plasma-core Checkbox -- _focused.snap.png
Binary file not shown.
Binary file removed
BIN
-9.02 KB
...CheckboxBase.component-test.tsx/plasma-core Checkbox -- _indeterminate.snap.png
Binary file not shown.
Binary file removed
BIN
-2.11 KB
...heckbox/CheckboxBase.component-test.tsx/plasma-core Checkbox -- simple.snap.png
Binary file not shown.
Binary file removed
BIN
-12.2 KB
...ckbox/CheckboxBase.component-test.tsx/plasma-core Checkbox -- squeezes.snap.png
Binary file not shown.
Binary file removed
BIN
-6.03 KB
...box/CheckboxBase.component-test.tsx/plasma-core Checkbox -- with focus.snap.png
Binary file not shown.
1 change: 1 addition & 0 deletions
1
packages/plasma-b2c/src/components/Checkbox/Checkbox.component-test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../plasma-web/src/components/Checkbox/Checkbox.component-test.tsx |
1 change: 0 additions & 1 deletion
1
packages/plasma-b2c/src/components/Checkbox/CheckboxBase.component-test.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
99 changes: 99 additions & 0 deletions
99
packages/plasma-web/src/components/Checkbox/Checkbox.component-test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
import React from 'react'; | ||
import { mount, CypressTestDecorator, getComponent } from '@sberdevices/plasma-cy-utils'; | ||
|
||
describe('plasma-web: Checkbox', () => { | ||
const Checkbox = getComponent('Checkbox'); | ||
const Link = getComponent('Link'); | ||
const List = getComponent('List'); | ||
const ListItem = getComponent('ListItem'); | ||
const name = 'languages'; | ||
const items = [ | ||
{ | ||
name, | ||
value: 'natural', | ||
label: 'Естественные языки', | ||
disabled: false, | ||
checked: true, | ||
indeterminate: false, | ||
description: 'Языки, на которых говорят люди. Они не были созданы искуственно и развивались естественно.', | ||
}, | ||
{ name, value: 'russian', label: 'Русский', checked: true, disabled: false, parent: 'natural' }, | ||
{ | ||
name, | ||
value: 'english', | ||
label: 'Английский', | ||
checked: true, | ||
disabled: false, | ||
description: ( | ||
<> | ||
Самый распространенный язык в <Link href="/#">мире</Link> | ||
</> | ||
), | ||
parent: 'natural', | ||
}, | ||
{ name, value: 'french', label: 'Французский', checked: true, disabled: false, parent: 'natural' }, | ||
{ | ||
name, | ||
value: 'chinese', | ||
label: ( | ||
<> | ||
Китайский <Link href="/#">язык</Link> | ||
</> | ||
), | ||
checked: true, | ||
parent: 'natural', | ||
}, | ||
{ | ||
name, | ||
value: 'artificial', | ||
label: 'Искусственные языки', | ||
checked: false, | ||
indeterminate: true, | ||
disabled: false, | ||
}, | ||
{ | ||
name, | ||
value: 'klingon', | ||
label: 'Клингонский', | ||
disabled: false, | ||
checked: false, | ||
description: 'Язык одной из раз в сериале СтарТрек', | ||
parent: 'artificial', | ||
}, | ||
{ | ||
name, | ||
value: 'elvish', | ||
label: 'Эльфийский', | ||
disabled: true, | ||
checked: true, | ||
description: 'Искусственный язык из вселенной Властелина колец', | ||
parent: 'artificial', | ||
}, | ||
{ | ||
name, | ||
value: 'dothraki', | ||
label: 'Дотракийский', | ||
disabled: true, | ||
checked: false, | ||
description: 'Язык, разработанный для реплик дотракийских племен из вселенной Песнь Льда и Огня', | ||
parent: 'artificial', | ||
}, | ||
]; | ||
|
||
it('default', () => { | ||
mount( | ||
<CypressTestDecorator> | ||
<List> | ||
{items.map((item) => ( | ||
<ListItem key={item.value} ml={item.parent ? '16x' : undefined} mb="4x"> | ||
<Checkbox {...item} /> | ||
</ListItem> | ||
))} | ||
</List> | ||
</CypressTestDecorator>, | ||
); | ||
|
||
cy.get('input[type="checkbox"]').first().focus(); | ||
cy.matchImageSnapshot(); | ||
}); | ||
}); |
1 change: 0 additions & 1 deletion
1
packages/plasma-web/src/components/Checkbox/CheckboxBase.component-test.tsx
This file was deleted.
Oops, something went wrong.