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

Strings end with '\n' cause Chrome only test failures #3907

Closed
clarmso opened this issue Apr 8, 2019 · 4 comments
Closed

Strings end with '\n' cause Chrome only test failures #3907

clarmso opened this issue Apr 8, 2019 · 4 comments
Labels
browser: chrome pkg/driver This is due to an issue in the packages/driver directory process: tests Related to our internal tests type: bug

Comments

@clarmso
Copy link
Contributor

clarmso commented Apr 8, 2019

Current behavior:

The following tests from tests/integration/commands/actions/type_spec.coffee fail on Chrome 73 but pass on Electron 59:

  • can wrap cursor to next line in [contenteditable] with {rightarrow}
  • can wrap cursor to prev line in [contenteditable] with {leftarrow}failed
  • can use {rightarrow} and nested elementsfailed
  • enter and \n should act the same for [contenteditable]
  • can type into [contenteditable] with existing <div>
  • can type into [contenteditable] with existing <p>failed
  • collapses selection to start on {leftarrow}
  • collapses selection to end on {rightarrow}
  • should move cursor to the start of each line in contenteditable
  • should move cursor to the end of each line in contenteditable
  • up and down arrow on contenteditablefailed
  • downarrow ignores current selectionfailed
  • inserts new line into [contenteditable]
  • inserts new line into [contenteditable] from midline

The test failures have a common pattern: The expected result strings all end with \n but the actual result does not end with \n.

Screen Shot 2019-04-07 at 11 07 03 PM

Desired behavior:

All tests from type_spec.coffee pass on both Chrome and Electron.

Steps to reproduce: (app code and test code)

  • Clone Cypress' develop branch.
  • Install Chrome 73.
  • Open 3 terminals running the following commands:

Terminal 1:

cd cypress/package/driver
npm start

Terminal 2:

cd cypress/package/runner
npm run watch

Terminal 3:

cd cypress/packages/driver
npm run cypress:open
  • Select "Chrome 73" as the browser.
  • Click type_spec.coffee under command > actions.
  • Wait for the tests to finish. :)

Versions

Chrome Version 73.0.3683.103 (Official Build) (64-bit)
Mac OS (latest released version)
Cypress 3.2.0

@cypress-bot cypress-bot bot added the stage: investigating Someone from Cypress is looking into this label Apr 8, 2019
@jennifer-shehane
Copy link
Member

Thank you so much for opening such a detailed issue.`

Verified this is failing in develop for Chromium versions 72, 73, 75 - passing in Electron 59.

Also verified this is failing in master for Chromium versions 72, 73, 75 - passing in Electron 59, so it is not a regression in the 3.3.0 pre-release.

@bahmutov Are we running our tests against Chrome 64? Because this is quite old now. This should stay up to date with latest Chrome release. https://github.com/cypress-io/cypress/blob/master/circle.yml#L26

@cypress-bot cypress-bot bot added stage: ready for work The issue is reproducible and in scope and removed stage: investigating Someone from Cypress is looking into this labels Apr 8, 2019
@jennifer-shehane jennifer-shehane added type: bug browser: chrome pkg/driver This is due to an issue in the packages/driver directory process: tests Related to our internal tests labels Apr 8, 2019
@kuceb
Copy link
Contributor

kuceb commented Apr 8, 2019

this commit fixes those failing tests 3f1d388

will be merged in as part of #3891

@cypress-bot cypress-bot bot added stage: needs review The PR code is done & tested, needs review stage: work in progress and removed stage: ready for work The issue is reproducible and in scope stage: needs review The PR code is done & tested, needs review labels Apr 9, 2019
@clarmso
Copy link
Contributor Author

clarmso commented Jun 24, 2020

@jennifer-shehane Could we close this issue? The tests have been run against Chrome in addition to Electron.

@jennifer-shehane
Copy link
Member

Closing as resolved.

If you're experiencing a bug similar to this in Cypress, please open a new issue with a fully reproducible example that we can run. There may be a specific edge case with the issue that we need more detail to fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser: chrome pkg/driver This is due to an issue in the packages/driver directory process: tests Related to our internal tests type: bug
Projects
None yet
Development

No branches or pull requests

3 participants