From d8426149959f5c806419e8d8088f9ea40c3f007d Mon Sep 17 00:00:00 2001 From: Rajab Natshah <rajabn@gmail.com> Date: Sun, 29 Mar 2020 04:02:23 +0300 Subject: [PATCH] Issue #3120794: Fix Automated Functional Acceptance Testings --- tests/features/bootstrap/VarbaseContext.php | 3 +-- .../05-05-embed-existing-media-image-library.feature | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/features/bootstrap/VarbaseContext.php b/tests/features/bootstrap/VarbaseContext.php index dc209dde..7f7ad387 100644 --- a/tests/features/bootstrap/VarbaseContext.php +++ b/tests/features/bootstrap/VarbaseContext.php @@ -269,8 +269,7 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext * @Then /^the editor media browser should be open$/ */ public function theEitorMediaBrowserIsOpen() { - - if (!$this->getSession()->getPage()->find('css', '.ui-dialog.media-wrapper') + if (!$elem = $this->getSession()->getPage()->find('css', '.ui-dialog.media-wrapper') || !$this->getSession()->getPage()->find('css', '.ui-dialog.media-wrapper .media-browser-panes')) { throw new \Exception('The editor media browser failed to open.'); } diff --git a/tests/features/varbase/step2-apply-tests/05-content-management/05-05-embed-existing-media-image-library.feature b/tests/features/varbase/step2-apply-tests/05-content-management/05-05-embed-existing-media-image-library.feature index 8f9d25a4..5d3e58fd 100644 --- a/tests/features/varbase/step2-apply-tests/05-content-management/05-05-embed-existing-media-image-library.feature +++ b/tests/features/varbase/step2-apply-tests/05-content-management/05-05-embed-existing-media-image-library.feature @@ -47,10 +47,13 @@ So that it will show up under that rich text field without having to upload the Then I should see "Test Basic page to embed existing files" When I click "Edit" in the "Test Basic page to embed existing files" row And I wait + And I wait for 5 seconds Then I should see "Edit Basic page Test Basic page to embed existing files" When I move focus to "Body" rich text editor field And I click the editor media browser command button + And I wait And I wait for AJAX to finish + And I wait And I wait for 5 seconds Then the editor media browser should be open When I switch to iframe "entity_browser_iframe_editor_media_browser" -- GitLab