generated from gravity-ui/package-example
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cd31d6f
commit 908b168
Showing
632 changed files
with
5,374 additions
and
2 deletions.
There are no files selected for viewing
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,10 @@ | ||
import React from 'react'; | ||
|
||
import {DynamicView as DynamicViewBase} from '../../src/lib/core/components/View/DynamicView'; | ||
import {Spec} from '../../src/lib/core/types/specs'; | ||
import {FormValue} from '../../src/lib/core/types/value'; | ||
import {dynamicViewConfig} from '../../src/lib/kit/constants/config'; | ||
|
||
export const DynamicView = ({spec, value}: {spec: Spec; value: FormValue}) => { | ||
return <DynamicViewBase spec={spec} value={value} config={dynamicViewConfig} />; | ||
}; |
Binary file added
BIN
+19.4 KB
...isual.test.tsx-snapshots/Card-Accordeon-Card-array-spec-dark-chromium-linux.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
+14.8 KB
....visual.test.tsx-snapshots/Card-Accordeon-Card-array-spec-dark-webkit-linux.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
+18.6 KB
...sual.test.tsx-snapshots/Card-Accordeon-Card-array-spec-light-chromium-linux.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
+14.3 KB
...visual.test.tsx-snapshots/Card-Accordeon-Card-array-spec-light-webkit-linux.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
+19.5 KB
...sual.test.tsx-snapshots/Card-Accordeon-Card-object-spec-dark-chromium-linux.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
+15.8 KB
...visual.test.tsx-snapshots/Card-Accordeon-Card-object-spec-dark-webkit-linux.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
+18.9 KB
...ual.test.tsx-snapshots/Card-Accordeon-Card-object-spec-light-chromium-linux.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
+15.4 KB
...isual.test.tsx-snapshots/Card-Accordeon-Card-object-spec-light-webkit-linux.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
+19.2 KB
....visual.test.tsx-snapshots/Card-Section-Card-array-spec-dark-chromium-linux.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
+14.4 KB
...rd.visual.test.tsx-snapshots/Card-Section-Card-array-spec-dark-webkit-linux.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
+18.3 KB
...visual.test.tsx-snapshots/Card-Section-Card-array-spec-light-chromium-linux.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
+14 KB
...d.visual.test.tsx-snapshots/Card-Section-Card-array-spec-light-webkit-linux.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
+19.3 KB
...visual.test.tsx-snapshots/Card-Section-Card-object-spec-dark-chromium-linux.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
+15.5 KB
...d.visual.test.tsx-snapshots/Card-Section-Card-object-spec-dark-webkit-linux.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
+18.7 KB
...isual.test.tsx-snapshots/Card-Section-Card-object-spec-light-chromium-linux.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
+15.1 KB
....visual.test.tsx-snapshots/Card-Section-Card-object-spec-light-webkit-linux.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
+16.4 KB
....test.tsx-snapshots/Card-view-Accordeon-Card-array-spec-dark-chromium-linux.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
+12.8 KB
...al.test.tsx-snapshots/Card-view-Accordeon-Card-array-spec-dark-webkit-linux.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
+15.8 KB
...test.tsx-snapshots/Card-view-Accordeon-Card-array-spec-light-chromium-linux.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
+12.5 KB
...l.test.tsx-snapshots/Card-view-Accordeon-Card-array-spec-light-webkit-linux.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
+15.8 KB
...test.tsx-snapshots/Card-view-Accordeon-Card-object-spec-dark-chromium-linux.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
+13.5 KB
...l.test.tsx-snapshots/Card-view-Accordeon-Card-object-spec-dark-webkit-linux.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
+15.5 KB
...est.tsx-snapshots/Card-view-Accordeon-Card-object-spec-light-chromium-linux.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
+13.2 KB
....test.tsx-snapshots/Card-view-Accordeon-Card-object-spec-light-webkit-linux.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
+16 KB
...al.test.tsx-snapshots/Card-view-Section-Card-array-spec-dark-chromium-linux.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
+12.4 KB
...sual.test.tsx-snapshots/Card-view-Section-Card-array-spec-dark-webkit-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.5 KB
...l.test.tsx-snapshots/Card-view-Section-Card-array-spec-light-chromium-linux.png
Oops, something went wrong.
Binary file added
BIN
+12.1 KB
...ual.test.tsx-snapshots/Card-view-Section-Card-array-spec-light-webkit-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.5 KB
...l.test.tsx-snapshots/Card-view-Section-Card-object-spec-dark-chromium-linux.png
Oops, something went wrong.
Binary file added
BIN
+13.1 KB
...ual.test.tsx-snapshots/Card-view-Section-Card-object-spec-dark-webkit-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.2 KB
....test.tsx-snapshots/Card-view-Section-Card-object-spec-light-chromium-linux.png
Oops, something went wrong.
Binary file added
BIN
+12.8 KB
...al.test.tsx-snapshots/Card-view-Section-Card-object-spec-light-webkit-linux.png
Oops, something went wrong.
67 changes: 67 additions & 0 deletions
67
src/lib/kit/components/Card/__tests__/Card.visual.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,67 @@ | ||
import React from 'react'; | ||
|
||
import {ACCORDEON_CARD, SECTION_CARD, VALUE} from './helpers'; | ||
|
||
import {test} from '~playwright/core'; | ||
import {DynamicForm} from '~playwright/core/DynamicForm'; | ||
import {DynamicView} from '~playwright/core/DynamicView'; | ||
|
||
test.describe('Card', () => { | ||
test.describe('Accordeon Card', () => { | ||
test('array spec', async ({mount, expectScreenshot}) => { | ||
await mount(<DynamicForm spec={ACCORDEON_CARD.arraySpec} />); | ||
|
||
await expectScreenshot(); | ||
}); | ||
|
||
test('object spec', async ({mount, expectScreenshot}) => { | ||
await mount(<DynamicForm spec={ACCORDEON_CARD.objectSpec} />); | ||
|
||
await expectScreenshot(); | ||
}); | ||
}); | ||
|
||
test.describe('Section Card', () => { | ||
test('array spec', async ({mount, expectScreenshot}) => { | ||
await mount(<DynamicForm spec={SECTION_CARD.arraySpec} />); | ||
|
||
await expectScreenshot(); | ||
}); | ||
|
||
test('object spec', async ({mount, expectScreenshot}) => { | ||
await mount(<DynamicForm spec={SECTION_CARD.objectSpec} />); | ||
|
||
await expectScreenshot(); | ||
}); | ||
}); | ||
}); | ||
|
||
test.describe('Card view', () => { | ||
test.describe('Accordeon Card', () => { | ||
test('array spec', async ({mount, expectScreenshot}) => { | ||
await mount(<DynamicView spec={ACCORDEON_CARD.arraySpec} value={VALUE.array} />); | ||
|
||
await expectScreenshot(); | ||
}); | ||
|
||
test('object spec', async ({mount, expectScreenshot}) => { | ||
await mount(<DynamicView spec={ACCORDEON_CARD.objectSpec} value={VALUE.object} />); | ||
|
||
await expectScreenshot(); | ||
}); | ||
}); | ||
|
||
test.describe('Section Card', () => { | ||
test('array spec', async ({mount, expectScreenshot}) => { | ||
await mount(<DynamicView spec={SECTION_CARD.arraySpec} value={VALUE.array} />); | ||
|
||
await expectScreenshot(); | ||
}); | ||
|
||
test('object spec', async ({mount, expectScreenshot}) => { | ||
await mount(<DynamicView spec={SECTION_CARD.objectSpec} value={VALUE.object} />); | ||
|
||
await expectScreenshot(); | ||
}); | ||
}); | ||
}); |
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,134 @@ | ||
import {ArraySpec, FormValue, ObjectSpec, SpecTypes} from '../../../../core'; | ||
|
||
export const ACCORDEON_CARD: Record<string, ArraySpec | ObjectSpec> = { | ||
arraySpec: { | ||
defaultValue: ['value'], | ||
type: SpecTypes.Array, | ||
items: { | ||
type: SpecTypes.String, | ||
viewSpec: { | ||
type: 'base', | ||
layout: 'row', | ||
layoutTitle: 'Element', | ||
}, | ||
}, | ||
viewSpec: { | ||
type: 'base', | ||
layout: 'card_accordeon', | ||
layoutTitle: 'Accordeon Card', | ||
layoutOpen: true, | ||
itemLabel: 'Add element', | ||
}, | ||
}, | ||
objectSpec: { | ||
defaultValue: { | ||
name: 'value', | ||
age: 10, | ||
license: false, | ||
}, | ||
type: SpecTypes.Object, | ||
properties: { | ||
name: { | ||
type: SpecTypes.String, | ||
viewSpec: { | ||
type: 'base', | ||
layout: 'row', | ||
layoutTitle: 'Name', | ||
}, | ||
}, | ||
age: { | ||
type: SpecTypes.Number, | ||
viewSpec: { | ||
type: 'base', | ||
layout: 'row', | ||
layoutTitle: 'Age', | ||
}, | ||
}, | ||
license: { | ||
type: SpecTypes.Boolean, | ||
viewSpec: { | ||
type: 'base', | ||
layout: 'row', | ||
layoutTitle: 'License', | ||
}, | ||
}, | ||
}, | ||
viewSpec: { | ||
type: 'base', | ||
layout: 'card_accordeon', | ||
layoutTitle: 'Candidate', | ||
layoutOpen: true, | ||
}, | ||
}, | ||
}; | ||
|
||
export const SECTION_CARD: Record<string, ArraySpec | ObjectSpec> = { | ||
arraySpec: { | ||
defaultValue: ['value'], | ||
type: SpecTypes.Array, | ||
items: { | ||
type: SpecTypes.String, | ||
viewSpec: { | ||
type: 'base', | ||
layout: 'row', | ||
layoutTitle: 'Element', | ||
}, | ||
}, | ||
viewSpec: { | ||
type: 'base', | ||
layout: 'card_section', | ||
layoutTitle: 'Accordeon Card', | ||
layoutOpen: true, | ||
itemLabel: 'Add element', | ||
}, | ||
}, | ||
objectSpec: { | ||
defaultValue: { | ||
name: 'value', | ||
age: 10, | ||
license: false, | ||
}, | ||
type: SpecTypes.Object, | ||
properties: { | ||
name: { | ||
type: SpecTypes.String, | ||
viewSpec: { | ||
type: 'base', | ||
layout: 'row', | ||
layoutTitle: 'Name', | ||
}, | ||
}, | ||
age: { | ||
type: SpecTypes.Number, | ||
viewSpec: { | ||
type: 'base', | ||
layout: 'row', | ||
layoutTitle: 'Age', | ||
}, | ||
}, | ||
license: { | ||
type: SpecTypes.Boolean, | ||
viewSpec: { | ||
type: 'base', | ||
layout: 'row', | ||
layoutTitle: 'License', | ||
}, | ||
}, | ||
}, | ||
viewSpec: { | ||
type: 'base', | ||
layout: 'card_section', | ||
layoutTitle: 'Candidate', | ||
layoutOpen: true, | ||
}, | ||
}, | ||
}; | ||
|
||
export const VALUE: Record<string, FormValue> = { | ||
array: ['value', 'value'], | ||
object: { | ||
name: 'name', | ||
age: 21, | ||
license: true, | ||
}, | ||
}; |
Binary file modified
BIN
-35 Bytes
(100%)
...Base.visual.test.tsx-snapshots/Array-Base-default-value-dark-chromium-linux.png
Oops, something went wrong.
Binary file modified
BIN
-48 Bytes
(100%)
...ayBase.visual.test.tsx-snapshots/Array-Base-default-value-dark-webkit-linux.png
Oops, something went wrong.
Binary file modified
BIN
-23 Bytes
(100%)
...ase.visual.test.tsx-snapshots/Array-Base-default-value-light-chromium-linux.png
Oops, something went wrong.
Binary file modified
BIN
-45 Bytes
(100%)
...yBase.visual.test.tsx-snapshots/Array-Base-default-value-light-webkit-linux.png
Oops, something went wrong.
Binary file modified
BIN
-34 Bytes
(100%)
...ayBase.visual.test.tsx-snapshots/Array-Base-description-dark-chromium-linux.png
Oops, something went wrong.
Binary file modified
BIN
-46 Bytes
(100%)
...rrayBase.visual.test.tsx-snapshots/Array-Base-description-dark-webkit-linux.png
Oops, something went wrong.
Binary file modified
BIN
-21 Bytes
(100%)
...yBase.visual.test.tsx-snapshots/Array-Base-description-light-chromium-linux.png
Oops, something went wrong.
Binary file modified
BIN
-44 Bytes
(100%)
...rayBase.visual.test.tsx-snapshots/Array-Base-description-light-webkit-linux.png
Oops, something went wrong.
Binary file modified
BIN
-40 Bytes
(100%)
...e.visual.test.tsx-snapshots/Array-Base-error-max-length-dark-chromium-linux.png
Oops, something went wrong.
Binary file modified
BIN
-60 Bytes
(100%)
...ase.visual.test.tsx-snapshots/Array-Base-error-max-length-dark-webkit-linux.png
Oops, something went wrong.
Binary file modified
BIN
-27 Bytes
(100%)
....visual.test.tsx-snapshots/Array-Base-error-max-length-light-chromium-linux.png
Oops, something went wrong.
Binary file modified
BIN
-61 Bytes
(100%)
...se.visual.test.tsx-snapshots/Array-Base-error-max-length-light-webkit-linux.png
Oops, something went wrong.
Binary file modified
BIN
-7 Bytes
(100%)
...e.visual.test.tsx-snapshots/Array-Base-error-min-length-dark-chromium-linux.png
Oops, something went wrong.
Binary file modified
BIN
-11 Bytes
(100%)
...ase.visual.test.tsx-snapshots/Array-Base-error-min-length-dark-webkit-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3 Bytes
(100%)
....visual.test.tsx-snapshots/Array-Base-error-min-length-light-chromium-linux.png
Oops, something went wrong.
Binary file modified
BIN
-11 Bytes
(100%)
...se.visual.test.tsx-snapshots/Array-Base-error-min-length-light-webkit-linux.png
Oops, something went wrong.
Binary file modified
BIN
-33 Bytes
(100%)
...ayBase.visual.test.tsx-snapshots/Array-Base-item-prefix-dark-chromium-linux.png
Oops, something went wrong.
Binary file modified
BIN
-37 Bytes
(100%)
...rrayBase.visual.test.tsx-snapshots/Array-Base-item-prefix-dark-webkit-linux.png
Oops, something went wrong.
Binary file modified
BIN
-19 Bytes
(100%)
...yBase.visual.test.tsx-snapshots/Array-Base-item-prefix-light-chromium-linux.png
Oops, something went wrong.
Binary file modified
BIN
-51 Bytes
(100%)
...rayBase.visual.test.tsx-snapshots/Array-Base-item-prefix-light-webkit-linux.png
Oops, something went wrong.
Binary file modified
BIN
-34 Bytes
(100%)
...ArrayBase.visual.test.tsx-snapshots/Array-Base-required-dark-chromium-linux.png
Oops, something went wrong.
Binary file modified
BIN
-45 Bytes
(100%)
..._/ArrayBase.visual.test.tsx-snapshots/Array-Base-required-dark-webkit-linux.png
Oops, something went wrong.
Binary file modified
BIN
-25 Bytes
(100%)
...rrayBase.visual.test.tsx-snapshots/Array-Base-required-light-chromium-linux.png
Oops, something went wrong.
Binary file modified
BIN
-42 Bytes
(100%)
.../ArrayBase.visual.test.tsx-snapshots/Array-Base-required-light-webkit-linux.png
Oops, something went wrong.
Binary file added
BIN
+11.7 KB
...yBase.visual.test.tsx-snapshots/Array-Base-view-default-dark-chromium-linux.png
Oops, something went wrong.
Binary file added
BIN
+8.83 KB
...rayBase.visual.test.tsx-snapshots/Array-Base-view-default-dark-webkit-linux.png
Oops, something went wrong.
Binary file added
BIN
+11.5 KB
...Base.visual.test.tsx-snapshots/Array-Base-view-default-light-chromium-linux.png
Oops, something went wrong.
Binary file added
BIN
+8.73 KB
...ayBase.visual.test.tsx-snapshots/Array-Base-view-default-light-webkit-linux.png
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
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
Binary file added
BIN
+25.9 KB
.../CardOneOf.visual.test.tsx-snapshots/Card-OneOf-default-dark-chromium-linux.png
Oops, something went wrong.
Binary file added
BIN
+18.6 KB
...__/CardOneOf.visual.test.tsx-snapshots/Card-OneOf-default-dark-webkit-linux.png
Oops, something went wrong.
Binary file added
BIN
+25.2 KB
...CardOneOf.visual.test.tsx-snapshots/Card-OneOf-default-light-chromium-linux.png
Oops, something went wrong.
Binary file added
BIN
+17.9 KB
..._/CardOneOf.visual.test.tsx-snapshots/Card-OneOf-default-light-webkit-linux.png
Oops, something went wrong.
Binary file added
BIN
+29.2 KB
...sual.test.tsx-snapshots/Card-OneOf-default-value-object-dark-chromium-linux.png
Oops, something went wrong.
Binary file added
BIN
+20.4 KB
...visual.test.tsx-snapshots/Card-OneOf-default-value-object-dark-webkit-linux.png
Oops, something went wrong.
Binary file added
BIN
+28.3 KB
...ual.test.tsx-snapshots/Card-OneOf-default-value-object-light-chromium-linux.png
Oops, something went wrong.
Binary file added
BIN
+19.8 KB
...isual.test.tsx-snapshots/Card-OneOf-default-value-object-light-webkit-linux.png
Oops, something went wrong.
Binary file added
BIN
+23.8 KB
...sual.test.tsx-snapshots/Card-OneOf-default-value-string-dark-chromium-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.2 KB
...visual.test.tsx-snapshots/Card-OneOf-default-value-string-dark-webkit-linux.png
Oops, something went wrong.
Binary file added
BIN
+23 KB
...ual.test.tsx-snapshots/Card-OneOf-default-value-string-light-chromium-linux.png
Oops, something went wrong.
Binary file added
BIN
+14.7 KB
...isual.test.tsx-snapshots/Card-OneOf-default-value-string-light-webkit-linux.png
Oops, something went wrong.
Binary file added
BIN
+27.2 KB
...dOneOf.visual.test.tsx-snapshots/Card-OneOf-description-dark-chromium-linux.png
Oops, something went wrong.
Binary file added
BIN
+19.9 KB
...ardOneOf.visual.test.tsx-snapshots/Card-OneOf-description-dark-webkit-linux.png
Oops, something went wrong.
Binary file added
BIN
+26.5 KB
...OneOf.visual.test.tsx-snapshots/Card-OneOf-description-light-chromium-linux.png
Oops, something went wrong.
Binary file added
BIN
+19.2 KB
...rdOneOf.visual.test.tsx-snapshots/Card-OneOf-description-light-webkit-linux.png
Oops, something went wrong.
Binary file added
BIN
+26.2 KB
...CardOneOf.visual.test.tsx-snapshots/Card-OneOf-required-dark-chromium-linux.png
Oops, something went wrong.
Binary file added
BIN
+18.9 KB
..._/CardOneOf.visual.test.tsx-snapshots/Card-OneOf-required-dark-webkit-linux.png
Oops, something went wrong.
Binary file added
BIN
+25.5 KB
...ardOneOf.visual.test.tsx-snapshots/Card-OneOf-required-light-chromium-linux.png
Oops, something went wrong.
Binary file added
BIN
+18.2 KB
.../CardOneOf.visual.test.tsx-snapshots/Card-OneOf-required-light-webkit-linux.png
Oops, something went wrong.
Binary file added
BIN
+17.3 KB
...dOneOf.visual.test.tsx-snapshots/Card-OneOf-view-object-dark-chromium-linux.png
Oops, something went wrong.
Binary file added
BIN
+13.4 KB
...ardOneOf.visual.test.tsx-snapshots/Card-OneOf-view-object-dark-webkit-linux.png
Oops, something went wrong.
Binary file added
BIN
+16.7 KB
...OneOf.visual.test.tsx-snapshots/Card-OneOf-view-object-light-chromium-linux.png
Oops, something went wrong.
Binary file added
BIN
+13 KB
...rdOneOf.visual.test.tsx-snapshots/Card-OneOf-view-object-light-webkit-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.2 KB
...dOneOf.visual.test.tsx-snapshots/Card-OneOf-view-string-dark-chromium-linux.png
Oops, something went wrong.
Binary file added
BIN
+11 KB
...ardOneOf.visual.test.tsx-snapshots/Card-OneOf-view-string-dark-webkit-linux.png
Oops, something went wrong.
Binary file added
BIN
+14.7 KB
...OneOf.visual.test.tsx-snapshots/Card-OneOf-view-string-light-chromium-linux.png
Oops, something went wrong.
Binary file added
BIN
+10.7 KB
...rdOneOf.visual.test.tsx-snapshots/Card-OneOf-view-string-light-webkit-linux.png
Oops, something went wrong.
53 changes: 53 additions & 0 deletions
53
src/lib/kit/components/Inputs/CardOneOf/__tests__/CardOneOf.visual.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,53 @@ | ||
import React from 'react'; | ||
|
||
import {CARD_ONEOF, VALUE} from './helpers'; | ||
|
||
import {test} from '~playwright/core'; | ||
import {DynamicForm} from '~playwright/core/DynamicForm'; | ||
import {DynamicView} from '~playwright/core/DynamicView'; | ||
|
||
test.describe('Card OneOf', () => { | ||
test('default', async ({mount, expectScreenshot}) => { | ||
await mount(<DynamicForm spec={CARD_ONEOF.default} />); | ||
|
||
await expectScreenshot(); | ||
}); | ||
|
||
test('default value object', async ({mount, expectScreenshot}) => { | ||
await mount(<DynamicForm spec={CARD_ONEOF.defaultValueObject} />); | ||
|
||
await expectScreenshot(); | ||
}); | ||
|
||
test('default value string', async ({mount, expectScreenshot}) => { | ||
await mount(<DynamicForm spec={CARD_ONEOF.defaultValueString} />); | ||
|
||
await expectScreenshot(); | ||
}); | ||
|
||
test('required', async ({mount, expectScreenshot}) => { | ||
await mount(<DynamicForm spec={CARD_ONEOF.required} />); | ||
|
||
await expectScreenshot(); | ||
}); | ||
|
||
test('description', async ({mount, expectScreenshot}) => { | ||
await mount(<DynamicForm spec={CARD_ONEOF.desription} />); | ||
|
||
await expectScreenshot(); | ||
}); | ||
}); | ||
|
||
test.describe('Card OneOf view', () => { | ||
test('object', async ({mount, expectScreenshot}) => { | ||
await mount(<DynamicView spec={CARD_ONEOF.default} value={VALUE.object} />); | ||
|
||
await expectScreenshot(); | ||
}); | ||
|
||
test('string', async ({mount, expectScreenshot}) => { | ||
await mount(<DynamicView spec={CARD_ONEOF.default} value={VALUE.string} />); | ||
|
||
await expectScreenshot(); | ||
}); | ||
}); |
Oops, something went wrong.