core/modules/block/tests/src/FunctionalJavascript/BlockAddTest.php | 5 ++--- .../contextual/tests/src/FunctionalJavascript/EditModeTest.php | 4 +++- .../views_ui/tests/src/FunctionalJavascript/ViewsWizardTest.php | 3 +-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/modules/block/tests/src/FunctionalJavascript/BlockAddTest.php b/core/modules/block/tests/src/FunctionalJavascript/BlockAddTest.php index 17e020d8cc..fa2674c4d5 100644 --- a/core/modules/block/tests/src/FunctionalJavascript/BlockAddTest.php +++ b/core/modules/block/tests/src/FunctionalJavascript/BlockAddTest.php @@ -38,12 +38,11 @@ public function testBlockAddThemeSelector() { $assert_session = $this->assertSession(); // Pick a theme with a region that does not exist in another theme. $assert_session->selectExists('Theme')->selectOption('claro'); - $assert_session->assertWaitOnAjaxRequest(); + $this->assertSame(1, $assert_session->assertWaitOnAjaxRequest()); $assert_session->selectExists('Region')->selectOption('pre_content'); - $assert_session->assertWaitOnAjaxRequest(); // Switch to a theme that doesn't contain the region selected above. $assert_session->selectExists('Theme')->selectOption('stark'); - $assert_session->assertWaitOnAjaxRequest(); + $this->assertSame(2, $assert_session->assertWaitOnAjaxRequest()); $assert_session->pageTextNotContains('An illegal choice has been detected. Please contact the site administrator.'); $assert_session->optionExists('Region', '- Select -'); } diff --git a/core/modules/contextual/tests/src/FunctionalJavascript/EditModeTest.php b/core/modules/contextual/tests/src/FunctionalJavascript/EditModeTest.php index 6cb1b68c38..e467a62915 100644 --- a/core/modules/contextual/tests/src/FunctionalJavascript/EditModeTest.php +++ b/core/modules/contextual/tests/src/FunctionalJavascript/EditModeTest.php @@ -62,7 +62,9 @@ public function testEditModeEnableDisable() { // After the page loaded we need to additionally wait until the settings // tray Ajax activity is done. - $web_assert->assertWaitOnAjaxRequest(); + if ($page_get_count === 0) { + $web_assert->assertWaitOnAjaxRequest(); + } if ($page_get_count == 0) { $unrestricted_tab_count = $this->getTabbableElementsCount(); diff --git a/core/modules/views_ui/tests/src/FunctionalJavascript/ViewsWizardTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/ViewsWizardTest.php index f21f306b53..0e813c9f37 100644 --- a/core/modules/views_ui/tests/src/FunctionalJavascript/ViewsWizardTest.php +++ b/core/modules/views_ui/tests/src/FunctionalJavascript/ViewsWizardTest.php @@ -73,8 +73,7 @@ public function testCreateViewWizard() { // Select the entity type to display and test that the type selector is // shown when expected. - $page->selectFieldOption('show[wizard_key]', 'node'); - $this->assertSession()->assertWaitOnAjaxRequest(); + $this->assertSame('node', $page->findField('show[wizard_key]')->getValue()); $this->assertNull($page->findField('show[type]'), 'The "of type" filter is not added for nodes when there are no node types.'); $this->assertEquals('teasers', $page->findField('page[style][row_plugin]')->getValue(), 'The page display format shows the expected default value.'); $this->assertEquals('titles_linked', $page->findField('block[style][row_plugin]')->getValue(), 'The block display format shows the expected default value.');