Skip to content

Commit

Permalink
update test to use cy.mount
Browse files Browse the repository at this point in the history
  • Loading branch information
lmiller1990 committed Jul 14, 2022
1 parent d9aefd5 commit a5a043b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
//
import { mount } from 'cypress/react'

Cypress.Commands.add('mount', mount)
5 changes: 2 additions & 3 deletions system-tests/project-fixtures/react/src/App.cy.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import React from 'react'
import { mount } from 'cypress/react'
import { App } from './App'

it('renders hello world', () => {
mount(<App />)
it('renders hello world with cy.mount', () => {
cy.mount(<App />)
// Click on the header here to ensure that the AUT is interactable. This ensures that the dev server overlay is not displaying
cy.get('h1').contains('Hello World').click()
})
2 changes: 1 addition & 1 deletion system-tests/projects/react17/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"devDependencies": {
"@vitejs/plugin-react": "^1.3.2",
"vite": "2.9.2",
"vite": "2.9.14",
"webpack": "^4"
},
"projectFixtureDirectory": "react"
Expand Down
12 changes: 6 additions & 6 deletions system-tests/projects/react17/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2239,7 +2239,7 @@ posix-character-classes@^0.1.0:
resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab"
integrity sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==

postcss@^8.4.12:
postcss@^8.4.13:
version "8.4.14"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.14.tgz#ee9274d5622b4858c1007a74d76e42e56fd21caf"
integrity sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==
Expand Down Expand Up @@ -2886,13 +2886,13 @@ util@^0.11.0:
dependencies:
inherits "2.0.3"

vite@2.9.2:
version "2.9.2"
resolved "https://registry.yarnpkg.com/vite/-/vite-2.9.2.tgz#bf233b96c77beae7c4a4674d76ece678588620f3"
integrity sha512-ScbfYsiG1N/xE2TnZWYWJ8aOFBQovEl4VLU+0dktxqXvqdAvcTOEUM5YqwaBkmNHSHUGHLPd92tuXFQ35wDkVw==
vite@2.9.14:
version "2.9.14"
resolved "https://registry.yarnpkg.com/vite/-/vite-2.9.14.tgz#c438324c6594afd1050df3777da981dee988bb1b"
integrity sha512-P/UCjSpSMcE54r4mPak55hWAZPlyfS369svib/gpmz8/01L822lMPOJ/RYW6tLCe1RPvMvOsJ17erf55bKp4Hw==
dependencies:
esbuild "^0.14.27"
postcss "^8.4.12"
postcss "^8.4.13"
resolve "^1.22.0"
rollup "^2.59.0"
optionalDependencies:
Expand Down
4 changes: 0 additions & 4 deletions system-tests/test/component_testing_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,6 @@ describe(`React major versions with Vite`, function () {
}
})

// TODO: Get these to pass.
// React 18 works fine, but the module resolution is messy due to
// how we use symlinks in system-tests, causing the `import('react-dom/client')
// to incorrectly resolve to `cypress/cli/react/dist`
describe(`React major versions with Webpack`, function () {
systemTests.setup()

Expand Down

1 comment on commit a5a043b

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on a5a043b Jul 14, 2022

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/10.3.1/linux-x64/lmiller/21381-react-18-with-ignore-a5a043b752674a4f8f83b61cb7dd764579e5da16/cypress.tgz

Please sign in to comment.