Skip to content

Commit

Permalink
ACMS-4079: Fix failing video embed test.
Browse files Browse the repository at this point in the history
  • Loading branch information
rajeshreeputra committed Oct 21, 2024
1 parent 20cfcc5 commit 3ec3952
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,21 @@ public function testEmbedMedia() {
if (AcquiaDrupalEnvironmentDetector::isAhIdeEnv()) {
$this->markTestSkipped('This cannot be run in a Cloud IDE right now');
}
$node_type = $this->drupalCreateContentType()->id();
$bundle = 'page';
$this->drupalCreateContentType([
'type' => 'page',
'name' => 'Page',
]);
user_role_grant_permissions('content_author', [
"create $node_type content",
"create $bundle content",
]);

$account = $this->drupalCreateUser();
$account->addRole('content_author');
$account->save();
$this->drupalLogin($account);

$this->drupalGet("/node/add/$node_type");
$this->drupalGet("/node/add/$bundle");
$this->openMediaLibrary();

// The media position number now starts from 1 (instead of 0) starting
Expand Down Expand Up @@ -216,6 +220,7 @@ protected function openMediaLibrary() {
if ($showMoreItems) {
$this->pressEditorButton('Show more items');
}
$assertSession->waitForText('body');
$this->pressEditorButton('Insert Media');
/** @var \Drupal\FunctionalJavascriptTests\JSWebAssert $assertSession */
$assertSession = $this->assertSession();
Expand Down

0 comments on commit 3ec3952

Please sign in to comment.