Skip to content
This repository was archived by the owner on Mar 5, 2022. It is now read-only.
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
3 changes: 3 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ workflows:
- run:
name: Linting code 🧹
command: npm run lint
- run:
name: Stop exclusive tests 1️⃣
command: npm run stop-only
- run:
name: Check markdown links ⚓️
command: npm run check:links
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React from 'react'
import Select from './Note'

describe('Note', () => {
it.only('save text', () => {
it('save text', () => {
mount(<Select />)
cy.get('#change').type('input text')
cy.contains('button', 'Save').click()
Expand Down
2 changes: 1 addition & 1 deletion cypress/component/advanced/tutorial/square-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Square extends React.Component {
}

describe('Square', () => {
it.only('changes value on click', () => {
it('changes value on click', () => {
const selector = 'button.square'
mount(<Square value="X" />)
// initially button is blank
Expand Down
4 changes: 4 additions & 0 deletions cypress/component/advanced/use-local-storage/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# localStorage with useEffect

<!-- markdown-link-check-disable -->

App idea from https://twitter.com/housecor/status/1268900696604258304

<!-- markdown-link-check-enable -->

Shows how to set `localStorage` before mounting the component, and how to clear the local storage before each test.

![Test](images/cart.png)
Expand Down
4 changes: 4 additions & 0 deletions cypress/component/basic/react-book-by-chris-noring/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
<!-- markdown-link-check-disable -->

These tests follow examples from the free [React Book](https://softchris.github.io/books/react) by [Christoffer Noring](https://twitter.com/chris_noring).

<!-- markdown-link-check-enable -->
34 changes: 34 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@
"lint": "standard --verbose --fix *.js src cypress/integration",
"semantic-release": "semantic-release",
"format": "prettier --write '*.js', 'src/*.jsx' 'cypress/**/*.js' 'cypress/**/*.jsx' 'lib/*.ts'",
"check:links": "find . -type f -name 'README.md' ! -path './node_modules/*' | xargs -L1 npx markdown-link-check --quiet"
"check:links": "find . -type f -name 'README.md' ! -path './node_modules/*' | xargs -L1 npx markdown-link-check --quiet",
"stop-only": "stop-only --folder cypress",
"warn-only": "stop-only --warn --folder cypress"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
"pre-commit": "lint-staged && npm run warn-only",
"pre-push": "npm run stop-only"
}
},
"lint-staged": {
Expand Down Expand Up @@ -100,6 +103,7 @@
"react-tooltip": "4.2.6",
"semantic-release": "17.1.0",
"standard": "14.3.3",
"stop-only": "3.1.0",
"style-loader": "0.23.1",
"styled-components": "5.0.0",
"svg-url-loader": "3.0.3",
Expand Down