@atlaskit/ds-explorations 2.2.6 → 2.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/cjs/components/box.partial.js +8 -2
- package/dist/cjs/components/interaction-surface.partial.js +22 -2
- package/dist/cjs/components/text.partial.js +2 -2
- package/dist/cjs/internal/color-map.js +5 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/box.partial.js +8 -2
- package/dist/es2019/components/interaction-surface.partial.js +22 -2
- package/dist/es2019/components/text.partial.js +2 -2
- package/dist/es2019/internal/color-map.js +5 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/box.partial.js +8 -2
- package/dist/esm/components/interaction-surface.partial.js +22 -2
- package/dist/esm/components/text.partial.js +2 -2
- package/dist/esm/internal/color-map.js +5 -2
- package/dist/esm/version.json +1 -1
- package/dist/types/components/box.partial.d.ts +4 -2
- package/dist/types/components/interaction-surface.partial.d.ts +2 -0
- package/dist/types/components/surface-provider.d.ts +2 -2
- package/dist/types/components/text.partial.d.ts +2 -2
- package/dist/types/internal/color-map.d.ts +5 -2
- package/dist/types-ts4.5/components/box.partial.d.ts +4 -2
- package/dist/types-ts4.5/components/interaction-surface.partial.d.ts +2 -0
- package/dist/types-ts4.5/components/surface-provider.d.ts +2 -2
- package/dist/types-ts4.5/components/text.partial.d.ts +2 -2
- package/dist/types-ts4.5/internal/color-map.d.ts +5 -2
- package/examples/01-box.tsx +2 -0
- package/package.json +29 -27
- package/report.api.md +4 -0
- package/scripts/__tests__/__snapshots__/codegen.test.tsx.snap +26 -0
- package/src/components/__tests__/vr-tests/__snapshots__/box--default.png +0 -0
- package/src/components/__tests__/vr-tests/__snapshots__/text--default.png +0 -0
- package/src/components/__tests__/vr-tests/box-snapshot-test.vr.tsx +5 -0
- package/src/components/__tests__/vr-tests/text-snapshot-test.vr.tsx +5 -0
- package/src/components/box.partial.tsx +8 -2
- package/src/components/interaction-surface.partial.tsx +22 -2
- package/src/components/text.partial.tsx +2 -2
- package/src/internal/color-map.tsx +5 -2
- package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-basic-example-should-match-production-example-1-snap.png +0 -3
- package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-alignment-should-match-snapshot-1-snap.png +0 -3
- package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-background-and-padding-block-should-match-snapshot-1-snap.png +0 -3
- package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-background-and-padding-inline-should-match-snapshot-1-snap.png +0 -3
- package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-background-and-padding-should-match-snapshot-1-snap.png +0 -3
- package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-background-color-should-match-snapshot-1-snap.png +0 -3
- package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-border-color-should-match-snapshot-1-snap.png +0 -3
- package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-border-should-match-snapshot-1-snap.png +0 -3
- package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-layer-should-match-snapshot-1-snap.png +0 -3
- package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-shadow-should-match-snapshot-1-snap.png +0 -3
- package/src/components/__tests__/visual-regression/__image_snapshots__/text-snapshot-test-tsx-text-example-with-font-sizes-should-match-snapshot-1-snap.png +0 -3
- package/src/components/__tests__/visual-regression/__image_snapshots__/text-snapshot-test-tsx-text-example-with-font-weights-should-match-snapshot-1-snap.png +0 -3
- package/src/components/__tests__/visual-regression/__image_snapshots__/text-snapshot-test-tsx-text-example-with-line-heights-should-match-snapshot-1-snap.png +0 -3
- package/src/components/__tests__/visual-regression/__image_snapshots__/text-snapshot-test-tsx-text-example-with-testing-should-match-snapshot-1-snap.png +0 -3
- package/src/components/__tests__/visual-regression/box-snapshot-test.tsx +0 -35
- package/src/components/__tests__/visual-regression/text-snapshot-test.tsx +0 -31
- package/tmp/api-report-tmp.d.ts +0 -622
package/package.json
CHANGED
|
@@ -1,45 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/ds-explorations",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.7",
|
|
4
4
|
"description": "An experimental package for exploration and validation of spacing / typography foundations.",
|
|
5
|
-
"license": "Apache-2.0",
|
|
6
|
-
"atlassian": {
|
|
7
|
-
"team": "Design System Team",
|
|
8
|
-
"inPublicMirror": false,
|
|
9
|
-
"releaseModel": "continuous"
|
|
10
|
-
},
|
|
11
5
|
"publishConfig": {
|
|
12
6
|
"registry": "https://registry.npmjs.org/"
|
|
13
7
|
},
|
|
14
8
|
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
"codegen-styles": "ts-node --project ../../../tsconfig.node.json ./scripts/codegen-styles",
|
|
18
|
-
"prepare": "yarn ak-postbuild"
|
|
19
|
-
},
|
|
9
|
+
"author": "Atlassian Pty Ltd",
|
|
10
|
+
"license": "Apache-2.0",
|
|
20
11
|
"main": "dist/cjs/index.js",
|
|
21
12
|
"module": "dist/esm/index.js",
|
|
22
13
|
"module:es2019": "dist/es2019/index.js",
|
|
23
14
|
"types": "dist/types/index.d.ts",
|
|
24
|
-
"typesVersions": {
|
|
25
|
-
">=4.5 <4.9": {
|
|
26
|
-
"*": [
|
|
27
|
-
"dist/types-ts4.5/*",
|
|
28
|
-
"dist/types-ts4.5/index.d.ts"
|
|
29
|
-
]
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
15
|
"sideEffects": false,
|
|
33
16
|
"atlaskit:src": "src/index.tsx",
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
|
|
17
|
+
"atlassian": {
|
|
18
|
+
"team": "Design System Team",
|
|
19
|
+
"inPublicMirror": false,
|
|
20
|
+
"releaseModel": "continuous"
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"ak-postbuild": "cd ../../../ && yarn build @atlassian/codegen -d cjs,esm,es2019 && yarn build @atlaskit/tokens && cd packages/design-system/ds-explorations && yarn codegen-styles",
|
|
24
|
+
"codegen-styles": "ts-node --project ../../../tsconfig.node.json ./scripts/codegen-styles",
|
|
25
|
+
"prepare": "yarn ak-postbuild"
|
|
40
26
|
},
|
|
41
27
|
"dependencies": {
|
|
42
|
-
"@atlaskit/tokens": "^1.
|
|
28
|
+
"@atlaskit/tokens": "^1.13.0",
|
|
43
29
|
"@babel/runtime": "^7.0.0",
|
|
44
30
|
"@emotion/react": "^11.7.1",
|
|
45
31
|
"tiny-invariant": "^1.2.0"
|
|
@@ -48,6 +34,7 @@
|
|
|
48
34
|
"react": "^16.8.0"
|
|
49
35
|
},
|
|
50
36
|
"devDependencies": {
|
|
37
|
+
"@af/visual-regression": "*",
|
|
51
38
|
"@atlaskit/ds-lib": "*",
|
|
52
39
|
"@atlaskit/visual-regression": "*",
|
|
53
40
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
@@ -77,6 +64,21 @@
|
|
|
77
64
|
"deprecation": "no-deprecated-imports"
|
|
78
65
|
}
|
|
79
66
|
},
|
|
67
|
+
"typesVersions": {
|
|
68
|
+
">=4.5 <4.9": {
|
|
69
|
+
"*": [
|
|
70
|
+
"dist/types-ts4.5/*",
|
|
71
|
+
"dist/types-ts4.5/index.d.ts"
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"af:exports": {
|
|
76
|
+
".": "./src/index.tsx",
|
|
77
|
+
"./box": "./src/components/box.partial.tsx",
|
|
78
|
+
"./text": "./src/components/text.partial.tsx",
|
|
79
|
+
"./stack": "./src/components/stack.partial.tsx",
|
|
80
|
+
"./inline": "./src/components/inline.partial.tsx"
|
|
81
|
+
},
|
|
80
82
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1",
|
|
81
83
|
"homepage": "https://atlaskit.atlassian.com"
|
|
82
84
|
}
|
package/report.api.md
CHANGED
|
@@ -47,7 +47,9 @@ const backgroundColorMap: {
|
|
|
47
47
|
readonly 'neutral.bold': SerializedStyles;
|
|
48
48
|
readonly selected: SerializedStyles;
|
|
49
49
|
readonly 'selected.bold': SerializedStyles;
|
|
50
|
+
readonly 'brand.subtlest': SerializedStyles;
|
|
50
51
|
readonly 'brand.bold': SerializedStyles;
|
|
52
|
+
readonly 'brand.boldest': SerializedStyles;
|
|
51
53
|
readonly danger: SerializedStyles;
|
|
52
54
|
readonly 'danger.bold': SerializedStyles;
|
|
53
55
|
readonly warning: SerializedStyles;
|
|
@@ -76,7 +78,9 @@ const backgroundHoverColorMap: {
|
|
|
76
78
|
'neutral.bold': SerializedStyles;
|
|
77
79
|
selected: SerializedStyles;
|
|
78
80
|
'selected.bold': SerializedStyles;
|
|
81
|
+
'brand.subtlest': SerializedStyles;
|
|
79
82
|
'brand.bold': SerializedStyles;
|
|
83
|
+
'brand.boldest': SerializedStyles;
|
|
80
84
|
danger: SerializedStyles;
|
|
81
85
|
'danger.bold': SerializedStyles;
|
|
82
86
|
warning: SerializedStyles;
|
|
@@ -26,9 +26,15 @@ exports[`@atlaskit/design-system-explorations bg styles are generated correctly
|
|
|
26
26
|
'selected.bold': css({
|
|
27
27
|
backgroundColor: token('color.background.selected.bold', '#0052CC'),
|
|
28
28
|
}),
|
|
29
|
+
'brand.subtlest': css({
|
|
30
|
+
backgroundColor: token('color.background.brand.subtlest', '#B3D4FF'),
|
|
31
|
+
}),
|
|
29
32
|
'brand.bold': css({
|
|
30
33
|
backgroundColor: token('color.background.brand.bold', '#0052CC'),
|
|
31
34
|
}),
|
|
35
|
+
'brand.boldest': css({
|
|
36
|
+
backgroundColor: token('color.background.brand.boldest', '#0747A6'),
|
|
37
|
+
}),
|
|
32
38
|
danger: css({
|
|
33
39
|
backgroundColor: token('color.background.danger', '#FFEBE6'),
|
|
34
40
|
}),
|
|
@@ -164,11 +170,21 @@ exports[`@atlaskit/design-system-explorations border styles are generated correc
|
|
|
164
170
|
backgroundColor: token('color.background.selected.bold.pressed'),
|
|
165
171
|
},
|
|
166
172
|
}),
|
|
173
|
+
'brand.subtlest': css({
|
|
174
|
+
':active': {
|
|
175
|
+
backgroundColor: token('color.background.brand.subtlest.pressed'),
|
|
176
|
+
},
|
|
177
|
+
}),
|
|
167
178
|
'brand.bold': css({
|
|
168
179
|
':active': {
|
|
169
180
|
backgroundColor: token('color.background.brand.bold.pressed'),
|
|
170
181
|
},
|
|
171
182
|
}),
|
|
183
|
+
'brand.boldest': css({
|
|
184
|
+
':active': {
|
|
185
|
+
backgroundColor: token('color.background.brand.boldest.pressed'),
|
|
186
|
+
},
|
|
187
|
+
}),
|
|
172
188
|
danger: css({
|
|
173
189
|
':active': { backgroundColor: token('color.background.danger.pressed') },
|
|
174
190
|
}),
|
|
@@ -252,9 +268,19 @@ const backgroundHoverColorMap = {
|
|
|
252
268
|
backgroundColor: token('color.background.selected.bold.hovered'),
|
|
253
269
|
},
|
|
254
270
|
}),
|
|
271
|
+
'brand.subtlest': css({
|
|
272
|
+
':hover': {
|
|
273
|
+
backgroundColor: token('color.background.brand.subtlest.hovered'),
|
|
274
|
+
},
|
|
275
|
+
}),
|
|
255
276
|
'brand.bold': css({
|
|
256
277
|
':hover': { backgroundColor: token('color.background.brand.bold.hovered') },
|
|
257
278
|
}),
|
|
279
|
+
'brand.boldest': css({
|
|
280
|
+
':hover': {
|
|
281
|
+
backgroundColor: token('color.background.brand.boldest.hovered'),
|
|
282
|
+
},
|
|
283
|
+
}),
|
|
258
284
|
danger: css({
|
|
259
285
|
':hover': { backgroundColor: token('color.background.danger.hovered') },
|
|
260
286
|
}),
|
|
Binary file
|
|
@@ -510,11 +510,11 @@ export type PaddingInline = keyof typeof paddingInlineMap;
|
|
|
510
510
|
|
|
511
511
|
/**
|
|
512
512
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
513
|
-
* @codegen <<SignedSource::
|
|
513
|
+
* @codegen <<SignedSource::641490362f94761dab3c48a98b999b7a>>
|
|
514
514
|
* @codegenId colors
|
|
515
515
|
* @codegenCommand yarn codegen-styles
|
|
516
516
|
* @codegenParams ["border", "background", "shadow"]
|
|
517
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::
|
|
517
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::d09e7cd13e24113267155813747b3bd4>>
|
|
518
518
|
*/
|
|
519
519
|
const borderColorMap = {
|
|
520
520
|
'color.border': css({
|
|
@@ -585,9 +585,15 @@ const backgroundColorMap = {
|
|
|
585
585
|
'selected.bold': css({
|
|
586
586
|
backgroundColor: token('color.background.selected.bold', '#0052CC'),
|
|
587
587
|
}),
|
|
588
|
+
'brand.subtlest': css({
|
|
589
|
+
backgroundColor: token('color.background.brand.subtlest', '#B3D4FF'),
|
|
590
|
+
}),
|
|
588
591
|
'brand.bold': css({
|
|
589
592
|
backgroundColor: token('color.background.brand.bold', '#0052CC'),
|
|
590
593
|
}),
|
|
594
|
+
'brand.boldest': css({
|
|
595
|
+
backgroundColor: token('color.background.brand.boldest', '#0747A6'),
|
|
596
|
+
}),
|
|
591
597
|
danger: css({
|
|
592
598
|
backgroundColor: token('color.background.danger', '#FFEBE6'),
|
|
593
599
|
}),
|
|
@@ -70,11 +70,11 @@ export default InteractionSurface;
|
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
72
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
73
|
-
* @codegen <<SignedSource::
|
|
73
|
+
* @codegen <<SignedSource::6705bcce4bc1f3f6b944ca61e2f7afcf>>
|
|
74
74
|
* @codegenId interactions
|
|
75
75
|
* @codegenCommand yarn codegen-styles
|
|
76
76
|
* @codegenParams ["background"]
|
|
77
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::
|
|
77
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::d09e7cd13e24113267155813747b3bd4>>
|
|
78
78
|
*/
|
|
79
79
|
const backgroundActiveColorMap = {
|
|
80
80
|
input: css({
|
|
@@ -106,11 +106,21 @@ const backgroundActiveColorMap = {
|
|
|
106
106
|
backgroundColor: token('color.background.selected.bold.pressed'),
|
|
107
107
|
},
|
|
108
108
|
}),
|
|
109
|
+
'brand.subtlest': css({
|
|
110
|
+
':active': {
|
|
111
|
+
backgroundColor: token('color.background.brand.subtlest.pressed'),
|
|
112
|
+
},
|
|
113
|
+
}),
|
|
109
114
|
'brand.bold': css({
|
|
110
115
|
':active': {
|
|
111
116
|
backgroundColor: token('color.background.brand.bold.pressed'),
|
|
112
117
|
},
|
|
113
118
|
}),
|
|
119
|
+
'brand.boldest': css({
|
|
120
|
+
':active': {
|
|
121
|
+
backgroundColor: token('color.background.brand.boldest.pressed'),
|
|
122
|
+
},
|
|
123
|
+
}),
|
|
114
124
|
danger: css({
|
|
115
125
|
':active': { backgroundColor: token('color.background.danger.pressed') },
|
|
116
126
|
}),
|
|
@@ -194,9 +204,19 @@ const backgroundHoverColorMap = {
|
|
|
194
204
|
backgroundColor: token('color.background.selected.bold.hovered'),
|
|
195
205
|
},
|
|
196
206
|
}),
|
|
207
|
+
'brand.subtlest': css({
|
|
208
|
+
':hover': {
|
|
209
|
+
backgroundColor: token('color.background.brand.subtlest.hovered'),
|
|
210
|
+
},
|
|
211
|
+
}),
|
|
197
212
|
'brand.bold': css({
|
|
198
213
|
':hover': { backgroundColor: token('color.background.brand.bold.hovered') },
|
|
199
214
|
}),
|
|
215
|
+
'brand.boldest': css({
|
|
216
|
+
':hover': {
|
|
217
|
+
backgroundColor: token('color.background.brand.boldest.hovered'),
|
|
218
|
+
},
|
|
219
|
+
}),
|
|
200
220
|
danger: css({
|
|
201
221
|
':hover': { backgroundColor: token('color.background.danger.hovered') },
|
|
202
222
|
}),
|
|
@@ -287,11 +287,11 @@ export type LineHeight = keyof typeof lineHeightMap;
|
|
|
287
287
|
|
|
288
288
|
/**
|
|
289
289
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
290
|
-
* @codegen <<SignedSource::
|
|
290
|
+
* @codegen <<SignedSource::039c7b7400ed2152388a9501fcdea070>>
|
|
291
291
|
* @codegenId colors
|
|
292
292
|
* @codegenCommand yarn codegen-styles
|
|
293
293
|
* @codegenParams ["text"]
|
|
294
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::
|
|
294
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::d09e7cd13e24113267155813747b3bd4>>
|
|
295
295
|
*/
|
|
296
296
|
const textColorMap = {
|
|
297
297
|
'color.text': css({
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* The color map is used to map a background color token to a matching text color that will meet contrast.
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::43134d6abeba44006053eb83fc827e9b>>
|
|
7
7
|
* @codegenCommand yarn codegen-styles
|
|
8
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::d09e7cd13e24113267155813747b3bd4>>
|
|
9
9
|
*/
|
|
10
10
|
export default {
|
|
11
11
|
'neutral.bold': 'inverse',
|
|
@@ -17,6 +17,9 @@ export default {
|
|
|
17
17
|
'brand.bold': 'inverse',
|
|
18
18
|
'brand.bold.hovered': 'inverse',
|
|
19
19
|
'brand.bold.pressed': 'inverse',
|
|
20
|
+
'brand.boldest': 'inverse',
|
|
21
|
+
'brand.boldest.hovered': 'inverse',
|
|
22
|
+
'brand.boldest.pressed': 'inverse',
|
|
20
23
|
'danger.bold': 'inverse',
|
|
21
24
|
'danger.bold.hovered': 'inverse',
|
|
22
25
|
'danger.bold.pressed': 'inverse',
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getExampleUrl,
|
|
3
|
-
loadPage,
|
|
4
|
-
takeElementScreenShot,
|
|
5
|
-
} from '@atlaskit/visual-regression/helper';
|
|
6
|
-
|
|
7
|
-
describe('Box', () => {
|
|
8
|
-
[
|
|
9
|
-
'borderColor',
|
|
10
|
-
'backgroundColor',
|
|
11
|
-
'background-and-padding',
|
|
12
|
-
'background-and-paddingBlock',
|
|
13
|
-
'background-and-paddingInline',
|
|
14
|
-
'shadow',
|
|
15
|
-
'layer',
|
|
16
|
-
].forEach((selector) => {
|
|
17
|
-
it(`example with ${selector} should match snapshot`, async () => {
|
|
18
|
-
const url = getExampleUrl(
|
|
19
|
-
'design-system',
|
|
20
|
-
'ds-explorations',
|
|
21
|
-
'box',
|
|
22
|
-
global.__BASEURL__,
|
|
23
|
-
);
|
|
24
|
-
const { page } = global;
|
|
25
|
-
|
|
26
|
-
await loadPage(page, url);
|
|
27
|
-
|
|
28
|
-
const image = await takeElementScreenShot(
|
|
29
|
-
page,
|
|
30
|
-
`[data-testid="box-with-${selector}"]`,
|
|
31
|
-
);
|
|
32
|
-
expect(image).toMatchProdImageSnapshot();
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
});
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import __noop from '@atlaskit/ds-lib/noop';
|
|
2
|
-
import {
|
|
3
|
-
getExampleUrl,
|
|
4
|
-
loadPage,
|
|
5
|
-
takeElementScreenShot,
|
|
6
|
-
} from '@atlaskit/visual-regression/helper';
|
|
7
|
-
|
|
8
|
-
describe('Text', () => {
|
|
9
|
-
['font-sizes', 'font-weights', 'line-heights', 'testing'].forEach(
|
|
10
|
-
(testId) => {
|
|
11
|
-
it(`example with ${testId} should match snapshot`, async () => {
|
|
12
|
-
const url = getExampleUrl(
|
|
13
|
-
'design-system',
|
|
14
|
-
'ds-explorations',
|
|
15
|
-
'text',
|
|
16
|
-
global.__BASEURL__,
|
|
17
|
-
);
|
|
18
|
-
const { page } = global;
|
|
19
|
-
|
|
20
|
-
await loadPage(page, url);
|
|
21
|
-
|
|
22
|
-
const image = await takeElementScreenShot(
|
|
23
|
-
page,
|
|
24
|
-
`[data-testid="${testId}"]`,
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
expect(image).toMatchProdImageSnapshot();
|
|
28
|
-
});
|
|
29
|
-
},
|
|
30
|
-
);
|
|
31
|
-
});
|