VarbaseBootstrapParagraphsTests.php in Varbase Bootstrap Paragraphs 9.0.x
File
tests/src/Functional/VarbaseBootstrapParagraphsTests.php
View source
<?php
namespace Drupal\Tests\varbase_bootstrap_paragraphs\Functional;
use Drupal\Tests\BrowserTestBase;
use Drupal\Core\StringTranslation\StringTranslationTrait;
class VarbaseBootstrapParagraphsTests extends BrowserTestBase {
use StringTranslationTrait;
protected $profile = 'standard';
protected $defaultTheme = 'vartheme_bs4';
protected static $modules = [
'varbase_core',
'varbase_media',
'varbase_editor',
'varbase_admin',
'varbase_seo',
'varbase_workflow',
'varbase_bootstrap_paragraphs',
];
protected function setUp() {
parent::setUp();
$this->container
->get('theme_installer')
->install([
'claro',
]);
$this
->config('system.theme')
->set('admin', 'claro')
->save();
}
public function testCheckVarbaseBootstrapParagraphsCheckParagraphTypesPage() {
$this
->drupalLogin($this->rootUser);
$this
->drupalGet('admin/structure/paragraphs_type');
$this
->assertSession()
->pageTextContains($this
->t('Paragraphs types'));
$this
->assertSession()
->pageTextContains($this
->t('Accordion'));
$this
->assertSession()
->pageTextContains($this
->t('Accordion Section'));
$this
->assertSession()
->pageTextContains($this
->t('Carousel'));
$this
->assertSession()
->pageTextContains($this
->t('Columns (Equal)'));
$this
->assertSession()
->pageTextContains($this
->t('Columns (Three Uneven)'));
$this
->assertSession()
->pageTextContains($this
->t('Columns (Two Uneven)'));
$this
->assertSession()
->pageTextContains($this
->t('Column Wrapper'));
$this
->assertSession()
->pageTextContains($this
->t('Drupal Block'));
$this
->assertSession()
->pageTextContains($this
->t('Image'));
$this
->assertSession()
->pageTextContains($this
->t('Modal'));
$this
->assertSession()
->pageTextContains($this
->t('Rich Text'));
$this
->assertSession()
->pageTextContains($this
->t('Tabs'));
$this
->assertSession()
->pageTextContains($this
->t('Tab Section'));
$this
->assertSession()
->pageTextContains($this
->t('View'));
$this
->assertSession()
->pageTextContains($this
->t('Webform'));
}
public function testCheckVarbaseBootstrapParagraphsSettings() {
$this
->drupalLogin($this->rootUser);
$this
->drupalGet('/admin/config/varbase/varbase-bootstrap-paragraphs');
$this
->assertSession()
->pageTextContains($this
->t('Varbase Bootstrap Paragraphs settings'));
$this
->assertSession()
->pageTextContains($this
->t('Available CSS styles (classes) for Varbase Bootstrap Paragraphs'));
}
}