You are here

public function UiPatternsLibraryOverviewTest::testLocalLibraries in UI Patterns 8

Test that libraries defined locally are loaded correctly.

File

modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php, line 85

Class

UiPatternsLibraryOverviewTest
Test patterns overview page.

Namespace

Drupal\Tests\ui_patterns_library\FunctionalJavascript

Code

public function testLocalLibraries() {
  $session = $this
    ->assertSession();
  $this
    ->drupalGet('/patterns/with_local_libraries');
  $session
    ->responseContains('href="/modules/custom/ui_patterns/modules/ui_patterns_library/tests/modules/ui_patterns_library_module_test/templates/with_local_libraries/css/library_one.css');
  $session
    ->responseContains('href="/modules/custom/ui_patterns/modules/ui_patterns_library/tests/modules/ui_patterns_library_module_test/templates/with_local_libraries/css/library_two.css');
  $session
    ->responseContains('src="/modules/custom/ui_patterns/modules/ui_patterns_library/tests/modules/ui_patterns_library_module_test/templates/with_local_libraries/js/library_two_1.js');
  $session
    ->responseContains('src="/modules/custom/ui_patterns/modules/ui_patterns_library/tests/modules/ui_patterns_library_module_test/templates/with_local_libraries/js/library_two_2.js');
  $session
    ->responseContains('src="/core/misc/tabledrag.js');
}