Test Failed
Pull Request — master (#450)
by Kiran
19:15
created
tests/selenium/stest-16_Add_New_Price.php 2 patches
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -1,41 +1,41 @@
 block discarded – undo
1 1
 <?php
2 2
 class AddNewPrice extends GD_Test
3 3
 {
4
-    public function setUp()
5
-    {
6
-        parent::setUp();
4
+	public function setUp()
5
+	{
6
+		parent::setUp();
7 7
 
8
-        //skip test if already completed.
9
-        if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
10
-            $this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......');
11
-            return;
12
-        } else {
13
-            $this->prepareSession()->currentWindow()->maximize();
14
-        }
15
-    }
8
+		//skip test if already completed.
9
+		if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
10
+			$this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......');
11
+			return;
12
+		} else {
13
+			$this->prepareSession()->currentWindow()->maximize();
14
+		}
15
+	}
16 16
 
17
-    public function testAddNewPrice()
18
-    {
19
-        $this->logInfo('Add a new price......');
20
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=paymentmanager_fields&subtab=geodir_payment_manager&gd_pagetype=addeditprice');
21
-        $this->waitForPageLoadAndCheckForErrors();
22
-        $this->assertTrue( $this->isTextPresent("Add Price"), "Add Price text not found");
23
-        $this->byId('title')->value('Premium Plus');
24
-        $this->byId('days')->value('0');
25
-        $this->byName('gd_amount')->value('5');
26
-        $this->select($this->byName('gd_status'))->selectOptionByValue(1);
27
-        $this->byName('submit')->click();
28
-        $this->waitForPageLoadAndCheckForErrors();
29
-    }
17
+	public function testAddNewPrice()
18
+	{
19
+		$this->logInfo('Add a new price......');
20
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=paymentmanager_fields&subtab=geodir_payment_manager&gd_pagetype=addeditprice');
21
+		$this->waitForPageLoadAndCheckForErrors();
22
+		$this->assertTrue( $this->isTextPresent("Add Price"), "Add Price text not found");
23
+		$this->byId('title')->value('Premium Plus');
24
+		$this->byId('days')->value('0');
25
+		$this->byName('gd_amount')->value('5');
26
+		$this->select($this->byName('gd_status'))->selectOptionByValue(1);
27
+		$this->byName('submit')->click();
28
+		$this->waitForPageLoadAndCheckForErrors();
29
+	}
30 30
 
31
-    public function tearDown()
32
-    {
33
-        if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
34
-            //write current file number to completed.txt
35
-            $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
36
-            $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
37
-            fwrite($completed, $CurrentFileNumber);
38
-        }
39
-    }
31
+	public function tearDown()
32
+	{
33
+		if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
34
+			//write current file number to completed.txt
35
+			$CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
36
+			$completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
37
+			fwrite($completed, $CurrentFileNumber);
38
+		}
39
+	}
40 40
 }
41 41
 ?>
42 42
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
         $this->logInfo('Add a new price......');
20 20
         $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=paymentmanager_fields&subtab=geodir_payment_manager&gd_pagetype=addeditprice');
21 21
         $this->waitForPageLoadAndCheckForErrors();
22
-        $this->assertTrue( $this->isTextPresent("Add Price"), "Add Price text not found");
22
+        $this->assertTrue($this->isTextPresent("Add Price"), "Add Price text not found");
23 23
         $this->byId('title')->value('Premium Plus');
24 24
         $this->byId('days')->value('0');
25 25
         $this->byName('gd_amount')->value('5');
Please login to merge, or discard this patch.
tests/selenium/stest-25_Author_Page.php 2 patches
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -1,38 +1,38 @@
 block discarded – undo
1 1
 <?php
2 2
 class AuthorPage extends GD_Test
3 3
 {
4
-    public function setUp()
5
-    {
6
-        parent::setUp();
4
+	public function setUp()
5
+	{
6
+		parent::setUp();
7 7
 
8
-        //skip test if already completed.
9
-        if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
10
-            $this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......');
11
-            return;
12
-        } else {
13
-            $this->prepareSession()->currentWindow()->maximize();
14
-        }
15
-    }
8
+		//skip test if already completed.
9
+		if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
10
+			$this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......');
11
+			return;
12
+		} else {
13
+			$this->prepareSession()->currentWindow()->maximize();
14
+		}
15
+	}
16 16
 
17
-    public function testAuthorPage()
18
-    {
19
-        //test loggedin
20
-        $this->logInfo('Testing author page......');
21
-        $this->url(self::GDTEST_BASE_URL.'author/admin/?geodir_dashbord=true&stype=gd_place');
22
-        $this->waitForPageLoadAndCheckForErrors();
23
-        $this->assertTrue( $this->isTextPresent("Places by"), "Not in Author page");
17
+	public function testAuthorPage()
18
+	{
19
+		//test loggedin
20
+		$this->logInfo('Testing author page......');
21
+		$this->url(self::GDTEST_BASE_URL.'author/admin/?geodir_dashbord=true&stype=gd_place');
22
+		$this->waitForPageLoadAndCheckForErrors();
23
+		$this->assertTrue( $this->isTextPresent("Places by"), "Not in Author page");
24 24
 
25
-        //Todo: test when not logged in
26
-    }
25
+		//Todo: test when not logged in
26
+	}
27 27
 
28
-    public function tearDown()
29
-    {
30
-        if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
31
-            //write current file number to completed.txt
32
-            $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
33
-            $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
34
-            fwrite($completed, $CurrentFileNumber);
35
-        }
36
-    }
28
+	public function tearDown()
29
+	{
30
+		if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
31
+			//write current file number to completed.txt
32
+			$CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
33
+			$completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
34
+			fwrite($completed, $CurrentFileNumber);
35
+		}
36
+	}
37 37
 }
38 38
 ?>
39 39
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
         $this->logInfo('Testing author page......');
21 21
         $this->url(self::GDTEST_BASE_URL.'author/admin/?geodir_dashbord=true&stype=gd_place');
22 22
         $this->waitForPageLoadAndCheckForErrors();
23
-        $this->assertTrue( $this->isTextPresent("Places by"), "Not in Author page");
23
+        $this->assertTrue($this->isTextPresent("Places by"), "Not in Author page");
24 24
 
25 25
         //Todo: test when not logged in
