You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-22Lines changed: 13 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -138,10 +138,10 @@ Each component has a `dist/vars.css` file that contains declarations for each co
138
138
139
139
As such, **you do not need to include `dist/vars.css`** unless:
140
140
141
-
1. You wish to reference the component-level variables used by a component in external CSS (i.e. `--spectrum-rule-medium-height`)
142
-
2. You have upgraded `@spectrum-css/vars`, but have not updated a component (such as `@spectrum-css/rule`) and do not want to update the component-level variables used by that component
141
+
1. You wish to reference the component-level variables used by a component in external CSS (i.e. `--spectrum-divider-medium-height`)
142
+
2. You have upgraded `@spectrum-css/vars`, but have not updated a component (such as `@spectrum-css/divider`) and do not want to update the component-level variables used by that component
143
143
144
-
When this file is imported, if in updated version of `@spectrum-css/vars` changed global variables (such as a global color, `--spectrum-global-color-gray-300`), you will get those updates. However, if the updated version of `@spectrum-css/vars` changed component-level variables (such as the height of a medium Rule, `--spectrum-rule-medium-height`), you will not get those updates. As such, this file can be used to lock-in the basic visual style of a component while still allowing for system-level updates.
144
+
When this file is imported, if in updated version of `@spectrum-css/vars` changed global variables (such as a global color, `--spectrum-global-color-gray-300`), you will get those updates. However, if the updated version of `@spectrum-css/vars` changed component-level variables (such as the height of a medium divider, `--spectrum-divider-medium-height`), you will not get those updates. As such, this file can be used to lock-in the basic visual style of a component while still allowing for system-level updates.
145
145
146
146
In most cases, this file will not be required, so you can safely ignore it. If you see unexpected visual changes creeping into components that you have not updated, `dist/vars.css` may correct them.
147
147
@@ -236,37 +236,28 @@ The following tasks are available:
236
236
237
237
## Testing
238
238
239
-
Visual regression testing is implemented by [BackstopJS](https://github.com/garris/BackstopJS). In order to avoid browser rendering inconsistent issue on different environments, the test needs to run inside of docker container.
239
+
Visual regression testing is implemented by [BackstopJS](https://github.com/garris/BackstopJS). To avoid browser rendering inconsistent issue, the test needs to run with a docker container.
240
240
241
241
### Setup docker
242
242
243
243
Install docker on your machine [Download Docker](https://hub.docker.com/search/?type=edition&offering=community&architecture=amd64)
244
244
245
-
### Backstop reference bitmap
245
+
### Reference bitmap images
246
246
247
-
The reference bitmaps are hosted in a adobe internal repo and published as [@spectrum-css/spectrum-css-vr-test-asset](https://www.npmjs.com/package/@spectrum-css/spectrum-css-vr-test-asset). All the reference bitmaps are generated within docker instance. If you want to run test with native environment, you have to regenerate the reference yourself.
247
+
The reference bitmap images are published as an NPM package [@spectrum-css/spectrum-css-vr-test-assets-essential](https://www.npmjs.com/package/@spectrum-css/spectrum-css-vr-test-assets-essential). Before the test, please try to upgrade this package.
248
248
249
-
### Start dev server with Browsersync notification turnoff
The following npm scripts are available for testing:
253
+
`VRT=true yarn run dev`
256
254
257
-
- `npm run backstop:approve` - Identical to [backstop approve](https://github.com/garris/BackstopJS#approving-changes)
258
-
- `npm run backstop:test` - Run test in your local native environment
259
-
- `npm run backstop:clean` - Clean up all the testing reports and test images
260
-
- `npm run backstop:docker:test` - Run test in your local docker container
261
-
- `npm run backstop:ci:test` - Run test in a continuous integration environment like [Travis-CI](https://travis-ci.org/adobe/spectrum-css)
262
-
- `npm run kill-zombies` - Kill zombies Chromium instances on your local machine
255
+
### Testing CLI targets
263
256
264
-
Both `backstop:test` and `backstop:docker:test` accept arguments to customize your test run:
257
+
The following yarn scripts are available for testing:
265
258
266
-
- `npm run backstop:docker:test` - Run test for all the components with color stop as `light` and scale as `medium`.
267
-
- `npm run backstop:docker:test button` - Run test for `button` and its dependents components like action bar, toast etc with color stop as `light` and scale as `medium`.
268
-
- `npm run backstop:docker:test themes=lightest,light scales=medium,large radio` - Run test for `radio` and its dependents components with color stop as `lightest` and `light` and scale as `medium` and `large`. It means that a single scenario will run 4 times.
269
-
- `npm run backstop:docker:test themes=lightest,light,dark,darkest scales=medium,large` - Run test for all the components with all the color and scale combinations. It means that a single scenario will be run 8 times.
259
+
- `yarn run backstop:docker:test` - Run all the visual regression tests.
260
+
- `yarn run backstop:docker:test button` - Run test for `button` component only.
0 commit comments