Problem/Motivation
machineNameTransliterationTest.js intermittently fails to log out after installing the form_test module in its before() hook.
Observed again and again, last time in two consecutive Nightwatch runs:
- https://git.drupalcode.org/issue/drupal-2985168/-/jobs/14025579
- https://git.drupalcode.org/issue/drupal-2985168/-/jobs/14025695
Both runs failed with:
NoSuchElementError
An error occurred while running .submitForm() command on <#user-logout-confirm>
followed by:
Error
Logging out failed.
All test assertions however passed. The next run on the same commit succeeded.
Background
Unlike most other Nightwatch tests that install modules using drupalInstallModule(), machineNameTransliterationTest.js has its own module installation code that doesn't explicitly wait for the installation to complete before logging out.
This may be related to #3600807: [random test failure] Nightwatch command drupalInstallModule.js.
Steps to reproduce
Run the Nightwatch tests repeatedly. The failure is intermittent.
Proposed resolution
Replace custom module installation code by drupalInstallModule().
Remaining tasks
Review. Verify the proposed resolution through repeated test runs.
User interface changes
None.
Introduced terminology
None.
API changes
None.
Data model changes
None.
Release notes snippet
n/a
Issue fork drupal-3641919
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3641919-random-test-failure
changes, plain diff MR !17976
Comments
Comment #3
longwave#3413665: Enable modules through Nightwatch API when not testing module enabling should fix this and is already RTBC.
Comment #4
panchoIt does, yeah...