Test Failed
Push — master ( 5e22d4...26349a )
by Stiofan
01:19 queued 10s
created
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.
tests/selenium/stest-08_Complex_Advanced_Search.php 2 patches
Indentation   +68 added lines, -68 removed lines patch added patch discarded remove patch
@@ -1,64 +1,64 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 class ComplexAdvancedSearch 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 testComplexAdvancedSearch()
18
-    {
19
-        $this->logInfo('Testing complex advanced search......');
20
-        //make sure advance search filters plugin active
21
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
22
-        $this->waitForPageLoadAndCheckForErrors();
17
+	public function testComplexAdvancedSearch()
18
+	{
19
+		$this->logInfo('Testing complex advanced search......');
20
+		//make sure advance search filters plugin active
21
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
22
+		$this->waitForPageLoadAndCheckForErrors();
23 23
 
24
-        $is_active = $this->byId("geodirectory-advance-search-filters")->attribute('class');
25
-        if (is_int(strpos($is_active, 'inactive'))) {
26
-            //Activate Geodirectory Advance Search Filters
27
-            $this->maybeActivatePlugin("geodirectory-advance-search-filters", 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-advance-search-filters")->attribute('class');
25
+		if (is_int(strpos($is_active, 'inactive'))) {
26
+			//Activate Geodirectory Advance Search Filters
27
+			$this->maybeActivatePlugin("geodirectory-advance-search-filters", 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-advance-search-filters")->attribute('class');
33
-        $this->assertFalse( strpos($is_active1, 'inactive'), "Advance Search Filters plugin not active");
32
+		$is_active1 = $this->byId("geodirectory-advance-search-filters")->attribute('class');
33
+		$this->assertFalse( strpos($is_active1, 'inactive'), "Advance Search Filters plugin not active");
34 34
 
35
-        //Add search fields
36
-        $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=gd_place_fields_settings&subtab=custom_fields&listing_type=gd_place');
35
+		//Add search fields
36
+		$this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=gd_place_fields_settings&subtab=custom_fields&listing_type=gd_place');
37 37
 //        $this->ExecuteScript('jQuery("#field_frm1").show();');
38
-        $this->waitForPageLoadAndCheckForErrors();
39
-        $this->hideAdminBar();
40
-        $link = $this->byXPath("//li[@id='licontainer_1']/div");
41
-        $this->moveto($link);
42
-        $this->doubleclick();
43
-        $this->waitForPageLoadAndCheckForErrors();
44
-        $this->byXPath("//li[@id='licontainer_1']//input[@id='cat_filter']")->click();
45
-        $this->byXPath("//li[@id='licontainer_1']//input[@id='save']")->click();
38
+		$this->waitForPageLoadAndCheckForErrors();
39
+		$this->hideAdminBar();
40
+		$link = $this->byXPath("//li[@id='licontainer_1']/div");
41
+		$this->moveto($link);
42
+		$this->doubleclick();
43
+		$this->waitForPageLoadAndCheckForErrors();
44
+		$this->byXPath("//li[@id='licontainer_1']//input[@id='cat_filter']")->click();
45
+		$this->byXPath("//li[@id='licontainer_1']//input[@id='save']")->click();
46 46
 //        $this->byId('save')->click();
47
-        $this->waitForPageLoadAndCheckForErrors();
47
+		$this->waitForPageLoadAndCheckForErrors();
48 48
 
49
-        //category
50
-        $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=gd_place_fields_settings&subtab=advance_search&listing_type=gd_place');
51
-        $this->waitForPageLoadAndCheckForErrors();
52
-        $this->hideAdminBar();
53
-        $this->byId('gt-gd_placecategory')->click();
54
-        $this->waitForPageLoadAndCheckForErrors();
55
-        $link = $this->byXPath("//li[@id='licontainer_gd_placecategory']/div");
56
-        $this->moveto($link);
57
-        $this->doubleclick();
58
-        $this->waitForPageLoadAndCheckForErrors();
59
-        $this->byXPath("//div[@id='field_frmgd_placecategory']//input[@id='front_search_title']")->value('Category');
60
-        $this->byXPath("//div[@id='field_frmgd_placecategory']//input[@id='save']")->click();
61
-        $this->waitForPageLoadAndCheckForErrors();
49
+		//category
50
+		$this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=gd_place_fields_settings&subtab=advance_search&listing_type=gd_place');
51
+		$this->waitForPageLoadAndCheckForErrors();
52
+		$this->hideAdminBar();
53
+		$this->byId('gt-gd_placecategory')->click();
54
+		$this->waitForPageLoadAndCheckForErrors();
55
+		$link = $this->byXPath("//li[@id='licontainer_gd_placecategory']/div");
56
+		$this->moveto($link);
57
+		$this->doubleclick();
58
+		$this->waitForPageLoadAndCheckForErrors();
59
+		$this->byXPath("//div[@id='field_frmgd_placecategory']//input[@id='front_search_title']")->value('Category');
60
+		$this->byXPath("//div[@id='field_frmgd_placecategory']//input[@id='save']")->click();
61
+		$this->waitForPageLoadAndCheckForErrors();
62 62
 
63 63
 //        $link = $this->byXPath("//li[@id='licontainer_dist']/div[contains(@class,'titledist')]");
64 64
 //        $this->moveto($link);
@@ -71,25 +71,25 @@  discard block
 block discarded – undo
71 71
 //        $this->waitForPageLoadAndCheckForErrors();
72 72
 
73 73
 
74
-        $this->url(self::GDTEST_BASE_URL);
75
-        $this->waitForPageLoadAndCheckForErrors();
76
-        $this->byXPath("//section[contains(@class,'geodir_advance_search_widget')]//input[@name='s']")->value('Test');
77
-        $this->byXPath("//section[contains(@class,'geodir_advance_search_widget')]//input[@class='showFilters']")->click();
78
-        $this->select($this->byXPath("//section[contains(@class,'geodir_advance_search_widget')]//select[@class='cat_select']"))->selectOptionByLabel('Attractions');
74
+		$this->url(self::GDTEST_BASE_URL);
75
+		$this->waitForPageLoadAndCheckForErrors();
76
+		$this->byXPath("//section[contains(@class,'geodir_advance_search_widget')]//input[@name='s']")->value('Test');
77
+		$this->byXPath("//section[contains(@class,'geodir_advance_search_widget')]//input[@class='showFilters']")->click();
78
+		$this->select($this->byXPath("//section[contains(@class,'geodir_advance_search_widget')]//select[@class='cat_select']"))->selectOptionByLabel('Attractions');
79 79
 //        $this->byName('sgd_placecategory[]')->value("2");
80
-        $this->byXPath("(//section[contains(@class,'geodir_advance_search_widget')]//input[@class='geodir_submit_search'])[2]")->click();
81
-        $this->waitForPageLoadAndCheckForErrors();
82
-        $this->assertTrue( $this->isTextPresent("Search Places For"), "Not in search results page");
83
-    }
80
+		$this->byXPath("(//section[contains(@class,'geodir_advance_search_widget')]//input[@class='geodir_submit_search'])[2]")->click();
81
+		$this->waitForPageLoadAndCheckForErrors();
82
+		$this->assertTrue( $this->isTextPresent("Search Places For"), "Not in search results page");
83
+	}
84 84
 
85
-    public function tearDown()
86
-    {
87
-        if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
88
-            //write current file number to completed.txt
89
-            $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
90
-            $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
91
-            fwrite($completed, $CurrentFileNumber);
92
-        }
93
-    }
85
+	public function tearDown()
86
+	{
87
+		if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
88
+			//write current file number to completed.txt
89
+			$CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
90
+			$completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
91
+			fwrite($completed, $CurrentFileNumber);
92
+		}
93
+	}
94 94
 }
95 95
 ?>
96 96
\ 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-advance-search-filters")->attribute('class');
33
-        $this->assertFalse( strpos($is_active1, 'inactive'), "Advance Search Filters plugin not active");
33
+        $this->assertFalse(strpos($is_active1, 'inactive'), "Advance Search Filters plugin not active");
34 34
 
35 35
         //Add search fields
36 36
         $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=gd_place_fields_settings&subtab=custom_fields&listing_type=gd_place');
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 //        $this->byName('sgd_placecategory[]')->value("2");
80 80
         $this->byXPath("(//section[contains(@class,'geodir_advance_search_widget')]//input[@class='geodir_submit_search'])[2]")->click();
81 81
         $this->waitForPageLoadAndCheckForErrors();
82
-        $this->assertTrue( $this->isTextPresent("Search Places For"), "Not in search results page");
82
+        $this->assertTrue($this->isTextPresent("Search Places For"), "Not in search results page");
83 83
     }
84 84
 
85 85
     public function tearDown()
Please login to merge, or discard this patch.
tests/selenium/stest-18_Check_Notifications.php 1 patch
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -1,33 +1,33 @@
 block discarded – undo
1 1
 <?php
2 2
 class CheckNotifications 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 testCheckNotifications()
18
-    {
19
-        $this->logInfo('Check notifications......');
20
-        $this->logInfo('Skipping since its not possible......');
21
-    }
17
+	public function testCheckNotifications()
18
+	{
19
+		$this->logInfo('Check notifications......');
20
+		$this->logInfo('Skipping since its not possible......');
21
+	}
22 22
 
23
-    public function tearDown()
24
-    {
25
-        if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
26
-            //write current file number to completed.txt
27
-            $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
28
-            $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
29
-            fwrite($completed, $CurrentFileNumber);
30
-        }
31
-    }
23
+	public function tearDown()
24
+	{
25
+		if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
26
+			//write current file number to completed.txt
27
+			$CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
28
+			$completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
29
+			fwrite($completed, $CurrentFileNumber);
30
+		}
31
+	}
32 32
 }
33 33
 ?>
34 34
\ No newline at end of file
Please login to merge, or discard this patch.
tests/selenium/stest-39_Browse_GD_Pages.php 1 patch
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 BrowseGDPages 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 testBrowseGDPages()
18
-    {
19
-        //Browse all GD pages and catch errors and warnings
20
-        $this->logInfo('Testing home page......');
21
-        $this->url(self::GDTEST_BASE_URL);
22
-        $this->waitForPageLoadAndCheckForErrors();
23
-
24
-        $this->logInfo('Testing listing page......');
25
-        $this->url(self::GDTEST_BASE_URL.'places/');
26
-        $this->waitForPageLoadAndCheckForErrors();
27
-
28
-        $this->logInfo('Testing listing country page......');
29
-        $this->url(self::GDTEST_BASE_URL.'places/united-states/');
30
-        $this->waitForPageLoadAndCheckForErrors();
31
-
32
-        $this->logInfo('Testing add listing page......');
33
-        $this->url(self::GDTEST_BASE_URL.'add-listing/?listing_type=gd_place');
34
-        $this->waitForPageLoadAndCheckForErrors();
35
-
36
-        $this->logInfo('Testing add event page......');
37
-        $this->url(self::GDTEST_BASE_URL.'add-listing/?listing_type=gd_event');
38
-        $this->waitForPageLoadAndCheckForErrors();
39
-
40
-        $this->logInfo('Testing detail page......');
41
-        $this->url(self::GDTEST_BASE_URL.'places/united-states/new-york/new-york/attractions/franklin-square/');
42
-        $this->waitForPageLoadAndCheckForErrors();
43
-
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 testBrowseGDPages()
18
+	{
19
+		//Browse all GD pages and catch errors and warnings
20
+		$this->logInfo('Testing home page......');
21
+		$this->url(self::GDTEST_BASE_URL);
22
+		$this->waitForPageLoadAndCheckForErrors();
23
+
24
+		$this->logInfo('Testing listing page......');
25
+		$this->url(self::GDTEST_BASE_URL.'places/');
26
+		$this->waitForPageLoadAndCheckForErrors();
27
+
28
+		$this->logInfo('Testing listing country page......');
29
+		$this->url(self::GDTEST_BASE_URL.'places/united-states/');
30
+		$this->waitForPageLoadAndCheckForErrors();
31
+
32
+		$this->logInfo('Testing add listing page......');
33
+		$this->url(self::GDTEST_BASE_URL.'add-listing/?listing_type=gd_place');
34
+		$this->waitForPageLoadAndCheckForErrors();
35
+
36
+		$this->logInfo('Testing add event page......');
37
+		$this->url(self::GDTEST_BASE_URL.'add-listing/?listing_type=gd_event');
38
+		$this->waitForPageLoadAndCheckForErrors();
39
+
40
+		$this->logInfo('Testing detail page......');
41
+		$this->url(self::GDTEST_BASE_URL.'places/united-states/new-york/new-york/attractions/franklin-square/');
42
+		$this->waitForPageLoadAndCheckForErrors();
43
+
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.
tests/selenium/stest-24_Favourites.php 2 patches
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -1,42 +1,42 @@
 block discarded – undo
1 1
 <?php
2 2
 class Favourites 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 testFavourites()
18
-    {
19
-        $this->logInfo('Testing Favorites......');
20
-        $this->url(self::GDTEST_BASE_URL.'places/');
21
-        $this->waitForPageLoadAndCheckForErrors();
22
-        $elements = $this->elements($this->using('css selector')->value('.geodir-addtofav-icon'));
23
-        if ($elements) {
24
-            $elements[0]->click();
25
-        }
26
-        $this->waitForPageLoadAndCheckForErrors();
27
-        $this->url(self::GDTEST_BASE_URL.'author/admin/?geodir_dashbord=true&stype=gd_place&list=favourite');
28
-        $this->waitForPageLoadAndCheckForErrors();
29
-        $this->assertTrue( $this->isTextPresent("Favorite Places"), "Not in Favourites page");
30
-    }
17
+	public function testFavourites()
18
+	{
19
+		$this->logInfo('Testing Favorites......');
20
+		$this->url(self::GDTEST_BASE_URL.'places/');
21
+		$this->waitForPageLoadAndCheckForErrors();
22
+		$elements = $this->elements($this->using('css selector')->value('.geodir-addtofav-icon'));
23
+		if ($elements) {
24
+			$elements[0]->click();
25
+		}
26
+		$this->waitForPageLoadAndCheckForErrors();
27
+		$this->url(self::GDTEST_BASE_URL.'author/admin/?geodir_dashbord=true&stype=gd_place&list=favourite');
28
+		$this->waitForPageLoadAndCheckForErrors();
29
+		$this->assertTrue( $this->isTextPresent("Favorite Places"), "Not in Favourites page");
30
+	}
31 31
 
32
-    public function tearDown()
33
-    {
34
-        if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
35
-            //write current file number to completed.txt
36
-            $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
37
-            $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
38
-            fwrite($completed, $CurrentFileNumber);
39
-        }
40
-    }
32
+	public function tearDown()
33
+	{
34
+		if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
35
+			//write current file number to completed.txt
36
+			$CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
37
+			$completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
38
+			fwrite($completed, $CurrentFileNumber);
39
+		}
40
+	}
41 41
 }
