Skip to content

Creates Index.integration.test.jsx and Sketchlist.unit.test.jsx #1780

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

Merged
merged 38 commits into from
Apr 22, 2021

Conversation

khanniie
Copy link
Collaborator

@khanniie khanniie commented Feb 26, 2021

Creates a few new tests, tweaks some testing helper files to work for those tests, add dev libraries msw and redux-mock-store.

Tests added:

  • Sketchlist test
  • Projects action creator test
  • index.jsx integration test
  • very barebones Editor.unit.test.jsx test

Other files added:

  • Stylemock to mock out style files
  • i18n.js mock to fix ERRCONNECTED problem
  • test data
  • has no linting errors (npm run lint)
  • is from a uniquely-named feature branch and has been rebased on top of the latest develop branch. (If I was asked to make more changes, I have made sure to rebase onto develop then too)
  • is descriptively named and links to an issue number, i.e. Fixes #123

@release-com
Copy link

release-com bot commented Feb 26, 2021

Release Environments

p5.js-web-editor
app-tede686-p5-js-web-editor.releaseapp.io

Copy link
Member

@catarak catarak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some formatting suggestions!

## Useful testing commands
Run the whole test suite
```
npm run test
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually for shell commands in documentation I preface them with a $

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed :-) thank you!

(x) => Promise.resolve({ data: 'foo' })
);
```
You can see it used in the context of a test [here](../client/modules/IDE/components/SketchList.test.jsx).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For screen reader accessibility reasons, it's best practice to not have links with the text "here" or "click here", but to instead describe what the link goes to. See What's wrong with using "Click Here" links?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed, good to know! Thanks for letting me know~

### What to test
For any type of component, you might want to consider testing:
- User input results in the class's method being called.
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you change this line to "```js", then this code will be syntax highlighted. same with all of the other instances of code. See Creating and highlighting code blocks.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow, MAGIC! It worked and looks much better :))

@khanniie khanniie changed the title draft PR for writing a sketchlist test draft PR for testing documentation Mar 17, 2021
@khanniie khanniie changed the title draft PR for testing documentation Creates Index.integration.test.jsx and Sketchlist.unit.test.jsx Apr 16, 2021
@khanniie khanniie marked this pull request as ready for review April 16, 2021 19:32
@catarak catarak merged commit 964fa00 into processing:develop Apr 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants