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

test: Update E2E utilities #55322

Merged
merged 10 commits into from
Oct 16, 2023
Merged

Commits on Oct 12, 2023

  1. test: Set static device pixel ratio

    WebdriverIO (the replacement for the deprecated WD driver library) does
    not have a method for retrieving a device's pixel ratio. Therefore, this
    sets an explicit value for each of our test devices.
    dcalhoun committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    4f1a4a2 View commit details
    Browse the repository at this point in the history
  2. test: Update the getAddBlockButton utility

    Update syntax for WebdriverIO, which is a part of the Appium 2 upgrade.
    dcalhoun committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    46d53b5 View commit details
    Browse the repository at this point in the history
  3. test: Update toggleDarkMode utility

    Seems this method has changed or been removed for Android.
    dcalhoun committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    1b83f12 View commit details
    Browse the repository at this point in the history
  4. test: Increase robustness of waitForKeyboardToBeHidden utility

    This utility appeared to fail occasionally due to an empty `addButton`
    value.
    dcalhoun committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    6d30ce6 View commit details
    Browse the repository at this point in the history
  5. test: toggleDarkMode uses consistent approach across platforms

    This updates the iOS variant to mirror the structure of the Android
    variant in the name of consistency.
    dcalhoun committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    e732502 View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2023

  1. refactor: Rename devicePixelRatio to pixelRatio

    Mirror Android implementation found in Appium 2.
    dcalhoun committed Oct 16, 2023
    Configuration menu
    Copy the full SHA
    5d684e2 View commit details
    Browse the repository at this point in the history
  2. test: Increase logging levels

    Attempt to debug CI failures.
    
    ```
    FAIL __device-tests__/gutenberg-editor-rendering-media-blocks.test.js (73.496 s)
      ● Gutenberg Editor Rendering Media Blocks test › should be able to render blocks correctly
    
        unknown method: Not implemented
    
          at getErrorFromResponseBody (file:/Users/runner/work/gutenberg/gutenberg/node_modules/webdriver/build/utils.js:194:12)
          at NodeJSRequest._request (file:/Users/runner/work/gutenberg/gutenberg/node_modules/webdriver/build/request/index.js:164:23)
          at Browser.wrapCommandFn (file:/Users/runner/work/gutenberg/gutenberg/node_modules/@wdio/utils/build/shim.js:81:29)
    ```
    dcalhoun committed Oct 16, 2023
    Configuration menu
    Copy the full SHA
    7bb46de View commit details
    Browse the repository at this point in the history
  3. refactor: Prefer action to touchAction

    Avoid the deprecated `touchAction` command.
    
    > The `touchAction` command is deprecated and will be removed in a future version. We recommend to use the action command instead with pointer type touch, e.g.:
    >
    > await browser.action('pointer', {
    >   parameters: { pointerType: 'touch' }
    > })
    
    https://webdriver.io/docs/api/element/touchAction/
    
    This may also relate to the fact that Mobile JSON Wire Protocol is
    deprecated as well.
    
    > Mobile JSON Wire Protocol
    >
    > The Mobile JSON Wire Protocol is a super set of mobile commands on top of the JSON Wire Protocol. Given this one is deprecated the Mobile JSON Wire Protocol also got deprecated. Appium might still support some of its commands but it is not recommended to use them.
    
    https://webdriver.io/docs/api/protocols#mobile-json-wire-protocol
    dcalhoun committed Oct 16, 2023
    Configuration menu
    Copy the full SHA
    bf527ee View commit details
    Browse the repository at this point in the history
  4. Revert "test: Increase logging levels"

    This reverts commit 7bb46de.
    dcalhoun committed Oct 16, 2023
    Configuration menu
    Copy the full SHA
    ad6e6c5 View commit details
    Browse the repository at this point in the history
  5. test: Set default swipeFromTo delay value

    This prevents `pause` from being called without a parameter, which
    throws an error.
    dcalhoun committed Oct 16, 2023
    Configuration menu
    Copy the full SHA
    8e7c4ff View commit details
    Browse the repository at this point in the history