Skip to content

Commit

Permalink
Specced #37, testcase removal feature.
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelkiessling committed Feb 26, 2017
1 parent b069e99 commit 68d238b
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions php/tests/AppBundle/Functional/TestcasesFunctionalWebTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,4 +258,23 @@ public function testTestcaseEdit()
count($crawler->filter('table.testcases span.label-default:contains("*/15")'))
);
}

public function testTestcaseDeletionOnIndexPage()
{
$this->resetDatabase();
$client = $this->getClientThatRegisteredAndActivatedADemoUser();
$crawler = $client->request('GET', '/testcases/');

$this->assertSame('Demo User Testcase One', trim($crawler->filter('.testcase-entry-cell h4')->eq(0)->text()));

$buttonNode = $crawler->selectButton('Delete');
$form = $buttonNode->form();
$client->submit($form);

$crawler = $client->followRedirect();

$this->assertSame(1, count($crawler->filter('h4:contains("Your testcases")')));

$this->assertEmpty($crawler->filter('.testcase-entry-cell h4')->eq(0));
}
}

0 comments on commit 68d238b

Please sign in to comment.