42 42
 ?>
43 43
\ 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
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
         $this->waitForPageLoadAndCheckForErrors();
27 27
         $this->url(self::GDTEST_BASE_URL.'author/admin/?geodir_dashbord=true&stype=gd_place&list=favourite');
28 28
         $this->waitForPageLoadAndCheckForErrors();
29
-        $this->assertTrue( $this->isTextPresent("Favorite Places"), "Not in Favourites page");
29
+        $this->assertTrue($this->isTextPresent("Favorite Places"), "Not in Favourites page");
30 30
     }
31 31
 
32 32
     public function tearDown()
Please login to merge, or discard this patch.
tests/selenium/stest-30_Google_Analytics.php 1 patch
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -1,44 +1,44 @@
 block discarded – undo
1 1
 <?php
2 2
 class GoogleAnalytics 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 testGoogleAnalytics()
18
-    {
19
-        $this->logInfo('Testing google analytics......');
20
-        //make sure Google Analytics Authorized
21
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=general_settings');
22
-        $this->waitForPageLoadAndCheckForErrors();
23
-        $this->byLinkText('Google Analytics')->click();
17
+	public function testGoogleAnalytics()
18
+	{
19
+		$this->logInfo('Testing google analytics......');
20
+		//make sure Google Analytics Authorized
21
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=general_settings');
22
+		$this->waitForPageLoadAndCheckForErrors();
23
+		$this->byLinkText('Google Analytics')->click();
24 24
 
25
-        $value = $this->byId('geodir_ga_id')->value();
26
-        if (empty($value)) {
27
-            echo "Google Analytics not configured";
28
-        }
25
+		$value = $this->byId('geodir_ga_id')->value();
26
+		if (empty($value)) {
27
+			echo "Google Analytics not configured";
28
+		}
29 29
 
30
-        $this->url(self::GDTEST_BASE_URL.'places/united-states/new-york/new-york/attractions/franklin-square/');
31
-        $this->waitForPageLoadAndCheckForErrors();
32
-    }
30
+		$this->url(self::GDTEST_BASE_URL.'places/united-states/new-york/new-york/attractions/franklin-square/');
31
+		$this->waitForPageLoadAndCheckForErrors();
32
+	}
33 33
 
