3 namespace Drupal\Tests\views_ui\Functional;
5 use Drupal\views\Views;
8 * Tests the UI of views when using the table style.
11 * @see \Drupal\views\Plugin\views\style\Table.
13 class StyleTableTest extends UITestBase {
16 * Tests created a table style view.
18 public function testWizard() {
19 // Create a new view and check that the first field has a label.
21 $view['label'] = $this->randomMachineName(16);
22 $view['id'] = strtolower($this->randomMachineName(16));
23 $view['show[wizard_key]'] = 'node';
24 $view['page[create]'] = TRUE;
25 $view['page[style][style_plugin]'] = 'table';
26 $view['page[title]'] = $this->randomMachineName(16);
27 $view['page[path]'] = $view['id'];
28 $this->drupalPostForm('admin/structure/views/add', $view, t('Save and edit'));
30 $view = Views::getView($view['id']);
31 $view->initHandlers();
32 $this->assertEqual($view->field['title']->options['label'], 'Title', 'The field label for table styles is not empty.');