26 26
     }
Please login to merge, or discard this patch.
tests/selenium/stest-37_Marker_Cluster.php 2 patches
Indentation   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -1,57 +1,57 @@
 block discarded – undo
1 1
 <?php
2 2
 class MarkerCluster extends GD_Test
3 3
 {
4
-    public function setUp()
5
-    {
6
-        parent::setUp();
7
-
8
-        //skip test if already completed.
9
-        if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
10
-            $this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......');
11
-            return;
12
-        } else {
13
-            $this->prepareSession()->currentWindow()->maximize();
14
-        }
15
-    }
16
-
17
-    public function testMarkerCluster()
18
-    {
19
-        $this->logInfo('Testing marker cluster......');
20
-        //make sure marker cluster plugin active
21
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
22
-        $this->waitForPageLoadAndCheckForErrors();
23
-
24
-        $is_active = $this->byId("geodirectory-marker-cluster")->attribute('class');
25
-        if (is_int(strpos($is_active, 'inactive'))) {
26
-            //Activate Geodirectory Marker Cluster
27
-            $this->maybeActivatePlugin("geodirectory-marker-cluster", 20000);
28
-            //go back to plugin page
29
-            $this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
30
-        }
31
-
32
-        $is_active1 = $this->byId("geodirectory-marker-cluster")->attribute('class');
33
-        $this->assertFalse( strpos($is_active1, 'inactive'), "Marker Cluster plugin not active");
34
-
35
-
36
-        //make sure marker cluster enabled in home map
37
-        $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=design_settings&active_tab=geodir_marker_cluster_settings');
38
-        $this->byName('save')->click();
39
-        $this->waitForPageLoadAndCheckForErrors();
40
-
41
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'location/');
42
-        if (!$this->isElementExists('//div[text()=2]', 'xpath')) {
43
-            $this->logError('Marker cluster not found in home page.');
44
-        }
45
-    }
46
-
47
-    public function tearDown()
48
-    {
49
-        if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
50
-            //write current file number to completed.txt
51
-            $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
52
-            $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
53
-            fwrite($completed, $CurrentFileNumber);
54
-        }
55
-    }
4
+	public function setUp()
5
+	{
6
+		parent::setUp();
7
+
8
+		//skip test if already completed.
9
+		if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
10
+			$this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......');
11
+			return;
12
+		} else {
13
+			$this->prepareSession()->currentWindow()->maximize();
14
+		}
15
+	}
16
+
17
+	public function testMarkerCluster()
18
+	{
19
+		$this->logInfo('Testing marker cluster......');
20
+		//make sure marker cluster plugin active
21
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
22
+		$this->waitForPageLoadAndCheckForErrors();
23
+
24
+		$is_active = $this->byId("geodirectory-marker-cluster")->attribute('class');
25
+		if (is_int(strpos($is_active, 'inactive'))) {
26
+			//Activate Geodirectory Marker Cluster
27
+			$this->maybeActivatePlugin("geodirectory-marker-cluster", 20000);
28
+			//go back to plugin page
29
+			$this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
30
+		}
31
+
32
+		$is_active1 = $this->byId("geodirectory-marker-cluster")->attribute('class');
33
+		$this->assertFalse( strpos($is_active1, 'inactive'), "Marker Cluster plugin not active");
34
+
35
+
36
+		//make sure marker cluster enabled in home map
37
+		$this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=design_settings&active_tab=geodir_marker_cluster_settings');
38
+		$this->byName('save')->click();
39
+		$this->waitForPageLoadAndCheckForErrors();
40
+
41
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'location/');
42
+		if (!$this->isElementExists('//div[text()=2]', 'xpath')) {
43
+			$this->logError('Marker cluster not found in home page.');
44
+		}
45
+	}
46
+
47
+	public function tearDown()
48
+	{
49
+		if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
50
+			//write current file number to completed.txt
51
+			$CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
52
+			$completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
53
+			fwrite($completed, $CurrentFileNumber);
54
+		}
55
+	}
56 56
 }
57 57
 ?>
58 58
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
         }
31 31
 
32 32
         $is_active1 = $this->byId("geodirectory-marker-cluster")->attribute('class');
33
-        $this->assertFalse( strpos($is_active1, 'inactive'), "Marker Cluster plugin not active");
33
+        $this->assertFalse(strpos($is_active1, 'inactive'), "Marker Cluster plugin not active");
34 34
 
35 35
 
36 36
         //make sure marker cluster enabled in home map
Please login to merge, or discard this patch.
tests/selenium/stest-01_Register.php 2 patches
Indentation   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -1,66 +1,66 @@
 block discarded – undo
1 1
 <?php
2 2
 class Register extends GD_Test
3 3
 {
4
-    public function setUp()
5
-    {
6
-        parent::setUp();
4
+	public function setUp()
5
+	{
6
+		parent::setUp();
7 7
 
8
-        //skip test if already completed.
9
-        if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
10
-            $this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......');
11
-            return;
12
-        } else {
13
-            $this->prepareSession()->currentWindow()->maximize();
14
-        }
15
-    }
8
+		//skip test if already completed.
9
+		if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
10
+			$this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......');
11
+			return;
12
+		} else {
13
+			$this->prepareSession()->currentWindow()->maximize();
14
+		}
15
+	}
16 16
 
