Problem/Motivation

ConditionalFieldTestBase::createCondition() submits the
Add dependency form, which redirects to the
ConditionalFieldEditForm. Callers then immediately submit
Save settings or navigate to the listing page without waiting for
the redirect to finish.

This causes random FunctionalJavascript failures in different tests, usually
because the Save settings button or the newly created condition
cannot be found. The failures reproduce on an unmodified checkout, so this is a
test-infrastructure race rather than a module bug.

Proposed resolution

Add
$this->assertSession()->waitForButton('Save settings'); to
createCondition() so callers only continue once the edit form is
ready. One change in the base class covers all callers.

Remaining tasks

Verify the affected FunctionalJavascript tests run consistently without
intermittent failures.

Command icon 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:

Comments

joelpittet created an issue. See original summary.

joelpittet’s picture

Status: Active » Fixed

All green (though chance could be that it would be anyways) merge train 🚂 left a moment ago

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.