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

fix: updated performSwipe with w3c protocol #4154

Merged

Conversation

MykaLev
Copy link
Contributor

@MykaLev MykaLev commented Jan 24, 2024

Motivation/Description of the PR

Applicable helpers:

  • Appium

Type of change

  • 🐛 Bug fix

Checklist:

  • Lint checking (Run npm run lint)

@MykaLev MykaLev changed the title updated performSwipe with w3c protocol fix: updated performSwipe with w3c protocol Jan 25, 2024
kobenguyent and others added 6 commits January 25, 2024 13:52
Bumps [testcafe](https://github.com/DevExpress/testcafe) from 3.3.0 to 3.5.0.
- [Release notes](https://github.com/DevExpress/testcafe/releases)
- [Changelog](https://github.com/DevExpress/testcafe/blob/master/CHANGELOG.md)
- [Commits](DevExpress/testcafe@v3.3.0...v3.5.0)

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

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
}
/* eslint-enable */

/**
* Perform a swipe on the screen.
*
* ```js
* I.performSwipe({ x: 300, y: 100 }, { x: 200, y: 100 });
* I.performSwipe(elementId, { x: 300, y: 100 }, { x: 200, y: 100 });
Copy link
Collaborator

Choose a reason for hiding this comment

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

is it possible to performSwipe without passing the elementId?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Id: - is mandatory attribute of the w3c call. But can be used some random string inside the method instead of elementId parameter

Copy link
Collaborator

Choose a reason for hiding this comment

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

That'll be great if we could implement like that. Cause we actually perform swipe without knowing any element id.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed elementId but after merge after sync with main repo I got some extra files changes. Not sure why

@MykaLev
Copy link
Contributor Author

MykaLev commented Feb 2, 2024

Is there any blocker from merging this PR?

@kobenguyent kobenguyent merged commit 3b34ae6 into codeceptjs:3.x Feb 2, 2024
14 checks passed
kobenguyent added a commit that referenced this pull request Feb 2, 2024
@kobenguyent
Copy link
Collaborator

unfortunately, it broke our appium tests.
3b34ae6

@MykaLev
Copy link
Contributor Author

MykaLev commented Feb 5, 2024

Which tests were broken. And where can I find the report?

@kobenguyent
Copy link
Collaborator

Please check them here:

  1) Appium
       #makeTouchAction
         run simplified swipeDown @quick:

      AssertionError [ERR_ASSERTION]: 'LONG PRESS' == 'FLICK'
      + expected - actual

      -LONG PRESS
      +FLICK
      
      at Context.<anonymous> (test/helper/AppiumV2_test.js:324:14)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
1) Appium
       #makeTouchAction
         #performTouchAction
           should react on swipeUp action @second:
     Error: Element "//android.widget.TextView[@resource-id = 'io.selendroid.testapp:id/text_view4']" was not found by text|CSS|XPath
      at new ElementNotFound (lib/helper/errors/ElementNotFound.js:15:11)
      at assertElementExists (lib/helper/WebDriver.js:2889:11)
      at Appium.grabTextFrom (lib/helper/WebDriver.js:1261:5)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async Context.<anonymous> (test/helper/AppiumV2_test.js:[43](https://github.com/codeceptjs/CodeceptJS/actions/runs/7758085065/job/21159026729#step:5:44)5:20)

  2) Appium
       #makeTouchAction
         #performTouchAction
           should react on swipeDown action @second:
     Error: Element "//android.widget.TextView[@resource-id = 'io.selendroid.testapp:id/text_view4']" was not found by text|CSS|XPath
      at new ElementNotFound (lib/helper/errors/ElementNotFound.js:15:11)
      at assertElementExists (lib/helper/WebDriver.js:2889:11)
      at Appium.grabTextFrom (lib/helper/WebDriver.js:1261:5)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async Context.<anonymous> (test/helper/AppiumV2_test.js:[45](https://github.com/codeceptjs/CodeceptJS/actions/runs/7758085065/job/21159026729#step:5:46)0:20)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants