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

feat: Add radius option for realTouch command #31

Merged
merged 1 commit into from
Feb 21, 2021

Conversation

Andarist
Copy link
Collaborator

I have wanted to write a test that required radius in my project and this is not supported yet so I've jumped into adding support for it. There are some more options that could actually be supported but I'm not interested in any of them so I've not added them: https://chromedevtools.github.io/devtools-protocol/tot/Input/#type-TouchPoint

This is a little bit quirky and I feel like it requires some explanation. I've played around with this and those are my takeaways:

  • radius actually doesn't impact what gets touched - I could set radius: 100 without it really catching an element that was too far away from the { x, y }
  • so this only impacts what values of those properties are received by event handlers
  • and because of that this is actually not multiplied by the appFrameScale or anything like that

Copy link
Owner

@dmtrKovalenko dmtrKovalenko left a comment

Choose a reason for hiding this comment

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

That's perfect, but we only need to update README as well. It looks like we need a solution for generating docs :D

@Andarist
Copy link
Collaborator Author

@dmtrKovalenko added

@dmtrKovalenko dmtrKovalenko changed the title Add support for radius options in realTouch feat: Add radius option for realTouch command Feb 21, 2021
@dmtrKovalenko dmtrKovalenko merged commit 1f13244 into dmtrKovalenko:develop Feb 21, 2021
@Andarist Andarist deleted the real-touch-radius branch February 21, 2021 13:33
dmtrKovalenko added a commit that referenced this pull request Mar 5, 2021
* feat: add option changing scrolling behavior (#30)

* feat: allow changing scrolling behavior for realClick and realHover

* feat: Fallback to Cypress.config('scrollBehavior')

* feat: Add specs for scrollBehavior to click and hover

* fix: ignore TS errors or Cypress <6.1.0

* fix: remove false option for scrollBehavior

* fix: bump dev dependency for cypress to 6.1 for compilation error

* [] Move scrollBehavior specs directly into click.spec and hover.spec

* [] Fix failing swipe tests by passing scrollBehavior

* Reduce renames

* Remove unused option

Co-authored-by: Dmitriy Kovalenko <dmtr.kovalenko@outlook.com>

* Add support for radius options in realTouch (#31)

* test: add test for radius options in realTouch (#32)

* fix(realTouch): accept 0 for position x/y values (#33)

* feat: Transpile files to cjs (#34)

* fix: calculate positions for elements inside iframes correctly (#29)

* fix: calculate positions for elements inside iframes correctly

* Handle iframes with scale transforms

* [] Refactor getCypressElementCoordinates to better handle scaled frames

* [] Add tests for click and hover in iframes

* [] Add HTML files to fixtures folder

* Remove unnecessary @ts-expect-error

* Change logic of get cypress element

* Make swipe tests retryable

Co-authored-by: Dmitriy Kovalenko <dmtr.kovalenko@outlook.com>

* Fix touch radius test

Co-authored-by: Kevin Fleischman <kevinrfleischman@gmail.com>
Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
Co-authored-by: Izhaki <roey@gefri.org>
Co-authored-by: Kevin Fleischman <kfleischman@squarespace.com>
@dmtrKovalenko
Copy link
Owner

🎉 This PR is included in version 1.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

dmtrKovalenko added a commit that referenced this pull request May 31, 2021
* 1.3.0 (#35)

* feat: add option changing scrolling behavior (#30)

* feat: allow changing scrolling behavior for realClick and realHover

* feat: Fallback to Cypress.config('scrollBehavior')

* feat: Add specs for scrollBehavior to click and hover

* fix: ignore TS errors or Cypress <6.1.0

* fix: remove false option for scrollBehavior

* fix: bump dev dependency for cypress to 6.1 for compilation error

* [] Move scrollBehavior specs directly into click.spec and hover.spec

* [] Fix failing swipe tests by passing scrollBehavior

* Reduce renames

* Remove unused option

Co-authored-by: Dmitriy Kovalenko <dmtr.kovalenko@outlook.com>

* Add support for radius options in realTouch (#31)

* test: add test for radius options in realTouch (#32)

* fix(realTouch): accept 0 for position x/y values (#33)

* feat: Transpile files to cjs (#34)

* fix: calculate positions for elements inside iframes correctly (#29)

* fix: calculate positions for elements inside iframes correctly

* Handle iframes with scale transforms

* [] Refactor getCypressElementCoordinates to better handle scaled frames

* [] Add tests for click and hover in iframes

* [] Add HTML files to fixtures folder

* Remove unnecessary @ts-expect-error

* Change logic of get cypress element

* Make swipe tests retryable

Co-authored-by: Dmitriy Kovalenko <dmtr.kovalenko@outlook.com>

* Fix touch radius test

Co-authored-by: Kevin Fleischman <kevinrfleischman@gmail.com>
Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
Co-authored-by: Izhaki <roey@gefri.org>
Co-authored-by: Kevin Fleischman <kfleischman@squarespace.com>

* Revert "1.3.0 (#35)"

This reverts commit db00220.

* chore(readme): Add badge and fix typo

Co-authored-by: Kevin Fleischman <kevinrfleischman@gmail.com>
Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
Co-authored-by: Izhaki <roey@gefri.org>
Co-authored-by: Kevin Fleischman <kfleischman@squarespace.com>
dmtrKovalenko added a commit that referenced this pull request Jul 26, 2021
* 1.3.0 (#35)

* feat: add option changing scrolling behavior (#30)

* feat: allow changing scrolling behavior for realClick and realHover

* feat: Fallback to Cypress.config('scrollBehavior')

* feat: Add specs for scrollBehavior to click and hover

* fix: ignore TS errors or Cypress <6.1.0

* fix: remove false option for scrollBehavior

* fix: bump dev dependency for cypress to 6.1 for compilation error

* [] Move scrollBehavior specs directly into click.spec and hover.spec

* [] Fix failing swipe tests by passing scrollBehavior

* Reduce renames

* Remove unused option

Co-authored-by: Dmitriy Kovalenko <dmtr.kovalenko@outlook.com>

* Add support for radius options in realTouch (#31)

* test: add test for radius options in realTouch (#32)

* fix(realTouch): accept 0 for position x/y values (#33)

* feat: Transpile files to cjs (#34)

* fix: calculate positions for elements inside iframes correctly (#29)

* fix: calculate positions for elements inside iframes correctly

* Handle iframes with scale transforms

* [] Refactor getCypressElementCoordinates to better handle scaled frames

* [] Add tests for click and hover in iframes

* [] Add HTML files to fixtures folder

* Remove unnecessary @ts-expect-error

* Change logic of get cypress element

* Make swipe tests retryable

Co-authored-by: Dmitriy Kovalenko <dmtr.kovalenko@outlook.com>

* Fix touch radius test

Co-authored-by: Kevin Fleischman <kevinrfleischman@gmail.com>
Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
Co-authored-by: Izhaki <roey@gefri.org>
Co-authored-by: Kevin Fleischman <kfleischman@squarespace.com>

* Revert "1.3.0 (#35)"

This reverts commit db00220.

* chore(readme): Add badge and fix typo

* Update cypress to v8

Co-authored-by: Kevin Fleischman <kevinrfleischman@gmail.com>
Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
Co-authored-by: Izhaki <roey@gefri.org>
Co-authored-by: Kevin Fleischman <kfleischman@squarespace.com>
dmtrKovalenko added a commit that referenced this pull request Jul 26, 2021
* chore: backport changes (#90)

* 1.3.0 (#35)

* feat: add option changing scrolling behavior (#30)

* feat: allow changing scrolling behavior for realClick and realHover

* feat: Fallback to Cypress.config('scrollBehavior')

* feat: Add specs for scrollBehavior to click and hover

* fix: ignore TS errors or Cypress <6.1.0

* fix: remove false option for scrollBehavior

* fix: bump dev dependency for cypress to 6.1 for compilation error

* [] Move scrollBehavior specs directly into click.spec and hover.spec

* [] Fix failing swipe tests by passing scrollBehavior

* Reduce renames

* Remove unused option

Co-authored-by: Dmitriy Kovalenko <dmtr.kovalenko@outlook.com>

* Add support for radius options in realTouch (#31)

* test: add test for radius options in realTouch (#32)

* fix(realTouch): accept 0 for position x/y values (#33)

* feat: Transpile files to cjs (#34)

* fix: calculate positions for elements inside iframes correctly (#29)

* fix: calculate positions for elements inside iframes correctly

* Handle iframes with scale transforms

* [] Refactor getCypressElementCoordinates to better handle scaled frames

* [] Add tests for click and hover in iframes

* [] Add HTML files to fixtures folder

* Remove unnecessary @ts-expect-error

* Change logic of get cypress element

* Make swipe tests retryable

Co-authored-by: Dmitriy Kovalenko <dmtr.kovalenko@outlook.com>

* Fix touch radius test

Co-authored-by: Kevin Fleischman <kevinrfleischman@gmail.com>
Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
Co-authored-by: Izhaki <roey@gefri.org>
Co-authored-by: Kevin Fleischman <kfleischman@squarespace.com>

* Revert "1.3.0 (#35)"

This reverts commit db00220.

* chore(readme): Add badge and fix typo

Co-authored-by: Kevin Fleischman <kevinrfleischman@gmail.com>
Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
Co-authored-by: Izhaki <roey@gefri.org>
Co-authored-by: Kevin Fleischman <kfleischman@squarespace.com>

* chore(deps-dev): bump @typescript-eslint/parser from 4.24.0 to 4.26.0 (#92)

Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.24.0 to 4.26.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.26.0/packages/parser)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @typescript-eslint/eslint-plugin (#91)

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.25.0 to 4.26.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.26.0/packages/eslint-plugin)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(Read

* chore(deps-dev): bump cypress from 7.4.0 to 7.6.0 (#111)

Bumps [cypress](https://github.com/cypress-io/cypress) from 7.4.0 to 7.6.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/.releaserc.base.js)
- [Commits](cypress-io/cypress@v7.4.0...v7.6.0)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: Remove validation of cypress iframe using id name (#124)

* chore(deps-dev): bump @typescript-eslint/eslint-plugin (#122)

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.26.0 to 4.28.3.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.28.3/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump cypress from 7.6.0 to 7.7.0 (#120)

Bumps [cypress](https://github.com/cypress-io/cypress) from 7.6.0 to 7.7.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/.releaserc.base.js)
- [Commits](cypress-io/cypress@v7.6.0...v7.7.0)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): Cypress v8 (#131)

* 1.3.0 (#35)

* feat: add option changing scrolling behavior (#30)

* feat: allow changing scrolling behavior for realClick and realHover

* feat: Fallback to Cypress.config('scrollBehavior')

* feat: Add specs for scrollBehavior to click and hover

* fix: ignore TS errors or Cypress <6.1.0

* fix: remove false option for scrollBehavior

* fix: bump dev dependency for cypress to 6.1 for compilation error

* [] Move scrollBehavior specs directly into click.spec and hover.spec

* [] Fix failing swipe tests by passing scrollBehavior

* Reduce renames

* Remove unused option

Co-authored-by: Dmitriy Kovalenko <dmtr.kovalenko@outlook.com>

* Add support for radius options in realTouch (#31)

* test: add test for radius options in realTouch (#32)

* fix(realTouch): accept 0 for position x/y values (#33)

* feat: Transpile files to cjs (#34)

* fix: calculate positions for elements inside iframes correctly (#29)

* fix: calculate positions for elements inside iframes correctly

* Handle iframes with scale transforms

* [] Refactor getCypressElementCoordinates to better handle scaled frames

* [] Add tests for click and hover in iframes

* [] Add HTML files to fixtures folder

* Remove unnecessary @ts-expect-error

* Change logic of get cypress element

* Make swipe tests retryable

Co-authored-by: Dmitriy Kovalenko <dmtr.kovalenko@outlook.com>

* Fix touch radius test

Co-authored-by: Kevin Fleischman <kevinrfleischman@gmail.com>
Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
Co-authored-by: Izhaki <roey@gefri.org>
Co-authored-by: Kevin Fleischman <kfleischman@squarespace.com>

* Revert "1.3.0 (#35)"

This reverts commit db00220.

* chore(readme): Add badge and fix typo

* Update cypress to v8

Co-authored-by: Kevin Fleischman <kevinrfleischman@gmail.com>
Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
Co-authored-by: Izhaki <roey@gefri.org>
Co-authored-by: Kevin Fleischman <kfleischman@squarespace.com>

* chore(deps): Support cypress v8

* fix: Enter doesn't fire trust click event (#132)

* fix: Enter doesn't fire trust click event

* Commit fixture

Co-authored-by: Kevin Fleischman <kevinrfleischman@gmail.com>
Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
Co-authored-by: Izhaki <roey@gefri.org>
Co-authored-by: Kevin Fleischman <kfleischman@squarespace.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants