-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(plasma-b2c): update tests for new testing model
- Loading branch information
Showing
62 changed files
with
263 additions
and
191 deletions.
There are no files selected for viewing
Binary file removed
BIN
-8.02 KB
...t-test.tsx/plasma-b2c Breadcrumbs -- [PLASMA-T1160] Breadcrumbs size=m.snap.png
Binary file not shown.
Binary file removed
BIN
-7.06 KB
...t-test.tsx/plasma-b2c Breadcrumbs -- [PLASMA-T1162] Breadcrumbs size=s.snap.png
Binary file not shown.
Binary file removed
BIN
-8.02 KB
...t.tsx/plasma-b2c Breadcrumbs -- [PLASMA-T1165] Breadcrumbs showItems=4.snap.png
Binary file not shown.
Binary file removed
BIN
-8.02 KB
...t.tsx/plasma-b2c Breadcrumbs -- [PLASMA-T1168] Breadcrumbs showItems=1.snap.png
Binary file not shown.
File renamed without changes
Binary file added
BIN
+4.84 KB
...asma-b2c Breadcrumbs -- [PLASMA-T1380] Breadcrumbs size=m, showItems=2.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 added
BIN
+5.97 KB
...asma-b2c Breadcrumbs -- [PLASMA-T1381] Breadcrumbs size=s, showItems=3.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
Binary file added
BIN
+62.9 KB
...test.tsx/plasma-b2c Card -- [PLASMA-T1721] Card ratio=12, roundness=16.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 added
BIN
+34.2 KB
...a-b2c Card -- [PLASMA-T1722] Card ratio=43, roundness=32, scaleOnFocus.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 added
BIN
+27.8 KB
...st.tsx/plasma-b2c Card -- [PLASMA-T1723] Card ratio=169, roundness=250.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
-40.9 KB
...-test.component-test.tsx/plasma-b2c Card -- [PLASMA-T710] Card default.snap.png
Binary file not shown.
Binary file added
BIN
+9.77 KB
... ChipGroup -- [PLASMA-T1599] ChipGroup size=l, view=default, gap=dense.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 added
BIN
+26.9 KB
...- [PLASMA-T1600] ChipGroup size=m, view=secondary, gap=wide, isWrapped.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 added
BIN
+8.8 KB
...x/plasma-b2c ChipGroup -- [PLASMA-T1601] ChipGroup size=s, view=accent.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 added
BIN
+6.27 KB
...nent-test.tsx/plasma-b2c ChipGroup -- [PLASMA-T1602] ChipGroup size=xs.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 added
BIN
+6.23 KB
...sma-b2c ChipGroup -- [PLASMA-T1780] ChipGroup isCommonChipStyles=false.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 added
BIN
+6.31 KB
...sx/plasma-b2c ChipGroup -- [PLASMA-T1781] ChipGroup isCommonChipStyles.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
-11.2 KB
...ma-b2c Range -- [PLASMA-T1001] Range enableSecondTextfieldContentRight.snap.png
Binary file not shown.
Binary file removed
BIN
-11.3 KB
...nent-test.tsx/plasma-b2c Range -- [PLASMA-T1002] Range firstValueError.snap.png
Binary file not shown.
Binary file removed
BIN
-11.2 KB
...nt-test.tsx/plasma-b2c Range -- [PLASMA-T1003] Range firstValueSuccess.snap.png
Binary file not shown.
Binary file removed
BIN
-10.9 KB
...2c Range -- [PLASMA-T1004] Range firstValueSuccess, secondValueSuccess.snap.png
Binary file not shown.
Binary file removed
BIN
-11 KB
...ma-b2c Range -- [PLASMA-T1005] Range firstValueError, secondValueError.snap.png
Binary file not shown.
Binary file modified
BIN
+445 Bytes
(100%)
...t-test.tsx/plasma-b2c Range -- [PLASMA-T1006] Range firstField clicked.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 modified
BIN
+489 Bytes
(100%)
...-test.tsx/plasma-b2c Range -- [PLASMA-T1016] Range secondField clicked.snap.png
Oops, something went wrong.
Binary file removed
BIN
-11.3 KB
...ent-test.tsx/plasma-b2c Range -- [PLASMA-T1192] Range secondValueError.snap.png
Diff not rendered.
Binary file removed
BIN
-11.3 KB
...t-test.tsx/plasma-b2c Range -- [PLASMA-T1193] Range secondValueSuccess.snap.png
Diff not rendered.
Binary file added
BIN
+11.6 KB
...x/plasma-b2c Range -- [PLASMA-T1383] Range size=l, dividerVariant=none.snap.png
Oops, something went wrong.
Binary file added
BIN
+11.3 KB
...extfieldContentLeft, enableSecondTextfieldContentLeft, firstValueError.snap.png
Oops, something went wrong.
Binary file added
BIN
+10.9 KB
...fieldContentRight, enableSecondTextfieldContentRight, secondValueError.snap.png
Oops, something went wrong.
Binary file added
BIN
+9.07 KB
...sx/plasma-b2c Range -- [PLASMA-T1533] Range size=xs, firstValueSuccess.snap.png
Oops, something went wrong.
Binary file added
BIN
+11.8 KB
...t-test.tsx/plasma-b2c Range -- [PLASMA-T1534] Range secondValueSuccess.snap.png
Oops, something went wrong.
Binary file added
BIN
+11.6 KB
...-b2c Range -- [PLASMA-T1535] Range firstValueError, secondValueSuccess.snap.png
Oops, something went wrong.
Binary file added
BIN
+10.8 KB
...-b2c Range -- [PLASMA-T1536] Range firstValueSuccess, secondValueError.snap.png
Oops, something went wrong.
Binary file added
BIN
+11.3 KB
...t.component-test.tsx/plasma-b2c Range -- [PLASMA-T1537] Range readOnly.snap.png
Oops, something went wrong.
Binary file added
BIN
+9.64 KB
...t.component-test.tsx/plasma-b2c Range -- [PLASMA-T1538] Range disabled.snap.png
Oops, something went wrong.
Binary file removed
BIN
-11.3 KB
...test.component-test.tsx/plasma-b2c Range -- [PLASMA-T984] Range size=l.snap.png
Diff not rendered.
Binary file removed
BIN
-9.3 KB
...st.component-test.tsx/plasma-b2c Range -- [PLASMA-T985] Range disabled.snap.png
Diff not rendered.
Binary file removed
BIN
-10.8 KB
...st.component-test.tsx/plasma-b2c Range -- [PLASMA-T986] Range readOnly.snap.png
Diff not rendered.
Binary file removed
BIN
-10.7 KB
...tsx/plasma-b2c Range -- [PLASMA-T987] Range enableContentRight, size=m.snap.png
Diff not rendered.
Binary file removed
BIN
-9.6 KB
....tsx/plasma-b2c Range -- [PLASMA-T988] Range enableContentLeft, size=s.snap.png
Diff not rendered.
Binary file removed
BIN
-8.74 KB
...x/plasma-b2c Range -- [PLASMA-T989] Range dividerVariant=none, size=xs.snap.png
Diff not rendered.
Binary file removed
BIN
-11.2 KB
...LASMA-T990] Range enableFirstTextfieldContentLeft, dividerVariant=none.snap.png
Diff not rendered.
Binary file removed
BIN
-10.9 KB
...nge enableFirstTextfieldContentRight, enableSecondTextfieldContentLeft.snap.png
Diff not rendered.
Binary file added
BIN
+5.08 KB
...ign=bottom, showScale, showCurrentValue, currentValueVisibility=always.snap.png
Oops, something went wrong.
Binary file added
BIN
+3.65 KB
...e, showScale, showCurrentValue, currentValueVisibility=hover, showIcon.snap.png
Oops, something went wrong.
Binary file added
BIN
+4.8 KB
...MA-T1696] Slider size=s, view=gradient, pointerSize=none, without icon.snap.png
Oops, something went wrong.
Binary file renamed
BIN
+2.52 KB
...ze=l, rangeValuesPlacement=outer.snap.png → ...out scale, without current value.snap.png
Oops, something went wrong.
File renamed without changes
Binary file added
BIN
+1.98 KB
...st.tsx/plasma-b2c Slider -- [PLASMA-T1699] Slider orientation=vertical.snap.png
Oops, something went wrong.
Binary file removed
BIN
-3.33 KB
...der -- [PLASMA-T697] Slider view=default, size=m, labelPlacement=outer.snap.png
Diff not rendered.
Binary file removed
BIN
-2.52 KB
...st.tsx/plasma-b2c Slider -- [PLASMA-T939] Slider view=gradient, size=s.snap.png
Diff not rendered.
Binary file removed
BIN
-3.36 KB
...plasma-b2c Slider -- [PLASMA-T940] Slider min=10, labelPlacement=inner.snap.png
Diff not rendered.
Binary file removed
BIN
-2.54 KB
...b2c Slider -- [PLASMA-T941] Slider max=123, rangeValuesPlacement=inner.snap.png
Diff not rendered.
Binary file removed
BIN
-3.06 KB
...nt-test.tsx/plasma-b2c Slider -- [PLASMA-T942] Slider showCurrentValue.snap.png
Diff not rendered.
Binary file removed
BIN
-2.51 KB
...t.tsx/plasma-b2c Slider -- [PLASMA-T943] Slider disableShowRangeValues.snap.png
Diff not rendered.
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
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
90 changes: 90 additions & 0 deletions
90
packages/plasma-b2c/src/components/ChipGroup/ChipGroup.update-test.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,90 @@ | ||
import React from 'react'; | ||
import { mount, CypressTestDecorator, getComponent } from '@salutejs/plasma-cy-utils'; | ||
|
||
import { Chip as ChipB2C } from '../Chip'; | ||
|
||
import { ChipGroup as ChipGroupB2C } from '.'; | ||
|
||
describe('plasma-b2c: ChipGroup', () => { | ||
const ChipGroup = getComponent('ChipGroup') as typeof ChipGroupB2C; | ||
const Chip = getComponent('Chip') as typeof ChipB2C; | ||
|
||
const getChips = (itemsCount = 5) => | ||
Array(itemsCount) | ||
.fill(true) | ||
.map((_, i) => <Chip text={`Chip ${i}`} key={`chip_${i}`} hasClear={false} />); | ||
|
||
const getCustomChips = () => [ | ||
<Chip view="default" size="l" text="Chip 1" hasClear={false} />, | ||
<Chip view="accent" text="Chip 2" hasClear={false} />, | ||
<Chip view="secondary" size="s" text="Chip 3" hasClear={false} />, | ||
]; | ||
|
||
it('[PLASMA-T1599] ChipGroup: size=l, view=default, gap=dense', () => { | ||
mount( | ||
<CypressTestDecorator> | ||
<ChipGroup view="default" size="l" gap="dense"> | ||
{getChips()} | ||
</ChipGroup> | ||
</CypressTestDecorator>, | ||
); | ||
|
||
cy.matchImageSnapshot(); | ||
}); | ||
|
||
it('[PLASMA-T1600] ChipGroup: size=m, view=secondary, gap=wide, isWrapped', () => { | ||
mount( | ||
<CypressTestDecorator> | ||
<ChipGroup view="secondary" size="m" gap="wide" isWrapped> | ||
{getChips(20)} | ||
</ChipGroup> | ||
</CypressTestDecorator>, | ||
); | ||
|
||
cy.matchImageSnapshot(); | ||
}); | ||
|
||
it('[PLASMA-T1601] ChipGroup: size=s, view=accent', () => { | ||
mount( | ||
<CypressTestDecorator> | ||
<ChipGroup view="accent" size="s"> | ||
{getChips(20)} | ||
</ChipGroup> | ||
</CypressTestDecorator>, | ||
); | ||
|
||
cy.matchImageSnapshot(); | ||
}); | ||
|
||
it('[PLASMA-T1602] ChipGroup: size=xs', () => { | ||
mount( | ||
<CypressTestDecorator> | ||
<ChipGroup view="default" size="xs"> | ||
{getChips()} | ||
</ChipGroup> | ||
</CypressTestDecorator>, | ||
); | ||
|
||
cy.matchImageSnapshot(); | ||
}); | ||
|
||
it('[PLASMA-T1780] ChipGroup: isCommonChipStyles=false', () => { | ||
mount( | ||
<CypressTestDecorator> | ||
<ChipGroup isCommonChipStyles={false}>{getCustomChips()}</ChipGroup> | ||
</CypressTestDecorator>, | ||
); | ||
|
||
cy.matchImageSnapshot(); | ||
}); | ||
|
||
it('[PLASMA-T1781] ChipGroup: isCommonChipStyles', () => { | ||
mount( | ||
<CypressTestDecorator> | ||
<ChipGroup isCommonChipStyles>{getCustomChips()}</ChipGroup> | ||
</CypressTestDecorator>, | ||
); | ||
|
||
cy.matchImageSnapshot(); | ||
}); | ||
}); |
Oops, something went wrong.