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

unit tests - see if yes-sandbox solves fails in latest chrome/chromedriver #996

Closed
wants to merge 2 commits into from

Conversation

demeritcowboy
Copy link
Collaborator

Overview

A brief description of the pull request. Try to keep it non-technical.

Before

The current status. Please provide screenshots or gifs (LICEcap, SilentCast) where appropriate.

After

What has been changed. Please provide screenshots or gifs (LICEcap, SilentCast) where appropriate.

Technical Details

If the PR introduces noteworthy technical changes, please describe them here. Provide code snippets if necessary

Comments

Anything else you would like the reviewer to note

@demeritcowboy
Copy link
Collaborator Author

Nope, still failing in the same way.

@demeritcowboy demeritcowboy deleted the nosandbox branch September 2, 2024 03:20
@bsilvern
Copy link
Contributor

bsilvern commented Sep 6, 2024

@demeritcowboy Just wanted to give you a heads-up on a Chromedriver bug that was causing failures for me at ContactSubmissionTest.php --filter testSubmitWebform#2 on the website = 'https://example.com' assertion. I'm using Chromedriver 127.0.6533.88. Haven't tested other versions.

The issue in a nutshell is that if it's possible to scroll the window up (current scroll pos is not at the top), then when SendKeys sends a slash character, it is interpreted as a PageUp key. See my full description here.

My workaround has been to patch vendor/behat/mink/src/Session.php:

    public function resizeWindow($width, $height, $name = null)
    {
      //$this->driver->resizeWindow($width, $height, $name);
      // Avoid SendKeys slash bug: https://issuetracker.google.com/u/1/issues/42323689.
      // If not in headless mode, the dimensions below will be limited by actual screen resolution.
      $this->driver->resizeWindow(1600, 2000, $name); 
    }

By making the browser window larger, the page does not scroll down when the form is filled, and the slash is therefore interpreted correctly.

@demeritcowboy
Copy link
Collaborator Author

Thanks that might be helpful for some of the other fails that happen. This one was about trying to track down what had changed in chrome/chromedriver 128. It's the same issue as https://www.drupal.org/project/drupal/issues/3471113, and their temporary solution was to lock the version at 127, so we've done the same for now.

We could try such a patch and see if it cuts down on the other intermittent fails.

@bsilvern
Copy link
Contributor

bsilvern commented Sep 7, 2024

Good to know about v128!

  • When I run the webform_civicrm test suite without my patch I get only two errors, both in ContactSubmissionTest::testSubmitWebform (same error in data sets 2 and 4).

  • See the last item in this PR // Wait for ajax message... which resolves a failure I was getting in ContactRelationshipTest::testSubTypeRelationship.

  • Hack of the day: Inserting a return at the top of web/core/misc/drupal.js::Drupal.deprecationError() reduces the full webform_civicrm test execution time (single configuration) from 32 to 22 minutes on my machine!

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

Successfully merging this pull request may close these issues.

2 participants