Tests the manage fields page.
string $type: (optional) The name of a content type.
function manageFieldsPage($type = '') {
  $type = empty($type) ? $this->type : $type;
  $this
    ->drupalGet('admin/structure/types/manage/' . $type . '/fields');
  // Check all table columns.
  $table_headers = array(
    t('Label'),
    t('Machine name'),
    t('Field type'),
    t('Widget'),
    t('Operations'),
  );
  foreach ($table_headers as $table_header) {
    // We check that the label appear in the table headings.
    $this
      ->assertRaw($table_header . '</th>', format_string('%table_header table header was found.', array(
      '%table_header' => $table_header,
    )));
  }
  // "Add new field" and "Re-use existing field" aren't a table heading so just
  // test the text.
  foreach (array(
    'Add new field',
    'Re-use existing field',
  ) as $element) {
    $this
      ->assertText($element, format_string('"@element" was found.', array(
      '@element' => $element,
    )));
  }
}