Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Visual testing handbook updates #770

Merged
merged 1 commit into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading