protected function UiPatternsLibraryOverviewTest::assertListLink in UI Patterns 8
Assert pattern overview list link.
Parameters
int $index: Position on list.
string $label: Pattern label.
string $name: Pattern machine name.
Throws
\Behat\Mink\Exception\ElementHtmlException
1 call to UiPatternsLibraryOverviewTest::assertListLink()
- UiPatternsLibraryOverviewTest::testOverviewPage in modules/
ui_patterns_library/ tests/ src/ FunctionalJavascript/ UiPatternsLibraryOverviewTest.php - Tests overview page.
File
- modules/
ui_patterns_library/ tests/ src/ FunctionalJavascript/ UiPatternsLibraryOverviewTest.php, line 202
Class
- UiPatternsLibraryOverviewTest
- Test patterns overview page.
Namespace
Drupal\Tests\ui_patterns_library\FunctionalJavascriptCode
protected function assertListLink($index, $label, $name) {
$this
->assertSession()
->elementContains('css', "ul > li:nth-child({$index}) > a", $label);
$this
->assertSession()
->elementAttributeContains('css', "ul > li:nth-child({$index}) > a", 'href', '#' . $name);
}