diff -u b/core/modules/field/tests/src/FunctionalJavascript/FormJSAddMoreTest.php b/core/modules/field/tests/src/FunctionalJavascript/FormJSAddMoreTest.php --- b/core/modules/field/tests/src/FunctionalJavascript/FormJSAddMoreTest.php +++ b/core/modules/field/tests/src/FunctionalJavascript/FormJSAddMoreTest.php @@ -27,7 +27,7 @@ $account = $this->drupalCreateUser([ 'view test entity', - 'administer entity_test content' + 'administer entity_test content', ]); $this->drupalLogin($account); @@ -58,7 +58,7 @@ /** * Tests the 'Add more' functionality. */ - public function testFieldFormJSAddMore() { + public function testFieldFormJsAddMore() { $this->drupalGet('entity_test/add'); $assert_session = $this->assertSession(); @@ -110,7 +110,8 @@ // Validate the order of items conforms to the last drag action after a // updating the form via the server. $add_more_button->click(); - $assert_session->assertWaitOnAjaxRequest(); + $field_3 = $assert_session->waitForField('field_unlimited[3][value]'); + $this->assertNotEmpty($field_3); $this->assertGreaterThan($field_weight_2->getValue(), $field_weight_0->getValue()); $this->assertGreaterThan($field_weight_1->getValue(), $field_weight_2->getValue());