Skip to content

Commit

Permalink
Docs: Visual testing handbook updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jonniebigodes committed Jun 7, 2024
1 parent 1fe6bda commit 86bf798
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
9 changes: 4 additions & 5 deletions content/visual-testing-handbook/react/en/automate.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ git push
Build and publish our Storybook with the `chromatic` command. Don't forget to replace the <code>project-token</code> with one Chromatic supplies on the website.

```shell
yarn chromatic --project-token=<project-token>
npx chromatic --project-token=<project-token>
```

![Chromatic running](/intro-to-storybook/chromatic-manual-storybook-console-log.png)
Expand All @@ -92,10 +92,9 @@ git checkout -b change-commentlist-outline

Tweak the `CommentList` component

```diff:title=src/components/CommentList.js
import React from 'react';

```diff:title=src/components/CommentList.jsx
import PropTypes from 'prop-types';

import styled, { createGlobalStyle } from 'styled-components';

const CommentListDiv = styled.div`
Expand Down Expand Up @@ -221,7 +220,7 @@ Commit the change, push it to the repo and run Chromatic:
```shell:clipboard=false
git commit -am "make CommentList sparkle"
git push -u origin change-commentlist-outline
yarn chromatic --project-token=<project-token>
npx chromatic --project-token=<project-token>
```

Open a pull request for the new branch in your GitHub repository.
Expand Down
4 changes: 2 additions & 2 deletions content/visual-testing-handbook/react/en/vtdd.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ yarn

Next, we’ll build the simplest-possible `CommentList` implementation so that we can ensure our tests are set up correctly.

Inside your `src` directory, create a new folder called `components`, then by a new file called `CommentList.jsx` with the following content:
Inside your `src` directory, create a new folder called `components`, then create a new file called `CommentList.jsx` with the following content:

```jsx:title=src/components/CommentList.jsx
import PropTypes from 'prop-types';
Expand Down Expand Up @@ -187,7 +187,7 @@ We use [`styled-components`](https://styled-components.com/) – a library that
yarn add styled-components
```

Update your `CommentList.js` file to the following:
Update your `CommentList.jsx` file to the following:

```diff:title=src/components/CommentList.jsx
import PropTypes from 'prop-types';
Expand Down
2 changes: 1 addition & 1 deletion gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ module.exports = {
},
'visual-testing-handbook': {
react: {
en: 7.6,
en: 8.1,
es: 6.5,
ko: 6.5,
},
Expand Down

0 comments on commit 86bf798

Please sign in to comment.