17
-    public function testRegister()
18
-    {
19
-        $this->logInfo('Registering new user......');
20
-        $this->url(self::GDTEST_BASE_URL.'gd-login/?signup=1');
21
-        $this->waitForPageLoadAndCheckForErrors();
17
+	public function testRegister()
18
+	{
19
+		$this->logInfo('Registering new user......');
20
+		$this->url(self::GDTEST_BASE_URL.'gd-login/?signup=1');
21
+		$this->waitForPageLoadAndCheckForErrors();
22 22
 //        echo $this->source();
23
-        $this->assertTrue( $this->isTextPresent("Sign Up Now"), "'Sign Up Now' text found");
24
-        $this->byId('user_email')->value('[email protected]');
25
-        $this->byId('user_fname')->value('Test User');
26
-        // Submit the form
27
-        $this->byId('cus_registerform')->submit();
28
-        $this->waitForPageLoadAndCheckForErrors();
29
-        $this->assertFalse( $this->isTextPresent("New user registration disabled."), "New user registration disabled.");
30
-        $this->assertFalse( $this->isTextPresent("This email is already registered."), "This email is already registered.");
31
-        $this->assertTrue( $this->isTextPresent("Add Listing"), "Add Listing text not found");
23
+		$this->assertTrue( $this->isTextPresent("Sign Up Now"), "'Sign Up Now' text found");
24
+		$this->byId('user_email')->value('[email protected]');
25
+		$this->byId('user_fname')->value('Test User');
26
+		// Submit the form
27
+		$this->byId('cus_registerform')->submit();
28
+		$this->waitForPageLoadAndCheckForErrors();
29
+		$this->assertFalse( $this->isTextPresent("New user registration disabled."), "New user registration disabled.");
30
+		$this->assertFalse( $this->isTextPresent("This email is already registered."), "This email is already registered.");
31
+		$this->assertTrue( $this->isTextPresent("Add Listing"), "Add Listing text not found");
32 32
 //        echo $this->source();
33
-        $this->byXPath("//*[@id='gd-sidebar-wrapper']//ul[@class='geodir-loginbox-list']//a[@class='signin']")->click();
34
-        $this->waitForPageLoadAndCheckForErrors();
33
+		$this->byXPath("//*[@id='gd-sidebar-wrapper']//ul[@class='geodir-loginbox-list']//a[@class='signin']")->click();
34
+		$this->waitForPageLoadAndCheckForErrors();
35 35
 
36
-        //change password for the test user
37
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/users.php');
38
-        $this->waitForPageLoadAndCheckForErrors();
39
-        $this->assertTrue( $this->isTextPresent("[email protected]"), "Test user not found");
40
-        $user_id = $this->byXPath("//*[text()[contains(.,'[email protected]')]]/ancestor::tr")->attribute('id');
41
-        $user_id = str_replace('user-', '', $user_id);
42
-        $this->url(self::GDTEST_BASE_URL.'wp-admin/user-edit.php?user_id='.$user_id);
36
+		//change password for the test user
37
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/users.php');
38
+		$this->waitForPageLoadAndCheckForErrors();
39
+		$this->assertTrue( $this->isTextPresent("[email protected]"), "Test user not found");
40
+		$user_id = $this->byXPath("//*[text()[contains(.,'[email protected]')]]/ancestor::tr")->attribute('id');
41
+		$user_id = str_replace('user-', '', $user_id);
42
+		$this->url(self::GDTEST_BASE_URL.'wp-admin/user-edit.php?user_id='.$user_id);
43 43
 //        $this->select($this->byId("role"))->selectOptionByLabel('Administrator');
44
-        $this->byClassName('wp-generate-pw')->click();
45
-        $this->waitForPageLoadAndCheckForErrors(5000);
46
-        $this->byId('pass1-text')->value('1');
47
-        $this->waitForPageLoadAndCheckForErrors(10000);
48
-        $this->byClassName('pw-checkbox')->click();
49
-        $this->byId('submit')->click();
50
-        $this->waitForPageLoadAndCheckForErrors();
51
-        $this->assertTrue( $this->isTextPresent("User updated"), "User updated text not found");
44
+		$this->byClassName('wp-generate-pw')->click();
45
+		$this->waitForPageLoadAndCheckForErrors(5000);
46
+		$this->byId('pass1-text')->value('1');
47
+		$this->waitForPageLoadAndCheckForErrors(10000);
48
+		$this->byClassName('pw-checkbox')->click();
49
+		$this->byId('submit')->click();
50
+		$this->waitForPageLoadAndCheckForErrors();
51
+		$this->assertTrue( $this->isTextPresent("User updated"), "User updated text not found");
52 52
 
53
-    }
53
+	}
54 54
 
55
-    public function tearDown()
56
-    {
57
-        if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
58
-            //write current file number to completed.txt
59
-            $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
60
-            $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
61
-            fwrite($completed, $CurrentFileNumber);
62
-        }
63
-    }
55
+	public function tearDown()
56
+	{
57
+		if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
58
+			//write current file number to completed.txt
59
+			$CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
60
+			$completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
61
+			fwrite($completed, $CurrentFileNumber);
62
+		}
63
+	}
64 64
 
65 65
 }
66 66
 ?>
67 67
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,15 +20,15 @@  discard block
 block discarded – undo
20 20
         $this->url(self::GDTEST_BASE_URL.'gd-login/?signup=1');
21 21
         $this->waitForPageLoadAndCheckForErrors();
22 22
 //        echo $this->source();
23
-        $this->assertTrue( $this->isTextPresent("Sign Up Now"), "'Sign Up Now' text found");
23
+        $this->assertTrue($this->isTextPresent("Sign Up Now"), "'Sign Up Now' text found");
24 24
         $this->byId('user_email')->value('[email protected]');
25 25
         $this->byId('user_fname')->value('Test User');
26 26
         // Submit the form
27 27
         $this->byId('cus_registerform')->submit();
28 28
         $this->waitForPageLoadAndCheckForErrors();
29
-        $this->assertFalse( $this->isTextPresent("New user registration disabled."), "New user registration disabled.");
30
-        $this->assertFalse( $this->isTextPresent("This email is already registered."), "This email is already registered.");
31
-        $this->assertTrue( $this->isTextPresent("Add Listing"), "Add Listing text not found");
29
+        $this->assertFalse($this->isTextPresent("New user registration disabled."), "New user registration disabled.");
30
+        $this->assertFalse($this->isTextPresent("This email is already registered."), "This email is already registered.");
31
+        $this->assertTrue($this->isTextPresent("Add Listing"), "Add Listing text not found");
32 32
 //        echo $this->source();
33 33
         $this->byXPath("//*[@id='gd-sidebar-wrapper']//ul[@class='geodir-loginbox-list']//a[@class='signin']")->click();
34 34
         $this->waitForPageLoadAndCheckForErrors();
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         //change password for the test user
37 37
         $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/users.php');
38 38
         $this->waitForPageLoadAndCheckForErrors();
39
-        $this->assertTrue( $this->isTextPresent("[email protected]"), "Test user not found");
39
+        $this->assertTrue($this->isTextPresent("[email protected]"), "Test user not found");
40 40
         $user_id = $this->byXPath("//*[text()[contains(.,'[email protected]')]]/ancestor::tr")->attribute('id');
41 41
         $user_id = str_replace('user-', '', $user_id);
42 42
         $this->url(self::GDTEST_BASE_URL.'wp-admin/user-edit.php?user_id='.$user_id);
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         $this->byClassName('pw-checkbox')->click();
49 49
         $this->byId('submit')->click();
50 50
         $this->waitForPageLoadAndCheckForErrors();
51
-        $this->assertTrue( $this->isTextPresent("User updated"), "User updated text not found");
51
+        $this->assertTrue($this->isTextPresent("User updated"), "User updated text not found");
52 52
 
53 53
     }
54 54
 
Please login to merge, or discard this patch.
tests/selenium/stest-20_Geolocation.php 2 patches
Indentation   +57 added lines, -57 removed lines patch added patch discarded remove patch
@@ -1,62 +1,62 @@
 block discarded – undo
1 1
 <?php
2 2
 class Geolocation extends GD_Test
3 3
 {
4
-    public function setUp()
5
-    {
6
-        parent::setUp();
7
-
8
-        //skip test if already completed.
9
-        if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
10
-            $this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......');
11
-            return;
12
-        } else {
13
-            $this->prepareSession()->currentWindow()->maximize();
14
-        }
15
-    }
16
-
17
-    public function testGeolocation()
18
-    {
19
-        $this->logInfo('Test Geolocation......');
20
-        //make sure multi locations plugin active
21
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
22
-        $this->waitForPageLoadAndCheckForErrors();
23
-
24
-        $is_active = $this->byId("geodirectory-location-manager")->attribute('class');
25
-        if (is_int(strpos($is_active, 'inactive'))) {
26
-            //Activate Geodirectory Location Manager
27
-            $this->maybeActivatePlugin("geodirectory-location-manager", 20000);
28
-            //go back to plugin page
29
-            $this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
30
-        }
31
-
32
-        $is_active1 = $this->byId("geodirectory-location-manager")->attribute('class');
33
-        $this->assertFalse( strpos($is_active1, 'inactive'), "Location Manager plugin not active");
34
-
35
-        //test country
36
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'places/united-states/');
37
-        $this->waitForPageLoadAndCheckForErrors();
38
-        $this->assertTrue( $this->isTextPresent("in United States"), "Not in country page");
39
-
40
-        //test region
41
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'places/united-states/new-york/');
42
-        $this->waitForPageLoadAndCheckForErrors();
43
-        $this->assertTrue( $this->isTextPresent("in New York"), "Not in region page");
44
-
45
-        //test city
46
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'places/united-states/new-york/new-york/');
47
-        $this->waitForPageLoadAndCheckForErrors();
48
-        $this->assertTrue( $this->isTextPresent("in New York"), "Not in city page");
49
-
50
-    }
51
-
52
-    public function tearDown()
53
-    {
54
-        if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
55
-            //write current file number to completed.txt
56
-            $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
57
-            $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
58
-            fwrite($completed, $CurrentFileNumber);
59
-        }
60
-    }
4
+	public function setUp()
5
+	{
6
+		parent::setUp();
7
+
8
+		//skip test if already completed.
9
+		if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
10
+			$this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......');
11
+			return;
12
+		} else {
13
+			$this->prepareSession()->currentWindow()->maximize();
14
+		}
15
+	}
16
+
17
+	public function testGeolocation()
18
+	{
19
+		$this->logInfo('Test Geolocation......');
20
+		//make sure multi locations plugin active
21
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
22
+		$this->waitForPageLoadAndCheckForErrors();
23
+
24
+		$is_active = $this->byId("geodirectory-location-manager")->attribute('class');
25
+		if (is_int(strpos($is_active, 'inactive'))) {
26
+			//Activate Geodirectory Location Manager
27
+			$this->maybeActivatePlugin("geodirectory-location-manager", 20000);
28
+			//go back to plugin page
29
+			$this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
30
+		}
31
+
32
+		$is_active1 = $this->byId("geodirectory-location-manager")->attribute('class');
33
+		$this->assertFalse( strpos($is_active1, 'inactive'), "Location Manager plugin not active");
34
+
35
+		//test country
36
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'places/united-states/');
37
+		$this->waitForPageLoadAndCheckForErrors();
38
+		$this->assertTrue( $this->isTextPresent("in United States"), "Not in country page");
39
+
40
+		//test region
41
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'places/united-states/new-york/');
42
+		$this->waitForPageLoadAndCheckForErrors();
43
+		$this->assertTrue( $this->isTextPresent("in New York"), "Not in region page");
44
+
45
+		//test city
46
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'places/united-states/new-york/new-york/');
47
+		$this->waitForPageLoadAndCheckForErrors();
48
+		$this->assertTrue( $this->isTextPresent("in New York"), "Not in city page");
49
+
50
+	}
51
+
52
+	public function tearDown()
53
+	{
54
+		if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
55
+			//write current file number to completed.txt
56
+			$CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
57
+			$completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
58
+			fwrite($completed, $CurrentFileNumber);
59
+		}
60
+	}
61 61
 }
62 62
 ?>
63 63
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,22 +30,22 @@
 block discarded – undo
30 30
         }
31 31
 
32 32
         $is_active1 = $this->byId("geodirectory-location-manager")->attribute('class');
33
-        $this->assertFalse( strpos($is_active1, 'inactive'), "Location Manager plugin not active");
33
+        $this->assertFalse(strpos($is_active1, 'inactive'), "Location Manager plugin not active");
34 34
 
35 35
         //test country
36 36
         $this->maybeAdminLogin(self::GDTEST_BASE_URL.'places/united-states/');
37 37
         $this->waitForPageLoadAndCheckForErrors();
38
-        $this->assertTrue( $this->isTextPresent("in United States"), "Not in country page");
38
+        $this->assertTrue($this->isTextPresent("in United States"), "Not in country page");
39 39
 
40 40
         //test region
41 41
         $this->maybeAdminLogin(self::GDTEST_BASE_URL.'places/united-states/new-york/');
42 42
         $this->waitForPageLoadAndCheckForErrors();
43
-        $this->assertTrue( $this->isTextPresent("in New York"), "Not in region page");
43
+        $this->assertTrue($this->isTextPresent("in New York"), "Not in region page");
44 44
 
45 45
         //test city
46 46
         $this->maybeAdminLogin(self::GDTEST_BASE_URL.'places/united-states/new-york/new-york/');
47 47
         $this->waitForPageLoadAndCheckForErrors();
48
-        $this->assertTrue( $this->isTextPresent("in New York"), "Not in city page");
48
+        $this->assertTrue($this->isTextPresent("in New York"), "Not in city page");
49 49
 
50 50
     }
51 51
 
Please login to merge, or discard this patch.
tests/selenium/stest-38_Autocompleters.php 1 patch
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -1,35 +1,35 @@
 block discarded – undo
1 1
 <?php
2 2
 class AutoCompleters extends GD_Test
3 3
 {
4
-    public function setUp()
5
-    {
6
-        parent::setUp();
4
+	public function setUp()
5
+	{
6
+		parent::setUp();
7 7
 
8
-        //skip test if already completed.
9
-        if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
10
-            $this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......');
11
-            return;
12
-        } else {
13
-            $this->prepareSession()->currentWindow()->maximize();
14
-        }
15
-    }
8
+		//skip test if already completed.
9
+		if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
10
+			$this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......');
11
+			return;
12
+		} else {
13
+			$this->prepareSession()->currentWindow()->maximize();
14
+		}
15
+	}
16 16
 
17
-    public function testAutoCompleters()
18
-    {
19
-        $this->logInfo('Testing auto completers......');
20
-        $this->logInfo('Skipping auto completers since its not possible......');
17
+	public function testAutoCompleters()
18
+	{
19
+		$this->logInfo('Testing auto completers......');
20
+		$this->logInfo('Skipping auto completers since its not possible......');
21 21
 //        $this->url(self::GDTEST_BASE_URL);
22 22
 //        $this->waitForPageLoadAndCheckForErrors();
23
-    }
23
+	}
24 24
 
25
-    public function tearDown()
26
-    {
27
-        if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
28
-            //write current file number to completed.txt
29
-            $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
30
-            $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
31
-            fwrite($completed, $CurrentFileNumber);
32
-        }
33
-    }
25
+	public function tearDown()
26
+	{
27
+		if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
28
+			//write current file number to completed.txt
29
+			$CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
30
+			$completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
31
+			fwrite($completed, $CurrentFileNumber);
32
+		}
33
+	}
34 34
 }
35 35
 ?>
36 36
\ No newline at end of file
Please login to merge, or discard this patch.
tests/selenium/stest-12_Claim_A_Listing.php 2 patches
Indentation   +66 added lines, -66 removed lines patch added patch discarded remove patch
@@ -1,79 +1,79 @@
 block discarded – undo
1 1
 <?php
2 2
 class ClaimAListing extends GD_Test
3 3
 {
4
-    public function setUp()
5
-    {
6
-        parent::setUp();
4
+	public function setUp()
5
+	{
6
+		parent::setUp();
7 7
 
8
-        //skip test if already completed.
9
-        if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
10
-            $this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......');
11
-            return;
12
-        } else {
13
-            $this->prepareSession()->currentWindow()->maximize();
14
-        }
15
-    }
8
+		//skip test if already completed.
9
+		if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
10
+			$this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......');
11
+			return;
12
+		} else {
13
+			$this->prepareSession()->currentWindow()->maximize();
14
+		}
15
+	}
16 16
 
17
-    public function testClaimAListing()
18
-    {
19
-        $this->logInfo('Claim a listing......');
20
-        //make sure claim manager plugin active
21
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
22
-        $this->waitForPageLoadAndCheckForErrors();
17
+	public function testClaimAListing()
18
+	{
19
+		$this->logInfo('Claim a listing......');
20
+		//make sure claim manager plugin active
21
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
22
+		$this->waitForPageLoadAndCheckForErrors();
23 23
 
24
-        $is_active = $this->byId("geodirectory-claim-manager")->attribute('class');
25
-        if (is_int(strpos($is_active, 'inactive'))) {
26
-            //Activate Geodirectory Claim Manager
27
-            $this->maybeActivatePlugin("geodirectory-claim-manager", 20000);
28
-            //go back to plugin page
29
-            $this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
30
-        }
24
+		$is_active = $this->byId("geodirectory-claim-manager")->attribute('class');
25
+		if (is_int(strpos($is_active, 'inactive'))) {
26
+			//Activate Geodirectory Claim Manager
27
+			$this->maybeActivatePlugin("geodirectory-claim-manager", 20000);
28
+			//go back to plugin page
29
+			$this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
30
+		}
31 31
 
32
-        $is_active1 = $this->byId("geodirectory-claim-manager")->attribute('class');
33
-        $this->assertFalse( strpos($is_active1, 'inactive'), "Claim Manager plugin not active");
32
+		$is_active1 = $this->byId("geodirectory-claim-manager")->attribute('class');
33
+		$this->assertFalse( strpos($is_active1, 'inactive'), "Claim Manager plugin not active");
34 34
 
35
-        //Configure claim manager
36
-        $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=claimlisting_fields&subtab=geodir_claim_options');
37
-        $this->waitForPageLoadAndCheckForErrors();
38
-        $this->hideAdminBar();
39
-        $this->ExecuteScript('jQuery("select#geodir_claim_enable").show();');
40
-        $this->ExecuteScript('jQuery("select#geodir_claim_auto_approve").show();');
41
-        $this->ExecuteScript('jQuery("select#geodir_claim_show_owner_varified").show();');
42
-        $this->ExecuteScript('jQuery("select#geodir_claim_show_author_link").show();');
43
-        $this->ExecuteScript('jQuery("select#geodir_post_types_claim_listing").show();');
44
-        $this->ExecuteScript('jQuery("select#geodir_claim_force_upgrade").show();');
35
+		//Configure claim manager
36
+		$this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=claimlisting_fields&subtab=geodir_claim_options');
37
+		$this->waitForPageLoadAndCheckForErrors();
38
+		$this->hideAdminBar();
39
+		$this->ExecuteScript('jQuery("select#geodir_claim_enable").show();');
40
+		$this->ExecuteScript('jQuery("select#geodir_claim_auto_approve").show();');
41
+		$this->ExecuteScript('jQuery("select#geodir_claim_show_owner_varified").show();');
42
+		$this->ExecuteScript('jQuery("select#geodir_claim_show_author_link").show();');
43
+		$this->ExecuteScript('jQuery("select#geodir_post_types_claim_listing").show();');
44
+		$this->ExecuteScript('jQuery("select#geodir_claim_force_upgrade").show();');
45 45
 
46
-        $this->select($this->byId("geodir_claim_enable"))->selectOptionByLabel('Yes');
47
-        $this->select($this->byId("geodir_claim_auto_approve"))->selectOptionByLabel('Yes');
48
-        $this->select($this->byId("geodir_claim_show_owner_varified"))->selectOptionByLabel('Yes');
49
-        $this->select($this->byId("geodir_claim_show_author_link"))->selectOptionByLabel('Yes');
50
-        $this->select($this->byId("geodir_post_types_claim_listing"))->selectOptionByLabel('Place');
51
-        $this->select($this->byId("geodir_claim_force_upgrade"))->selectOptionByLabel('No');
52
-        $this->byName('save')->click();
53
-        $this->waitForPageLoadAndCheckForErrors();
46
+		$this->select($this->byId("geodir_claim_enable"))->selectOptionByLabel('Yes');
47
+		$this->select($this->byId("geodir_claim_auto_approve"))->selectOptionByLabel('Yes');
48
+		$this->select($this->byId("geodir_claim_show_owner_varified"))->selectOptionByLabel('Yes');
49
+		$this->select($this->byId("geodir_claim_show_author_link"))->selectOptionByLabel('Yes');
50
+		$this->select($this->byId("geodir_post_types_claim_listing"))->selectOptionByLabel('Place');
51
+		$this->select($this->byId("geodir_claim_force_upgrade"))->selectOptionByLabel('No');
52
+		$this->byName('save')->click();
53
+		$this->waitForPageLoadAndCheckForErrors();
54 54
 
55
-        $this->url(self::GDTEST_BASE_URL.'places/united-states/new-york/new-york/attractions/test-listing/');
56
-        $this->waitForPageLoadAndCheckForErrors();
57
-        $this->byClassName('geodir_claim_enable')->click();
58
-        $this->waitForPageLoadAndCheckForErrors();
59
-        $this->byId('geodir_full_name')->value('Test User');
60
-        $this->byId('geodir_user_number')->value('44444444444');
61
-        $this->byId('geodir_user_position')->value('Business Manager');
62
-        $this->byName('geodir_Send')->click();
63
-        $this->waitForPageLoadAndCheckForErrors();
64
-        $this->assertTrue( $this->isTextPresent("Request sent successfully"), "Success text not found");
65
-        //Goto claim page
66
-        $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=claimlisting_fields&subtab=manage_geodir_claim_listing');
67
-    }
55
+		$this->url(self::GDTEST_BASE_URL.'places/united-states/new-york/new-york/attractions/test-listing/');
56
+		$this->waitForPageLoadAndCheckForErrors();
57
+		$this->byClassName('geodir_claim_enable')->click();
58
+		$this->waitForPageLoadAndCheckForErrors();
59
+		$this->byId('geodir_full_name')->value('Test User');
60
+		$this->byId('geodir_user_number')->value('44444444444');
61
+		$this->byId('geodir_user_position')->value('Business Manager');
62
+		$this->byName('geodir_Send')->click();
63
+		$this->waitForPageLoadAndCheckForErrors();
64
+		$this->assertTrue( $this->isTextPresent("Request sent successfully"), "Success text not found");
65
+		//Goto claim page
66
+		$this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=claimlisting_fields&subtab=manage_geodir_claim_listing');
67
+	}
68 68
 
69
-    public function tearDown()
70
-    {
71
-        if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
72
-            //write current file number to completed.txt
73
-            $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
74
-            $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
75
-            fwrite($completed, $CurrentFileNumber);
76
-        }
77
-    }
69
+	public function tearDown()
70
+	{
71
+		if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
72
+			//write current file number to completed.txt
73
+			$CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
74
+			$completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
75
+			fwrite($completed, $CurrentFileNumber);
76
+		}
77
+	}
78 78
 }
79 79
 ?>
80 80
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         }
31 31
 
32 32
         $is_active1 = $this->byId("geodirectory-claim-manager")->attribute('class');
33
-        $this->assertFalse( strpos($is_active1, 'inactive'), "Claim Manager plugin not active");
33
+        $this->assertFalse(strpos($is_active1, 'inactive'), "Claim Manager plugin not active");
34 34
 
35 35
         //Configure claim manager
36 36
         $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=claimlisting_fields&subtab=geodir_claim_options');
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         $this->byId('geodir_user_position')->value('Business Manager');
62 62
         $this->byName('geodir_Send')->click();
63 63
         $this->waitForPageLoadAndCheckForErrors();
64
-        $this->assertTrue( $this->isTextPresent("Request sent successfully"), "Success text not found");
64
+        $this->assertTrue($this->isTextPresent("Request sent successfully"), "Success text not found");
65 65
         //Goto claim page
66 66
         $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=claimlisting_fields&subtab=manage_geodir_claim_listing');
67 67
     }
Please login to merge, or discard this patch.
tests/selenium/stest-22_Check_Maps.php 2 patches
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -1,48 +1,48 @@
 block discarded – undo
1 1
 <?php
2 2
 class CheckMaps extends GD_Test
3 3
 {
4
-    public function setUp()
5
-    {
6
-        parent::setUp();
4
+	public function setUp()
5
+	{
6
+		parent::setUp();
7 7
 
8
-        //skip test if already completed.
9
-        if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
10
-            $this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......');
11
-            return;
12
-        } else {
13
-            $this->prepareSession()->currentWindow()->maximize();
14
-        }
15
-    }
8
+		//skip test if already completed.
9
+		if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
10
+			$this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......');
11
+			return;
12
+		} else {
13
+			$this->prepareSession()->currentWindow()->maximize();
14
+		}
15
+	}
16 16
 
