Skip to content
Snippets Groups Projects
Commit 2831fc64 authored by catch's avatar catch
Browse files

Issue #3315490 by alexpott, Wim Leers: Random fail in...

Issue #3315490 by alexpott, Wim Leers: Random fail in Drupal\Tests\layout_builder\FunctionalJavascript\InlineBlockPrivateFilesTest

(cherry picked from commit 7690a8e6)
parent 09daf7c4
Branches
Tags
7 merge requests!4488Issue #3376281: Random machine names no longer need to be wrapped in strtolower(),!3000Issue #793660: Check for failure of hook_install,!2940Issue #3320240: Entity count query returns a string instead of int,!2937Issue #3315245: Order of languages overrides default language fallback,!1627Issue #3082958: Add gitignore(s) to composer-ready project templates,!1014Issue #3226806: Move filter implementations from filter.module to plugin classes,!939Issue #2971209: Allow the MediaLibraryUiBuilder service to use an alternative view display
......@@ -181,9 +181,9 @@ protected function replaceFileInBlock(FileInterface $file) {
$assert_session = $this->assertSession();
$page = $this->getSession()->getPage();
$this->clickContextualLink(static::INLINE_BLOCK_LOCATOR, 'Configure');
$assert_session->waitForElement('css', "#drupal-off-canvas input[value='Remove']");
$assert_session->assertWaitOnAjaxRequest();
$page->pressButton('Remove');
$assert_session->assertWaitOnAjaxRequest();
$page->find('css', '#drupal-off-canvas')->pressButton('Remove');
$this->attachFileToBlockForm($file);
$page->pressButton('Update');
$this->assertDialogClosedAndTextVisible($file->label(), static::INLINE_BLOCK_LOCATOR);
......@@ -279,6 +279,7 @@ protected function getFileSecret(FileInterface $file) {
protected function attachFileToBlockForm(FileInterface $file) {
$assert_session = $this->assertSession();
$page = $this->getSession()->getPage();
$this->assertSession()->waitForElementVisible('named', ['field', 'files[settings_block_form_field_file_0]']);
$page->attachFileToField("files[settings_block_form_field_file_0]", $this->fileSystem->realpath($file->getFileUri()));
$assert_session->assertWaitOnAjaxRequest();
$this->assertNotEmpty($assert_session->waitForLink($file->label()));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment