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 x & y options for mouseDown and moustUp events #486

Merged

Conversation

adamistheanswer
Copy link
Contributor

Add X & Y coordinates to mouseDown options

For testing a three.js canvas drag and drop I've needed the ability to pass relative X & Y coordinates to mouse down.

Looking through the issues on the repo this was raised and contributions were requested october last year

#316

I've extended the options for mouse down to take X & Y coordinates and followed the same API as with the other commands

Add X & Y coordinates to mouseDown
@what-the-diff
Copy link

what-the-diff bot commented May 31, 2023

PR Summary

  • Enhanced realMouseDown function with x and y options
    Added options to specify x and y coordinates for the realMouseDown function, allowing further control.

  • Improved getCypressElementCoordinates function with position argument
    Updated the function to accept a position argument instead of using default values, enabling more flexibility in element positioning.

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.

Please do the same for mouseUp as well.

src/commands/mouseDown.ts Outdated Show resolved Hide resolved
@dmtrKovalenko dmtrKovalenko changed the title Mouse Down X & Y Coordinates feat: x & y options for mouseDown and moustUp events Jul 17, 2023
@dmtrKovalenko dmtrKovalenko self-requested a review July 17, 2023 17:42
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.

Done everything requested myself

@dmtrKovalenko dmtrKovalenko changed the title feat: x & y options for mouseDown and moustUp events feat: add x & y options for mouseDown and moustUp events Jul 17, 2023
@dmtrKovalenko dmtrKovalenko merged commit 1b65608 into dmtrKovalenko:develop Jul 17, 2023
dmtrKovalenko added a commit that referenced this pull request Jul 17, 2023
* Update mouseDown.ts

Add X & Y coordinates to mouseDown

* Update src/commands/mouseDown.ts

* Update mouseUp as well

---------

Co-authored-by: Dmitriy Kovalenko <dmtr.kovalenko@outlook.com>
@dmtrKovalenko
Copy link
Owner

🎉 This PR is included in version 1.10.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