17
-    public function testCheckMaps()
18
-    {
19
-        //home map
20
-        $this->logInfo('Checking home map......');
21
-        $this->url(self::GDTEST_BASE_URL);
22
-        $this->waitForPageLoadAndCheckForErrors();
23
-        $this->assertTrue( $this->isTextPresent("geodir-map-home-page"), "Home page map not found");
17
+	public function testCheckMaps()
18
+	{
19
+		//home map
20
+		$this->logInfo('Checking home map......');
21
+		$this->url(self::GDTEST_BASE_URL);
22
+		$this->waitForPageLoadAndCheckForErrors();
23
+		$this->assertTrue( $this->isTextPresent("geodir-map-home-page"), "Home page map not found");
24 24
 
25
-        //listing map
26
-        $this->logInfo('Checking listing map......');
27
-        $this->url(self::GDTEST_BASE_URL.'places/');
28
-        $this->waitForPageLoadAndCheckForErrors();
29
-        $this->assertTrue( $this->isTextPresent("geodir-map-listing-page"), "Listing page map not found");
25
+		//listing map
26
+		$this->logInfo('Checking listing map......');
27
+		$this->url(self::GDTEST_BASE_URL.'places/');
28
+		$this->waitForPageLoadAndCheckForErrors();
29
+		$this->assertTrue( $this->isTextPresent("geodir-map-listing-page"), "Listing page map not found");
30 30
 
31
-        //detail map
32
-        $this->logInfo('Checking detail map......');
33
-        $this->url(self::GDTEST_BASE_URL.'places/united-states/new-york/new-york/attractions/franklin-square/');
34
-        $this->waitForPageLoadAndCheckForErrors();
35
-        $this->assertTrue( $this->isTextPresent("geodir-map-detail-page"), "Detail page map not found");
36
-    }
31
+		//detail map
32
+		$this->logInfo('Checking detail map......');
33
+		$this->url(self::GDTEST_BASE_URL.'places/united-states/new-york/new-york/attractions/franklin-square/');
34
+		$this->waitForPageLoadAndCheckForErrors();
35
+		$this->assertTrue( $this->isTextPresent("geodir-map-detail-page"), "Detail page map not found");
36
+	}
37 37
 
38
-    public function tearDown()
39
-    {
40
-        if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
41
-            //write current file number to completed.txt
42
-            $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
43
-            $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
44
-            fwrite($completed, $CurrentFileNumber);
45
-        }
46
-    }
38
+	public function tearDown()
39
+	{
40
+		if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
41
+			//write current file number to completed.txt
42
+			$CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
43
+			$completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
44
+			fwrite($completed, $CurrentFileNumber);
45
+		}
46
+	}
47 47
 }
48 48
 ?>
49 49
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,19 +20,19 @@
 block discarded – undo
20 20
         $this->logInfo('Checking home map......');
21 21
         $this->url(self::GDTEST_BASE_URL);
22 22
         $this->waitForPageLoadAndCheckForErrors();
23
-        $this->assertTrue( $this->isTextPresent("geodir-map-home-page"), "Home page map not found");
23
+        $this->assertTrue($this->isTextPresent("geodir-map-home-page"), "Home page map not found");
24 24
 
25 25
         //listing map
26 26
         $this->logInfo('Checking listing map......');
27 27
         $this->url(self::GDTEST_BASE_URL.'places/');
28 28
         $this->waitForPageLoadAndCheckForErrors();
29
-        $this->assertTrue( $this->isTextPresent("geodir-map-listing-page"), "Listing page map not found");
29
+        $this->assertTrue($this->isTextPresent("geodir-map-listing-page"), "Listing page map not found");
30 30
 
31 31
         //detail map
32 32
         $this->logInfo('Checking detail map......');
33 33
         $this->url(self::GDTEST_BASE_URL.'places/united-states/new-york/new-york/attractions/franklin-square/');
34 34
         $this->waitForPageLoadAndCheckForErrors();
35
-        $this->assertTrue( $this->isTextPresent("geodir-map-detail-page"), "Detail page map not found");
35
+        $this->assertTrue($this->isTextPresent("geodir-map-detail-page"), "Detail page map not found");
36 36
     }
37 37
 
38 38
     public function tearDown()
Please login to merge, or discard this patch.
tests/selenium/stest-05_Upgrade_Listing.php 2 patches
Indentation   +65 added lines, -65 removed lines patch added patch discarded remove patch
@@ -1,75 +1,75 @@
 block discarded – undo
1 1
 <?php
2 2
 class UpgradeListing extends GD_Test
3 3
 {
4
-    public function setUp()
5
-    {
6
-        parent::setUp();
4
+	public function setUp()
5
+	{
6
+		parent::setUp();
7 7
 
8
-        //skip test if already completed.
9
-        if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
10
-            $this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......');
11
-            return;
12
-        } else {
13
-            $this->prepareSession()->currentWindow()->maximize();
14
-        }
15
-    }
8
+		//skip test if already completed.
9
+		if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
10
+			$this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......');
11
+			return;
12
+		} else {
13
+			$this->prepareSession()->currentWindow()->maximize();
14
+		}
15
+	}
16 16
 
