Commit 09a8340d authored by tim.plunkett's avatar tim.plunkett

Issue #1787404 by tim.plunkett: Actually assert a valid response in the Wizard.

parent 2020f330
......@@ -35,6 +35,7 @@ function testViewsWizardAndListing() {
$view1['description'] = $this->randomName(16);
$view1['page[create]'] = FALSE;
$this->drupalPost('admin/structure/views/add', $view1, t('Save & exit'));
$this->assertResponse(200);
$this->assertText(t('Your view was saved. You may edit it from the list below.'));
$this->assertText($view1['human_name']);
$this->assertText($view1['description']);
......@@ -62,6 +63,7 @@ function testViewsWizardAndListing() {
$view2['page[feed]'] = 1;
$view2['page[feed_properties][path]'] = $this->randomName(16);
$this->drupalPost('admin/structure/views/add', $view2, t('Save & exit'));
$this->assertResponse(200);
// Since the view has a page, we expect to be automatically redirected to
// it.
......@@ -104,6 +106,7 @@ function testViewsWizardAndListing() {
$view3['block[create]'] = 1;
$view3['block[title]'] = $this->randomName(16);
$this->drupalPost('admin/structure/views/add', $view3, t('Save & exit'));
$this->assertResponse(200);
// Make sure the view only displays the node we expect.
$this->assertUrl($view3['page[path]']);
......
......@@ -54,6 +54,7 @@ function testItemsPerPage() {
$view['block[title]'] = $this->randomName(16);
$view['block[items_per_page]'] = 3;
$this->drupalPost('admin/structure/views/add', $view, t('Save & exit'));
$this->assertResponse(200);
// Make sure the page display shows the nodes we expect, and that they
// appear in the expected order.
......
......@@ -36,10 +36,12 @@ function testMenus() {
$view['page[link_properties][menu_name]'] = 'main-menu';
$view['page[link_properties][title]'] = $this->randomName(16);
$this->drupalPost('admin/structure/views/add', $view, t('Save & exit'));
$this->assertResponse(200);
// Make sure there is a link to the view from the front page (where we
// expect the main menu to display).
$this->drupalGet('');
$this->assertResponse(200);
$this->assertLink($view['page[link_properties][title]']);
$this->assertLinkByHref(url($view['page[path]']));
......
......@@ -40,6 +40,7 @@ function testSorting() {
$view1['page[title]'] = $this->randomName(16);
$view1['page[path]'] = $this->randomName(16);
$this->drupalPost('admin/structure/views/add', $view1, t('Save & exit'));
$this->assertResponse(200);
// Make sure the view shows the nodes in the expected order.
$this->assertUrl($view1['page[path]']);
......@@ -63,6 +64,7 @@ function testSorting() {
$view2['page[title]'] = $this->randomName(16);
$view2['page[path]'] = $this->randomName(16);
$this->drupalPost('admin/structure/views/add', $view2, t('Save & exit'));
$this->assertResponse(200);
// Make sure the view shows the nodes in the expected order.
$this->assertUrl($view2['page[path]']);
......
......@@ -129,6 +129,7 @@ function testTaggedWith() {
$view1['page[title]'] = $this->randomName(16);
$view1['page[path]'] = $this->randomName(16);
$this->drupalPost(NULL, $view1, t('Save & exit'));
$this->assertResponse(200);
// Visit the page and check that the nodes we expect are present and the
// ones we don't expect are absent.
$this->drupalGet($view1['page[path]']);
......@@ -141,6 +142,7 @@ function testTaggedWith() {
$view2 = array();
$view2['show[type]'] = $this->node_type_with_tags->type;
$this->drupalPost('admin/structure/views/add', $view2, t('Update "of type" choice'));
$this->assertResponse(200);
$view2['human_name'] = $this->randomName(16);
$view2['name'] = strtolower($this->randomName(16));
$view2['description'] = $this->randomName(16);
......@@ -149,6 +151,7 @@ function testTaggedWith() {
$view2['page[title]'] = $this->randomName(16);
$view2['page[path]'] = $this->randomName(16);
$this->drupalPost(NULL, $view2, t('Save & exit'));
$this->assertResponse(200);
$this->drupalGet($view2['page[path]']);
$this->assertNoText($node_tag1_title);
$this->assertText($node_tag1_tag2_title);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment