protected function DataCollectorTableTest::assertNewCellIsEmpty in Charts 8.4
Same name and namespace in other branches
- 5.0.x tests/src/FunctionalJavascript/DataCollectorTableTest.php \Drupal\Tests\charts\FunctionalJavascript\DataCollectorTableTest::assertNewCellIsEmpty()
Assert new cell.
Parameters
string $on: The element.
1 call to DataCollectorTableTest::assertNewCellIsEmpty()
- DataCollectorTableTest::testDataCollectorTable in tests/
src/ FunctionalJavascript/ DataCollectorTableTest.php - Tests the data collector table.
File
- tests/
src/ FunctionalJavascript/ DataCollectorTableTest.php, line 185
Class
- DataCollectorTableTest
- Tests the data collector table element.
Namespace
Drupal\Tests\charts\FunctionalJavascriptCode
protected function assertNewCellIsEmpty($on) {
$page = $this
->getSession()
->getPage();
if ($on === 'row') {
$counter = DataCollectorTableTestForm::INITIAL_ROWS + 1;
$selector = static::TABLE_ROW_SELECTOR . ':nth-child(' . $counter . ') td:first-child input';
}
else {
$counter = DataCollectorTableTestForm::INITIAL_COLUMNS + 1;
$selector = static::TABLE_COLUMN_SELECTOR . ':nth-child(' . $counter . ') input';
}
$cell_input = $page
->find('css', $selector);
$this
->assertEmpty($cell_input
->getValue(), 'Added row cells are empty.');
}