Issue #3315490 by alexpott, Wim Leers: Random fail in Drupal\Tests\layout_builder\FunctionalJavascript\InlineBlockPrivateFilesTest
parent
830646e662
commit
7690a8e69e
|
@ -171,9 +171,9 @@ class InlineBlockPrivateFilesTest extends InlineBlockTestBase {
|
|||
$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);
|
||||
|
@ -269,6 +269,7 @@ class InlineBlockPrivateFilesTest extends InlineBlockTestBase {
|
|||
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()));
|
||||
|
|
Loading…
Reference in New Issue