You are here

public function LogCRUDTest::testFieldsVisibility in Log entity 8

Fields are displayed correctly.

File

src/Tests/LogCRUDTest.php, line 16

Class

LogCRUDTest
Tests the Log CRUD.

Namespace

Drupal\log\Tests

Code

public function testFieldsVisibility() {
  $this
    ->drupalGet('log/add/default');
  $this
    ->assertResponse('200');
  $this
    ->assertFieldByName('name[0][value]', NULL, 'Name field is present');
  $this
    ->assertFieldByName('timestamp[0][value][date]', NULL, 'Timestamp date field is present');
  $this
    ->assertFieldByName('timestamp[0][value][time]', NULL, 'Timestamp time field is present');
  $this
    ->assertFieldByName('done[value]', NULL, 'Done field is present');
  $this
    ->assertFieldByName('revision', NULL, 'Revision field is present');
  $this
    ->assertFieldByName('user_id[0][target_id]', NULL, 'User ID field is present');
  $this
    ->assertFieldByName('created[0][value][time]', NULL, 'Created date field is present');
  $this
    ->assertFieldByName('created[0][value][time]', NULL, 'Created time field is present');
  $this
    ->assertFieldsByValue(t('Save'), NULL, 'Create button is present');
}