dmtrKovalenko added a commit that referenced this pull request Sep 10, 2023
* chore(deps-dev): bump cypress from 12.1.0 to 12.13.0 (#483)

Bumps [cypress](https://github.com/cypress-io/cypress) from 12.1.0 to 12.13.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md)
- [Commits](cypress-io/cypress@v12.1.0...v12.13.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-dev): bump typedoc from 0.23.22 to 0.24.8 (#489)

* chore(deps-dev): bump eslint from 8.29.0 to 8.42.0 (#488)

* chore(deps-dev): bump @typescript-eslint/parser from 5.46.1 to 5.59.8 (#485)

* chore(deps-dev): bump typescript from 4.9.4 to 5.1.3 (#493)

* chore(deps-dev): bump typedoc-plugin-markdown from 3.14.0 to 3.15.3 (#492)

* chore(deps-dev): bump @typescript-eslint/parser from 5.59.8 to 5.59.9 (#491)

* chore(deps-dev): bump cypress from 12.13.0 to 12.14.0 (#494)

* chore(ci): Update browsers (#519)

* Update browsers

* Config validate

* Skip install

* Use js config

* Add checkout

* Make cypress config cjs

* Fix config

* Fix executor

* Cache binary

* Cache binary

* Cache binary

* Copy binary

* Fix executor

* Fix executor

* Fix executor

* cp instead of mv

* cp instead of mv

* --chrome browser

* install browsers inside job

* install browsers inside job

* feat: Add shiftKey modifier to keyboard events  (#514)

* add shiftKey option to some events

* add test cases

* revert unrelated formatting changes

* add shiftKey option for mouseUp event

* one more formatting revert

---------

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

* feat: add x & y options for mouseDown and moustUp events (#486)

* Update mouseDown.ts

Add X & Y coordinates to mouseDown

* Update src/commands/mouseDown.ts

* Update mouseUp as well

---------

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

* chore(style): Format whole codebase with prettier and enforce it on CI (#520)

* v1.8.2

* v1.9.1

* fix: Remove prettier dependency (#532)

* fix(realType): add an escape sequence for a left brace (#547)

* fix: add an escape sequence for a left brace

* chore: add an e2e test

* chore(deps-dev): bump cypress from 12.14.0 to 13.1.0

Bumps [cypress](https://github.com/cypress-io/cypress) from 12.14.0 to 13.1.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md)
- [Commits](cypress-io/cypress@v12.14.0...v13.1.0)

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

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

* Bump circleci orb version

* fix typo

* Skip failing test

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Dmitriy Kovalenko <dmtr.kovalenko@outlook.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ilfat Mindubaev <yagarantuz@gmail.com>
Co-authored-by: Adam Robinson <30032798+adamistheanswer@users.noreply.github.com>
Co-authored-by: Josh Wooding <12938082+joshwooding@users.noreply.github.com>
Co-authored-by: Lev Chelyadinov <leva181777@gmail.com>
dmtrKovalenko added a commit that referenced this pull request Sep 10, 2023
* chore(deps-dev): bump cypress from 12.1.0 to 12.13.0 (#483)

Bumps [cypress](https://github.com/cypress-io/cypress) from 12.1.0 to 12.13.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md)
- [Commits](cypress-io/cypress@v12.1.0...v12.13.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-dev): bump typedoc from 0.23.22 to 0.24.8 (#489)

* chore(deps-dev): bump eslint from 8.29.0 to 8.42.0 (#488)

* chore(deps-dev): bump @typescript-eslint/parser from 5.46.1 to 5.59.8 (#485)

* chore(deps-dev): bump typescript from 4.9.4 to 5.1.3 (#493)

* chore(deps-dev): bump typedoc-plugin-markdown from 3.14.0 to 3.15.3 (#492)

* chore(deps-dev): bump @typescript-eslint/parser from 5.59.8 to 5.59.9 (#491)

* chore(deps-dev): bump cypress from 12.13.0 to 12.14.0 (#494)

* chore(ci): Update browsers (#519)

* Update browsers

* Config validate

* Skip install

* Use js config

* Add checkout

* Make cypress config cjs

* Fix config

* Fix executor

* Cache binary

* Cache binary

* Cache binary

* Copy binary

* Fix executor

* Fix executor

* Fix executor

* cp instead of mv

* cp instead of mv

* --chrome browser

* install browsers inside job

* install browsers inside job

* feat: Add shiftKey modifier to keyboard events  (#514)

* add shiftKey option to some events

* add test cases

* revert unrelated formatting changes

* add shiftKey option for mouseUp event

* one more formatting revert

---------

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

* feat: add x & y options for mouseDown and moustUp events (#486)

* Update mouseDown.ts

Add X & Y coordinates to mouseDown

* Update src/commands/mouseDown.ts

* Update mouseUp as well

---------

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

* chore(style): Format whole codebase with prettier and enforce it on CI (#520)

* v1.8.2

* v1.9.1

* fix: Remove prettier dependency (#532)

* fix(realType): add an escape sequence for a left brace (#547)

* fix: add an escape sequence for a left brace

* chore: add an e2e test

* chore(deps-dev): bump cypress from 12.14.0 to 13.1.0

Bumps [cypress](https://github.com/cypress-io/cypress) from 12.14.0 to 13.1.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md)
- [Commits](cypress-io/cypress@v12.14.0...v13.1.0)

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

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

* Bump circleci orb version

* fix typo

* Skip failing test

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Dmitriy Kovalenko <dmtr.kovalenko@outlook.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ilfat Mindubaev <yagarantuz@gmail.com>
Co-authored-by: Adam Robinson <30032798+adamistheanswer@users.noreply.github.com>
Co-authored-by: Josh Wooding <12938082+joshwooding@users.noreply.github.com>
Co-authored-by: Lev Chelyadinov <leva181777@gmail.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