Skip to content

Commit

Permalink
feat(@cypress/react): Support react-scripts v4 (#15488)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmtrKovalenko authored Mar 16, 2021
1 parent ed4bf54 commit 3e9d752
Show file tree
Hide file tree
Showing 4 changed files with 4,018 additions and 2,843 deletions.
4 changes: 3 additions & 1 deletion npm/react/examples/react-scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
"@cypress/react": "file:../../dist",
"check-code-coverage": "1.9.2",
"cypress-circleci-reporter": "0.2.0",
"react-scripts": "3.4.3"
"react": "17.0.1",
"react-dom": "17.0.1",
"react-scripts": "4.0.2"
},
"browserslist": {
"production": [
Expand Down
5 changes: 3 additions & 2 deletions npm/react/examples/react-scripts/src/RemotePizza.cy-spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react'
import ReactDom from 'react-dom'
import RemotePizza from './RemotePizza'
import { mount } from '@cypress/react'

Expand All @@ -10,7 +11,7 @@ describe('RemotePizza', () => {
'pizza',
)

mount(<RemotePizza />)
mount(<RemotePizza />, { ReactDom })
cy.contains('button', /cook/i).click()
cy.wait('@pizza') // make sure the network stub was used

Expand All @@ -35,7 +36,7 @@ describe('RemotePizza', () => {
args: { ingredients },
})

mount(<RemotePizza />)
mount(<RemotePizza />, { ReactDom })
cy.contains('button', /cook/i).click()

for (const ingredient of ingredients) {
Expand Down
Loading

4 comments on commit 3e9d752

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 3e9d752 Mar 16, 2021

Choose a reason for hiding this comment

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

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/6.7.2/circle-develop-3e9d7523eb6aa20773e8c87778b28d19921ae781/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 3e9d752 Mar 16, 2021

Choose a reason for hiding this comment

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

AppVeyor has built the win32 ia32 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/6.7.2/appveyor-develop-3e9d7523eb6aa20773e8c87778b28d19921ae781/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 3e9d752 Mar 16, 2021

Choose a reason for hiding this comment

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

AppVeyor has built the win32 x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/6.7.2/appveyor-develop-3e9d7523eb6aa20773e8c87778b28d19921ae781/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 3e9d752 Mar 16, 2021

Choose a reason for hiding this comment

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

Circle has built the darwin x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/6.7.2/circle-develop-3e9d7523eb6aa20773e8c87778b28d19921ae781/cypress.tgz

Please sign in to comment.