34
-    public function tearDown()
35
-    {
36
-        if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
37
-            //write current file number to completed.txt
38
-            $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
39
-            $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
40
-            fwrite($completed, $CurrentFileNumber);
41
-        }
42
-    }
34
+	public function tearDown()
35
+	{
36
+		if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
37
+			//write current file number to completed.txt
38
+			$CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
39
+			$completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
40
+			fwrite($completed, $CurrentFileNumber);
41
+		}
42
+	}
43 43
 }
44 44
 ?>
45 45
\ No newline at end of file
Please login to merge, or discard this patch.
tests/selenium/stest-35_Create_New_CPT.php 2 patches
Indentation   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -1,65 +1,65 @@
 block discarded – undo
1 1
 <?php
2 2
 class CreateNewCPT 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 testCreateNewCPT()
18
-    {
19
-        $this->logInfo('Testing new CPT......');
20
-        //make sure custom post types plugin active
21
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
22
-        $this->waitForPageLoadAndCheckForErrors();
17
+	public function testCreateNewCPT()
18
+	{
19
+		$this->logInfo('Testing new CPT......');
20
+		//make sure custom post types plugin active
21
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
22
+		$this->waitForPageLoadAndCheckForErrors();
23 23
 
24
-        $is_active = $this->byId("geodirectory-custom-post-types")->attribute('class');
25
-        if (is_int(strpos($is_active, 'inactive'))) {
26
-            //Activate Geodirectory Custom Post Types
27
-            $this->maybeActivatePlugin("geodirectory-custom-post-types", 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-custom-post-types")->attribute('class');
25
+		if (is_int(strpos($is_active, 'inactive'))) {
26
+			//Activate Geodirectory Custom Post Types
27
+			$this->maybeActivatePlugin("geodirectory-custom-post-types", 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-custom-post-types")->attribute('class');
33
-        $this->assertFalse( strpos($is_active1, 'inactive'), "Custom Post Types plugin not active");
32
+		$is_active1 = $this->byId("geodirectory-custom-post-types")->attribute('class');
33
+		$this->assertFalse( strpos($is_active1, 'inactive'), "Custom Post Types plugin not active");
34 34
 
35 35
 
36
-        $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=geodir_manage_custom_posts');
37
-        $this->waitForPageLoadAndCheckForErrors();
38
-        if ($this->isTextPresent("gd_hotel")) {
39
-            echo "Hotel post type already found. Please delete it first";
40
-            return;
41
-        }
36
+		$this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=geodir_manage_custom_posts');
37
+		$this->waitForPageLoadAndCheckForErrors();
38
+		if ($this->isTextPresent("gd_hotel")) {
39
+			echo "Hotel post type already found. Please delete it first";
40
+			return;
41
+		}
42 42
 
43
-        $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=geodir_manage_custom_posts&action=cp_addedit');
44
-        $this->waitForPageLoadAndCheckForErrors();
45
-        $this->assertTrue( $this->isTextPresent("Post Type"), "Post Type text not found");
46
-        $this->byId('geodir_custom_post_type')->value('hotel');
47
-        $this->byId('geodir_listing_slug')->value('hotels');
48
-        $this->byId('geodir_listing_order')->value('10');
49
-        $this->byId('geodir_name')->value('Hotels');
50
-        $this->byId('geodir_singular_name')->value('Hotel');
51
-        $this->byName('geodir_save_post_type')->click();
52
-        $this->waitForPageLoadAndCheckForErrors();
53
-    }
43
+		$this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=geodir_manage_custom_posts&action=cp_addedit');
44
+		$this->waitForPageLoadAndCheckForErrors();
45
+		$this->assertTrue( $this->isTextPresent("Post Type"), "Post Type text not found");
46
+		$this->byId('geodir_custom_post_type')->value('hotel');
47
+		$this->byId('geodir_listing_slug')->value('hotels');
48
+		$this->byId('geodir_listing_order')->value('10');
49
+		$this->byId('geodir_name')->value('Hotels');
50
+		$this->byId('geodir_singular_name')->value('Hotel');
51
+		$this->byName('geodir_save_post_type')->click();
52
+		$this->waitForPageLoadAndCheckForErrors();
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
\ 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-custom-post-types")->attribute('class');
33
-        $this->assertFalse( strpos($is_active1, 'inactive'), "Custom Post Types plugin not active");
33
+        $this->assertFalse(strpos($is_active1, 'inactive'), "Custom Post Types plugin not active");
34 34
 
35 35
 
36 36
         $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=geodir_manage_custom_posts');
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
         $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=geodir_manage_custom_posts&action=cp_addedit');
44 44
         $this->waitForPageLoadAndCheckForErrors();
45
-        $this->assertTrue( $this->isTextPresent("Post Type"), "Post Type text not found");
45
+        $this->assertTrue($this->isTextPresent("Post Type"), "Post Type text not found");
46 46
         $this->byId('geodir_custom_post_type')->value('hotel');
47 47
         $this->byId('geodir_listing_slug')->value('hotels');
48 48
         $this->byId('geodir_listing_order')->value('10');
Please login to merge, or discard this patch.