public function ElementTest::testSevenTheme in Select 2 8
Test loading of seven theme style.
File
- tests/
src/ FunctionalJavascript/ Form/ ElementTest.php, line 67
Class
- ElementTest
- Tests the select2 element.
Namespace
Drupal\Tests\select2\FunctionalJavascript\FormCode
public function testSevenTheme() {
$this->container
->get('theme_installer')
->install([
'seven',
]);
$this
->config('system.theme')
->set('default', 'seven')
->set('admin', 'seven')
->save();
$this
->drupalGet('/select2-optgroup-form');
$this
->assertSession()
->elementExists('css', '.select2-container--seven');
$select2_js = $this
->xpath("//script[contains(@src, 'select2/js/select2.js')]");
$this
->assertEquals(1, count($select2_js));
$select2_js = $this
->xpath("//script[contains(@src, 'select2/dist/js/select2.min.js')]");
$this
->assertEquals(1, count($select2_js));
}