Skip to content
Snippets Groups Projects

Issue #3165435 by Rajab Natshah, thejimbirch: Fix tour <front> route as route...

Merged Issue #3165435 by Rajab Natshah, thejimbirch: Fix tour <front> route as route...
Merged Stephen Mustgrave requested to merge issue/tour-3165435:3165435-fix-tour-front into 2.0.x
Files
4
<?php
namespace Drupal\Tests\system\Functional;
use Drupal\Tests\tour\Functional\TourTestBase;
use Drupal\user\UserInterface;
/**
* Tests tour functionality.
*
* @group system
*/
class FrontPageTourTest extends TourTestBase {
/**
* An admin user with administrative permissions for views.
*
* @var \Drupal\user\UserInterface
*/
protected UserInterface $adminUser;
/**
* Modules to enable.
*
* @var array
*/
protected static $modules = [
'block',
'tour',
'system',
'node',
'tour_test',
];
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* {@inheritdoc}
*/
protected function setUp(): void {
parent::setUp();
$this->adminUser = $this->drupalCreateUser([
'administer themes',
'access tour',
]);
$this->drupalLogin($this->adminUser);
$this->drupalPlaceBlock('local_actions_block');
$this->drupalCreateContentType(['type' => 'page']);
$id = $this->drupalCreateNode(['promote' => 1])->id();
// Configure 'node' as front page.
$this->config('system.site')->set('page.front', '/node/' . $id)->save();
}
/**
* Test tips appear for frontpage.
*/
public function testFrontPageTour(): void {
$this->drupalGet('<front>');
$this->assertTourTips();
}
}
Loading