17
-    public function testUpgradeListing()
18
-    {
19
-        $this->logInfo('Upgrading GD Place listing......');
20
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
21
-        $this->waitForPageLoadAndCheckForErrors();
22
-        //check payment manager plugin active
23
-        $is_active = $this->byId("geodirectory-payment-manager")->attribute('class');
24
-        if (is_int(strpos($is_active, 'inactive'))) {
25
-            //Activate Geodirectory payment manager
26
-            $this->maybeActivatePlugin("geodirectory-payment-manager", 20000);
27
-            //go back to plugin page
28
-            $this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
29
-        }
17
+	public function testUpgradeListing()
18
+	{
19
+		$this->logInfo('Upgrading GD Place listing......');
20
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
21
+		$this->waitForPageLoadAndCheckForErrors();
22
+		//check payment manager plugin active
23
+		$is_active = $this->byId("geodirectory-payment-manager")->attribute('class');
24
+		if (is_int(strpos($is_active, 'inactive'))) {
25
+			//Activate Geodirectory payment manager
26
+			$this->maybeActivatePlugin("geodirectory-payment-manager", 20000);
27
+			//go back to plugin page
28
+			$this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
29
+		}
30 30
 
31
-        $is_active1 = $this->byId("geodirectory-payment-manager")->attribute('class');
32
-        $this->assertFalse( strpos($is_active1, 'inactive'), "Payment Manager plugin not active");
31
+		$is_active1 = $this->byId("geodirectory-payment-manager")->attribute('class');
32
+		$this->assertFalse( strpos($is_active1, 'inactive'), "Payment Manager plugin not active");
33 33
 
34
-        $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=paymentmanager_fields&subtab=geodir_payment_manager');
35
-        $this->waitForPageLoadAndCheckForErrors();
36
-        $this->assertTrue( $this->isTextPresent("Geo Directory Manage Price"), "Not in manage price page");
37
-        $text = $this->byId("gd_price_table")->text();
38
-        $count = substr_count($text, 'gd_place');
39
-        if ($count == 1) {
40
-            $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=paymentmanager_fields&subtab=geodir_payment_manager&gd_pagetype=addeditprice');
41
-            $this->waitForPageLoadAndCheckForErrors();
42
-            $this->assertTrue( $this->isTextPresent("Add Price"), "Add Price text not found");
43
-            $this->byId('title')->value('Premium');
44
-            $this->byId('days')->value('0');
45
-            $this->byName('gd_amount')->value('5');
46
-            $this->select($this->byName('gd_status'))->selectOptionByValue(1);
47
-            $this->byName('submit')->click();
48
-        }
49
-        $this->url(self::GDTEST_BASE_URL.'author/admin/?geodir_dashbord=true&stype=gd_place');
50
-        $this->waitForPageLoadAndCheckForErrors();
51
-        $this->byClassName('geodir-upgrade')->click();
52
-        $this->waitForPageLoadAndCheckForErrors();
53
-        $this->byXPath("(//div[@class='geodir_package']/input[@type='radio'])[2]")->click();
54
-        $this->waitForPageLoadAndCheckForErrors();
55
-        $this->byId('geodir_accept_term_condition')->click();
56
-        $this->byXPath("//div[@id='geodir-add-listing-submit']//input[@type='submit']")->click();
57
-        $this->waitForPageLoadAndCheckForErrors();
58
-        $this->byXPath("//input[@name='Submit and Pay']")->click();
59
-        $this->waitForPageLoadAndCheckForErrors();
60
-        $this->byId('gd_pmethod_prebanktransfer')->click();
61
-        $this->byId('gd_checkout_paynow')->click();
62
-        $this->waitForPageLoadAndCheckForErrors();
63
-    }
34
+		$this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=paymentmanager_fields&subtab=geodir_payment_manager');
35
+		$this->waitForPageLoadAndCheckForErrors();
36
+		$this->assertTrue( $this->isTextPresent("Geo Directory Manage Price"), "Not in manage price page");
37
+		$text = $this->byId("gd_price_table")->text();
38
+		$count = substr_count($text, 'gd_place');
39
+		if ($count == 1) {
40
+			$this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=paymentmanager_fields&subtab=geodir_payment_manager&gd_pagetype=addeditprice');
41
+			$this->waitForPageLoadAndCheckForErrors();
42
+			$this->assertTrue( $this->isTextPresent("Add Price"), "Add Price text not found");
43
+			$this->byId('title')->value('Premium');
44
+			$this->byId('days')->value('0');
45
+			$this->byName('gd_amount')->value('5');
46
+			$this->select($this->byName('gd_status'))->selectOptionByValue(1);
47
+			$this->byName('submit')->click();
48
+		}
49
+		$this->url(self::GDTEST_BASE_URL.'author/admin/?geodir_dashbord=true&stype=gd_place');
50
+		$this->waitForPageLoadAndCheckForErrors();
51
+		$this->byClassName('geodir-upgrade')->click();
52
+		$this->waitForPageLoadAndCheckForErrors();
53
+		$this->byXPath("(//div[@class='geodir_package']/input[@type='radio'])[2]")->click();
54
+		$this->waitForPageLoadAndCheckForErrors();
55
+		$this->byId('geodir_accept_term_condition')->click();
56
+		$this->byXPath("//div[@id='geodir-add-listing-submit']//input[@type='submit']")->click();
57
+		$this->waitForPageLoadAndCheckForErrors();
58
+		$this->byXPath("//input[@name='Submit and Pay']")->click();
59
+		$this->waitForPageLoadAndCheckForErrors();
60
+		$this->byId('gd_pmethod_prebanktransfer')->click();
61
+		$this->byId('gd_checkout_paynow')->click();
62
+		$this->waitForPageLoadAndCheckForErrors();
63
+	}
64 64
 
65
-    public function tearDown()
66
-    {
67
-        if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
68
-            //write current file number to completed.txt
69
-            $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
70
-            $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
71
-            fwrite($completed, $CurrentFileNumber);
72
-        }
73
-    }
65
+	public function tearDown()
66
+	{
67
+		if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
68
+			//write current file number to completed.txt
69
+			$CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
70
+			$completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
71
+			fwrite($completed, $CurrentFileNumber);
72
+		}
73
+	}
74 74
 }
75 75
 ?>
76 76
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,17 +29,17 @@
 block discarded – undo
29 29
         }
30 30
 
31 31
         $is_active1 = $this->byId("geodirectory-payment-manager")->attribute('class');
32
-        $this->assertFalse( strpos($is_active1, 'inactive'), "Payment Manager plugin not active");
32
+        $this->assertFalse(strpos($is_active1, 'inactive'), "Payment Manager plugin not active");
33 33
 
34 34
         $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=paymentmanager_fields&subtab=geodir_payment_manager');
35 35
         $this->waitForPageLoadAndCheckForErrors();
36
-        $this->assertTrue( $this->isTextPresent("Geo Directory Manage Price"), "Not in manage price page");
36
+        $this->assertTrue($this->isTextPresent("Geo Directory Manage Price"), "Not in manage price page");
37 37
         $text = $this->byId("gd_price_table")->text();
38 38
         $count = substr_count($text, 'gd_place');
39 39
         if ($count == 1) {
40 40
             $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=paymentmanager_fields&subtab=geodir_payment_manager&gd_pagetype=addeditprice');
41 41
             $this->waitForPageLoadAndCheckForErrors();
42
-            $this->assertTrue( $this->isTextPresent("Add Price"), "Add Price text not found");
42
+            $this->assertTrue($this->isTextPresent("Add Price"), "Add Price text not found");
43 43
             $this->byId('title')->value('Premium');
44 44
             $this->byId('days')->value('0');
45 45
             $this->byName('gd_amount')->value('5');
Please login to merge, or discard this patch.