Check if the fields are in the correct order.
$view_name: The name of the view.
$fields: Array of field names.
protected function assertFieldOrder($view_name, $fields) {
$this
->drupalGet('admin/structure/views/nojs/rearrange/' . $view_name . '/default/field');
foreach ($fields as $idx => $field) {
$this
->assertFieldById('edit-fields-' . $field . '-weight', $idx + 1);
}
}