Skip to content

Commit

Permalink
restore some test cases, move zone removal to common functions, added…
Browse files Browse the repository at this point in the history
… directory for regression tests
  • Loading branch information
Edmondas Girkantas committed Jun 27, 2011
1 parent 0275c46 commit 1159f13
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions tests/functional/UserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ protected function setUp() {
$this->setBrowserUrl(BROWSER_URL);
}

public function te2stLogin() {
public function testLogin() {
Common::doLogin();

$this->verifyTextPresent("Welcome Administrator");
}

public function te1stLogout() {
public function testLogout() {
Common::doLogin();

$this->click("link=Logout");
Expand Down
7 changes: 2 additions & 5 deletions tests/functional/ZoneTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,14 @@ protected function setUp() {

public function testAddMasterZone() {
Common::doLogin();

$this->clickAndWait("link=Add master zone");
$this->type('domain_1', 'poweradmin.com');
$this->clickAndWait("submit");
Common::doAddMasterZone('poweradmin.com');
$this->verifyTextPresent("poweradmin.com - Zone has been added successfully.");
}

public function testDeleteZone() {
Common::doLogin();

$this->open('/poweradmin/list_zones.php');
$this->open(SERVER_PATH.'list_zones.php');
$this->clickAndWait("css=img[alt=[ Delete zone poweradmin.com ]]");
$this->clickAndWait("css=input.button");
$this->verifyTextPresent("Zone has been deleted successfully.");
Expand Down
6 changes: 6 additions & 0 deletions tests/functional/common.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ public function doChangePassword($old, $new) {
$this->type('newpass2', $new);
$this->clickAndWait("submit");
}

public function doAddMasterZone($zone) {
$this->clickAndWait("link=Add master zone");
$this->type('domain_1', $zone);
$this->clickAndWait("submit");
}
}

?>

0 comments on commit 1159f13

Please sign in to comment.