Skip to content

Commit

Permalink
OEL-1543: Simplify the check that block wrapper is gone.
Browse files Browse the repository at this point in the history
  • Loading branch information
donquixote committed May 16, 2022
1 parent db10335 commit 430255a
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,10 @@ public function testBlockRendering(): void {
$render = $this->container->get('renderer')->renderRoot($build);
$crawler = new Crawler($render->__toString());

// Assert the form rendering.
$form = $crawler->filter('#oe-whitelabel-search-form');
// The template removes block wrappers for this block.
$this->assertSame('body', $form->parents()->getNode(0)->tagName);
// Select the search form in the block.
// The block template removes the block wrapper, so the form is the root
// element.
$form = $crawler->filter('body > form#oe-whitelabel-search-form');
$this->assertCount(1, $form);
$this->assertSame('d-flex mt-3 mt-lg-0', $form->attr('class'));
// Assert the field wrapper rendering.
Expand Down

0 comments on commit 430255a

Please sign in to comment.