Test Failed
Pull Request — master (#348)
by Viruthagiri
21:56
created
tests/selenium/base.php 3 patches
Doc Comments   +22 added lines patch added patch discarded remove patch
@@ -10,6 +10,9 @@  discard block
 block discarded – undo
10 10
         $this->setBrowserUrl(self::GDTEST_BASE_URL);
11 11
     }
12 12
 
13
+    /**
14
+     * @param string $search
15
+     */
13 16
     function isTextPresent($search)
14 17
     {
15 18
         $source = $this->source();
@@ -62,6 +65,9 @@  discard block
 block discarded – undo
62 65
         }
63 66
     }
64 67
 
68
+    /**
69
+     * @param string $redirect
70
+     */
65 71
     function maybeUserLogin($redirect, $force=false) {
66 72
         if ($force) {
67 73
             $this->url(self::GDTEST_BASE_URL.'wp-admin/');
@@ -87,6 +93,9 @@  discard block
 block discarded – undo
87 93
         }
88 94
     }
89 95
 
96
+    /**
97
+     * @param string $redirect
98
+     */
90 99
     function maybeAdminLogin($redirect) {
91 100
         $this->url($redirect);
92 101
         $this->waitForPageLoadAndCheckForErrors();
@@ -121,6 +130,9 @@  discard block
 block discarded – undo
121 130
         return $exists;
122 131
     }
123 132
 
133
+    /**
134
+     * @param string $script
135
+     */
124 136
     function ExecuteScript($script, $args=array()) {
125 137
         $this->execute( array(
126 138
             'script' => $script ,
@@ -133,10 +145,16 @@  discard block
 block discarded – undo
133 145
         $this->ExecuteScript('jQuery("#wpadminbar").hide();');
134 146
     }
135 147
 
148
+    /**
149
+     * @param string $string
150
+     */
136 151
     function logInfo($string) {
137 152
         fwrite(STDOUT, "Info: ".$string . PHP_EOL);
138 153
     }
139 154
 
155
+    /**
156
+     * @param string $string
157
+     */
140 158
     function logError($string) {
141 159
         fwrite(STDOUT, "Error: ".$string . PHP_EOL);
142 160
     }
@@ -157,6 +175,10 @@  discard block
 block discarded – undo
157 175
         return (int) $content;
158 176
     }
159 177
 
178
+    /**
179
+     * @param integer $current
180
+     * @param integer $completed
181
+     */
160 182
     function skipTest($current, $completed) {
161 183
         if ($completed == 0 || $completed == 42 || $current == $completed) {
162 184
             return false;
Please login to merge, or discard this patch.
Indentation   +191 added lines, -191 removed lines patch added patch discarded remove patch
@@ -1,199 +1,199 @@
 block discarded – undo
1 1
 <?php
2 2
 class GD_Test extends PHPUnit_Extensions_Selenium2TestCase {
3 3
 
4
-    const GDTEST_BASE_URL = 'http://www.test.ci/selpress/';
5
-
6
-    public function setUp()
7
-    {
8
-        $this->setSeleniumServerRequestsTimeout(300);
9
-        $this->setBrowser('firefox');
10
-        $this->setBrowserUrl(self::GDTEST_BASE_URL);
11
-    }
12
-
13
-    function isTextPresent($search)
14
-    {
15
-        $source = $this->source();
16
-        if ( strpos((string)$source,$search) !== FALSE) {
17
-            return true;
18
-        } else {
19
-            return false;
20
-        }
21
-    }
22
-
23
-    function randomEmailID()
24
-    {
25
-        return md5(uniqid(rand(), true)).'@gmail.com';
26
-    }
27
-
28
-    function waitForPageLoadAndCheckForErrors($timeout=10000)
29
-    {
30
-        // Wait 10 seconds
31
-        $this->timeouts()->implicitWait($timeout);
32
-        $this->checkForErrors();
33
-        $this->checkForJsErrors();
34
-    }
35
-
36
-    function checkForErrors()
37
-    {
38
-        $elements = $this->elements($this->using('css selector')->value('.xdebug-error'));
39
-        if ($elements) {
40
-            $total = count($elements);
41
-            fwrite(STDOUT, $total.' errors found'. PHP_EOL);
42
-            $count = 0;
43
-            foreach ($elements as $i => $element) {
44
-                $count++;
45
-                if ($errors = $element->attribute('innerHTML')) {
46
-                    fwrite(STDOUT, "========================================================================". PHP_EOL);
47
-                    fwrite(STDOUT, strip_tags($errors). PHP_EOL);
48
-                    if ($count == $total) {
49
-                        fwrite(STDOUT, "========================================================================". PHP_EOL);
50
-                    }
51
-                }
52
-            }
53
-        }
54
-    }
55
-
56
-    function checkForJsErrors() {
57
-        if ($this->isElementExists('sel_js_error')) {
58
-            fwrite(STDOUT, 'Javascript errors found'. PHP_EOL);
59
-            fwrite(STDOUT, "========================================================================". PHP_EOL);
60
-            echo $this->byId('sel_js_error')->attribute('innerHTML');
61
-            fwrite(STDOUT, "========================================================================". PHP_EOL);
62
-        }
63
-    }
64
-
65
-    function maybeUserLogin($redirect, $force=false) {
66
-        if ($force) {
67
-            $this->url(self::GDTEST_BASE_URL.'wp-admin/');
68
-            if ($this->isTextPresent("forgetmenot")) {
69
-                $this->byId('user_login')->value('[email protected]');
70
-                $this->byId('user_pass')->value('1');
4
+	const GDTEST_BASE_URL = 'http://www.test.ci/selpress/';
5
+
6
+	public function setUp()
7
+	{
8
+		$this->setSeleniumServerRequestsTimeout(300);
9
+		$this->setBrowser('firefox');
10
+		$this->setBrowserUrl(self::GDTEST_BASE_URL);
11
+	}
12
+
13
+	function isTextPresent($search)
14
+	{
15
+		$source = $this->source();
16
+		if ( strpos((string)$source,$search) !== FALSE) {
17
+			return true;
18
+		} else {
19
+			return false;
20
+		}
21
+	}
22
+
23
+	function randomEmailID()
24
+	{
25
+		return md5(uniqid(rand(), true)).'@gmail.com';
26
+	}
27
+
28
+	function waitForPageLoadAndCheckForErrors($timeout=10000)
29
+	{
30
+		// Wait 10 seconds
31
+		$this->timeouts()->implicitWait($timeout);
32
+		$this->checkForErrors();
33
+		$this->checkForJsErrors();
34
+	}
35
+
36
+	function checkForErrors()
37
+	{
38
+		$elements = $this->elements($this->using('css selector')->value('.xdebug-error'));
39
+		if ($elements) {
40
+			$total = count($elements);
41
+			fwrite(STDOUT, $total.' errors found'. PHP_EOL);
42
+			$count = 0;
43
+			foreach ($elements as $i => $element) {
44
+				$count++;
45
+				if ($errors = $element->attribute('innerHTML')) {
46
+					fwrite(STDOUT, "========================================================================". PHP_EOL);
47
+					fwrite(STDOUT, strip_tags($errors). PHP_EOL);
48
+					if ($count == $total) {
49
+						fwrite(STDOUT, "========================================================================". PHP_EOL);
50
+					}
51
+				}
52
+			}
53
+		}
54
+	}
55
+
56
+	function checkForJsErrors() {
57
+		if ($this->isElementExists('sel_js_error')) {
58
+			fwrite(STDOUT, 'Javascript errors found'. PHP_EOL);
59
+			fwrite(STDOUT, "========================================================================". PHP_EOL);
60
+			echo $this->byId('sel_js_error')->attribute('innerHTML');
61
+			fwrite(STDOUT, "========================================================================". PHP_EOL);
62
+		}
63
+	}
64
+
65
+	function maybeUserLogin($redirect, $force=false) {
66
+		if ($force) {
67
+			$this->url(self::GDTEST_BASE_URL.'wp-admin/');
68
+			if ($this->isTextPresent("forgetmenot")) {
69
+				$this->byId('user_login')->value('[email protected]');
70
+				$this->byId('user_pass')->value('1');
71 71
 //                $this->byId('rememberme')->click();
72
-                // Submit the form
73
-                $this->byId('wp-submit')->submit();
74
-                $this->waitForPageLoadAndCheckForErrors();
75
-            }
76
-        }
77
-        $this->url($redirect);
78
-        $this->waitForPageLoadAndCheckForErrors();
79
-        if ($this->isTextPresent("Sign In")) {
80
-            $this->byId('user_login')->value('[email protected]');
81
-            $this->byId('user_pass')->value('1');
72
+				// Submit the form
73
+				$this->byId('wp-submit')->submit();
74
+				$this->waitForPageLoadAndCheckForErrors();
75
+			}
76
+		}
77
+		$this->url($redirect);
78
+		$this->waitForPageLoadAndCheckForErrors();
79
+		if ($this->isTextPresent("Sign In")) {
80
+			$this->byId('user_login')->value('[email protected]');
81
+			$this->byId('user_pass')->value('1');
82 82
 //            $this->byId('rememberme')->click();
83
-            // Submit the form
84
-            $this->byId('cus_loginform')->submit();
85
-            $this->waitForPageLoadAndCheckForErrors();
86
-            $this->url($redirect);
87
-        }
88
-    }
89
-
90
-    function maybeAdminLogin($redirect) {
91
-        $this->url($redirect);
92
-        $this->waitForPageLoadAndCheckForErrors();
93
-        if ($this->isTextPresent("forgetmenot")) {
94
-            $this->byId('user_login')->value('admin');
95
-            $this->byId('user_pass')->value('admin');
83
+			// Submit the form
84
+			$this->byId('cus_loginform')->submit();
85
+			$this->waitForPageLoadAndCheckForErrors();
86
+			$this->url($redirect);
87
+		}
88
+	}
89
+
90
+	function maybeAdminLogin($redirect) {
91
+		$this->url($redirect);
92
+		$this->waitForPageLoadAndCheckForErrors();
93
+		if ($this->isTextPresent("forgetmenot")) {
94
+			$this->byId('user_login')->value('admin');
95
+			$this->byId('user_pass')->value('admin');
96 96
 //            $this->byId('rememberme')->click();
97
-            // Submit the form
98
-            $this->byId('wp-submit')->submit();
99
-            $this->waitForPageLoadAndCheckForErrors();
100
-            $this->url($redirect);
101
-        }
102
-    }
103
-
104
-    function isElementExists($id = false, $by = 'id') {
105
-        if (!$id) {
106
-            return false;
107
-        }
108
-        $exists = true;
109
-        try {
110
-            if ($by == 'id') {
111
-                $this->byId($id);
112
-            } elseif ($by == 'xpath') {
113
-                $this->byXPath($id);
114
-            }
115
-
116
-        } catch (PHPUnit_Extensions_Selenium2TestCase_WebDriverException $e) {
117
-            if (PHPUnit_Extensions_Selenium2TestCase_WebDriverException::NoSuchElement == $e->getCode()) {
118
-                $exists = false;
119
-            }
120
-        }
121
-        return $exists;
122
-    }
123
-
124
-    function ExecuteScript($script, $args=array()) {
125
-        $this->execute( array(
126
-            'script' => $script ,
127
-            'args'=>$args
128
-        ) );
129
-    }
130
-
131
-    function hideAdminBar() {
132
-        //admin bar causes problem with scroll. So hide admin bar while testing.
133
-        $this->ExecuteScript('jQuery("#wpadminbar").hide();');
134
-    }
135
-
136
-    function logInfo($string) {
137
-        fwrite(STDOUT, "Info: ".$string . PHP_EOL);
138
-    }
139
-
140
-    function logError($string) {
141
-        fwrite(STDOUT, "Error: ".$string . PHP_EOL);
142
-    }
143
-
144
-    function logWarning($string) {
145
-        fwrite(STDOUT, "Warning: ".$string . PHP_EOL);
146
-    }
147
-
148
-    function getCurrentFileNumber($file) {
149
-        preg_match('/test-([0-9]+)_/', $file, $match);
150
-        return (int) $match[1];
151
-    }
152
-
153
-    function getCompletedFileNumber() {
154
-        $completed = fopen("tests/selenium/completed.txt", "r") or die("Unable to open file!");
155
-        $content = fgets($completed);
156
-        fclose($completed);
157
-        return (int) $content;
158
-    }
159
-
160
-    function skipTest($current, $completed) {
161
-        if ($completed == 0 || $completed == 42 || $current == $completed) {
162
-            return false;
163
-        } elseif ($current < $completed) {
164
-            return true;
165
-        } else {
166
-            return false;
167
-        }
168
-    }
169
-
170
-    function maybeLogout() {
171
-        $this->url(self::GDTEST_BASE_URL);
172
-        $this->byXPath("//*[@id='gd-sidebar-wrapper']//ul[@class='geodir-loginbox-list']//a[@class='signin']")->click();
173
-        $this->waitForPageLoadAndCheckForErrors();
174
-    }
175
-
176
-    function maybeAdminLogout() {
177
-        $this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
178
-        $this->ExecuteScript('jQuery("#wp-admin-bar-my-account").addClass("hover");');
179
-        $this->byXPath("//*[@id='wp-admin-bar-logout']//a")->click();
180
-        $this->waitForPageLoadAndCheckForErrors();
181
-    }
182
-
183
-    function maybeActivatePlugin($id=false, $timeout=10000) {
184
-        if (!$id) {
185
-            return;
186
-        }
187
-        $plugin_name = ucwords(str_replace('-', ' ', $id));
188
-        $this->logInfo('Activating '.$plugin_name.' plugin......');
189
-        $this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
190
-        $this->waitForPageLoadAndCheckForErrors();
191
-        $this->hideAdminBar();
192
-        if (is_int(strpos($this->byId($id)->attribute('class'), 'inactive'))) {
193
-            $this->byXPath("//tr[@id='".$id."']//span[@class='activate']/a")->click();
194
-        }
195
-        $this->waitForPageLoadAndCheckForErrors($timeout);
196
-        $this->logInfo($plugin_name.' activated......');
197
-    }
97
+			// Submit the form
98
+			$this->byId('wp-submit')->submit();
99
+			$this->waitForPageLoadAndCheckForErrors();
100
+			$this->url($redirect);
101
+		}
102
+	}
103
+
104
+	function isElementExists($id = false, $by = 'id') {
105
+		if (!$id) {
106
+			return false;
107
+		}
108
+		$exists = true;
109
+		try {
110
+			if ($by == 'id') {
111
+				$this->byId($id);
112
+			} elseif ($by == 'xpath') {
113
+				$this->byXPath($id);
114
+			}
115
+
116
+		} catch (PHPUnit_Extensions_Selenium2TestCase_WebDriverException $e) {
117
+			if (PHPUnit_Extensions_Selenium2TestCase_WebDriverException::NoSuchElement == $e->getCode()) {
118
+				$exists = false;
119
+			}
120
+		}
121
+		return $exists;
122
+	}
123
+
124
+	function ExecuteScript($script, $args=array()) {
125
+		$this->execute( array(
126
+			'script' => $script ,
127
+			'args'=>$args
128
+		) );
129
+	}
130
+
131
+	function hideAdminBar() {
132
+		//admin bar causes problem with scroll. So hide admin bar while testing.
133
+		$this->ExecuteScript('jQuery("#wpadminbar").hide();');
134
+	}
135
+
136
+	function logInfo($string) {
137
+		fwrite(STDOUT, "Info: ".$string . PHP_EOL);
138
+	}
139
+
140
+	function logError($string) {
141
+		fwrite(STDOUT, "Error: ".$string . PHP_EOL);
142
+	}
143
+
144
+	function logWarning($string) {
145
+		fwrite(STDOUT, "Warning: ".$string . PHP_EOL);
146
+	}
147
+
148
+	function getCurrentFileNumber($file) {
149
+		preg_match('/test-([0-9]+)_/', $file, $match);
150
+		return (int) $match[1];
151
+	}
152
+
153
+	function getCompletedFileNumber() {
154
+		$completed = fopen("tests/selenium/completed.txt", "r") or die("Unable to open file!");
155
+		$content = fgets($completed);
156
+		fclose($completed);
157
+		return (int) $content;
158
+	}
159
+
160
+	function skipTest($current, $completed) {
161
+		if ($completed == 0 || $completed == 42 || $current == $completed) {
162
+			return false;
163
+		} elseif ($current < $completed) {
164
+			return true;
165
+		} else {
166
+			return false;
167
+		}
168
+	}
169
+
170
+	function maybeLogout() {
171
+		$this->url(self::GDTEST_BASE_URL);
172
+		$this->byXPath("//*[@id='gd-sidebar-wrapper']//ul[@class='geodir-loginbox-list']//a[@class='signin']")->click();
173
+		$this->waitForPageLoadAndCheckForErrors();
174
+	}
175
+
176
+	function maybeAdminLogout() {
177
+		$this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
178
+		$this->ExecuteScript('jQuery("#wp-admin-bar-my-account").addClass("hover");');
179
+		$this->byXPath("//*[@id='wp-admin-bar-logout']//a")->click();
180
+		$this->waitForPageLoadAndCheckForErrors();
181
+	}
182
+
183
+	function maybeActivatePlugin($id=false, $timeout=10000) {
184
+		if (!$id) {
185
+			return;
186
+		}
187
+		$plugin_name = ucwords(str_replace('-', ' ', $id));
188
+		$this->logInfo('Activating '.$plugin_name.' plugin......');
189
+		$this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
190
+		$this->waitForPageLoadAndCheckForErrors();
191
+		$this->hideAdminBar();
192
+		if (is_int(strpos($this->byId($id)->attribute('class'), 'inactive'))) {
193
+			$this->byXPath("//tr[@id='".$id."']//span[@class='activate']/a")->click();
194
+		}
195
+		$this->waitForPageLoadAndCheckForErrors($timeout);
196
+		$this->logInfo($plugin_name.' activated......');
197
+	}
198 198
 
199 199
 }
200 200
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
     function isTextPresent($search)
14 14
     {
15 15
         $source = $this->source();
16
-        if ( strpos((string)$source,$search) !== FALSE) {
16
+        if (strpos((string) $source, $search) !== FALSE) {
17 17
             return true;
18 18
         } else {
19 19
             return false;
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
         return md5(uniqid(rand(), true)).'@gmail.com';
26 26
     }
27 27
 
28
-    function waitForPageLoadAndCheckForErrors($timeout=10000)
28
+    function waitForPageLoadAndCheckForErrors($timeout = 10000)
29 29
     {
30 30
         // Wait 10 seconds
31 31
         $this->timeouts()->implicitWait($timeout);
@@ -38,15 +38,15 @@  discard block
 block discarded – undo
38 38
         $elements = $this->elements($this->using('css selector')->value('.xdebug-error'));
39 39
         if ($elements) {
40 40
             $total = count($elements);
41
-            fwrite(STDOUT, $total.' errors found'. PHP_EOL);
41
+            fwrite(STDOUT, $total.' errors found'.PHP_EOL);
42 42
             $count = 0;
43 43
             foreach ($elements as $i => $element) {
44 44
                 $count++;
45 45
                 if ($errors = $element->attribute('innerHTML')) {
46
-                    fwrite(STDOUT, "========================================================================". PHP_EOL);
47
-                    fwrite(STDOUT, strip_tags($errors). PHP_EOL);
46
+                    fwrite(STDOUT, "========================================================================".PHP_EOL);
47
+                    fwrite(STDOUT, strip_tags($errors).PHP_EOL);
48 48
                     if ($count == $total) {
49
-                        fwrite(STDOUT, "========================================================================". PHP_EOL);
49
+                        fwrite(STDOUT, "========================================================================".PHP_EOL);
50 50
                     }
51 51
                 }
52 52
             }
@@ -55,14 +55,14 @@  discard block
 block discarded – undo
55 55
 
56 56
     function checkForJsErrors() {
57 57
         if ($this->isElementExists('sel_js_error')) {
58
-            fwrite(STDOUT, 'Javascript errors found'. PHP_EOL);
59
-            fwrite(STDOUT, "========================================================================". PHP_EOL);
58
+            fwrite(STDOUT, 'Javascript errors found'.PHP_EOL);
59
+            fwrite(STDOUT, "========================================================================".PHP_EOL);
60 60
             echo $this->byId('sel_js_error')->attribute('innerHTML');
61
-            fwrite(STDOUT, "========================================================================". PHP_EOL);
61
+            fwrite(STDOUT, "========================================================================".PHP_EOL);
62 62
         }
63 63
     }
64 64
 
65
-    function maybeUserLogin($redirect, $force=false) {
65
+    function maybeUserLogin($redirect, $force = false) {
66 66
         if ($force) {
67 67
             $this->url(self::GDTEST_BASE_URL.'wp-admin/');
68 68
             if ($this->isTextPresent("forgetmenot")) {
@@ -121,11 +121,11 @@  discard block
 block discarded – undo
121 121
         return $exists;
122 122
     }
123 123
 
124
-    function ExecuteScript($script, $args=array()) {
125
-        $this->execute( array(
126
-            'script' => $script ,
124
+    function ExecuteScript($script, $args = array()) {
125
+        $this->execute(array(
126
+            'script' => $script,
127 127
             'args'=>$args
128
-        ) );
128
+        ));
129 129
     }
130 130
 
131 131
     function hideAdminBar() {
@@ -134,15 +134,15 @@  discard block
 block discarded – undo
134 134
     }
135 135
 
136 136
     function logInfo($string) {
137
-        fwrite(STDOUT, "Info: ".$string . PHP_EOL);
137
+        fwrite(STDOUT, "Info: ".$string.PHP_EOL);
138 138
     }
139 139
 
140 140
     function logError($string) {
141
-        fwrite(STDOUT, "Error: ".$string . PHP_EOL);
141
+        fwrite(STDOUT, "Error: ".$string.PHP_EOL);
142 142
     }
143 143
 
144 144
     function logWarning($string) {
145
-        fwrite(STDOUT, "Warning: ".$string . PHP_EOL);
145
+        fwrite(STDOUT, "Warning: ".$string.PHP_EOL);
146 146
     }
147 147
 
148 148
     function getCurrentFileNumber($file) {
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
         $this->waitForPageLoadAndCheckForErrors();
181 181
     }
182 182
 
183
-    function maybeActivatePlugin($id=false, $timeout=10000) {
183
+    function maybeActivatePlugin($id = false, $timeout = 10000) {
184 184
         if (!$id) {
185 185
             return;
186 186
         }
Please login to merge, or discard this patch.
geodirectory-admin/option-pages/notifications_settings_array.php 2 patches
Indentation   +291 added lines, -291 removed lines patch added patch discarded remove patch
@@ -17,296 +17,296 @@
 block discarded – undo
17 17
 $geodir_settings['notifications_settings'] = apply_filters('geodir_notifications_settings', array(
18 18
 
19 19
 
20
-    array('name' => __('Options', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'notification_options'),
21
-
22
-
23
-    array('name' => __('Notification Options', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'notification_options'),
24
-
25
-    array(
26
-        'name' => __('List of usable shortcodes', 'geodirectory'),
27
-        'desc' => __('[#client_name#],[#listing_link#],[#posted_date#],[#number_of_days#],[#number_of_grace_days#],[#login_url#],[#username#],[#user_email#],[#site_name_url#],[#renew_link#],[#post_id#],[#site_name#],[#from_email#](in most cases this will be the admin email, except for popup forms)', 'geodirectory'),
28
-        'id' => 'geodir_list_of_usable_shordcodes',
29
-        'type' => 'html_content',
30
-        'css' => 'min-width:300px;',
31
-        'std' => 'All Places' // Default value for the page title - changed in settings
32
-    ),
33
-
34
-    array(
35
-        'name' => __('Use advanced editor? (slow loading)', 'geodirectory'),
36
-        'desc' => __('Yes', 'geodirectory'),
37
-        'id' => 'geodir_tiny_editor',
38
-        'std' => 'yes',
39
-        'type' => 'radio',
40
-        'value' => '1',
41
-        'radiogroup' => 'start'
42
-    ),
43
-    array(
44
-        'name' => __('Use advanced editor?(slow loading)', 'geodirectory'),
45
-        'desc' => __('No', 'geodirectory'),
46
-        'id' => 'geodir_tiny_editor',
47
-        'std' => 'yes',
48
-        'type' => 'radio',
49
-        'value' => '0',
50
-        'radiogroup' => 'end'
51
-    ),
52
-
53
-
54
-    array('type' => 'sectionend', 'id' => 'notification_options'),
55
-
56
-
57
-    array('name' => __('Site Bcc Options', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'site_bcc_options'),
58
-
59
-    array('name' => __('Site Bcc Options', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'site_bcc_options'),
60
-
61
-    array(
62
-        'name' => __('New user registration', 'geodirectory'),
63
-        'desc' => __('Yes', 'geodirectory'),
64
-        'id' => 'geodir_bcc_new_user',
65
-        'std' => 'yes',
66
-        'type' => 'radio',
67
-        'value' => '1',
68
-        'radiogroup' => 'start'
69
-    ),
70
-    array(
71
-        'name' => __('New user registration', 'geodirectory'),
72
-        'desc' => __('No', 'geodirectory'),
73
-        'id' => 'geodir_bcc_new_user',
74
-        'std' => 'yes',
75
-        'type' => 'radio',
76
-        'value' => '0',
77
-        'radiogroup' => 'end'
78
-    ),
79
-
80
-    array(
81
-        'name' => __('Send to friend', 'geodirectory'),
82
-        'desc' => __('Yes', 'geodirectory'),
83
-        'id' => 'geodir_bcc_friend',
84
-        'std' => 'yes',
85
-        'type' => 'radio',
86
-        'value' => '1',
87
-        'radiogroup' => 'start'
88
-    ),
89
-    array(
90
-        'name' => __('Send to friend', 'geodirectory'),
91
-        'desc' => __('No', 'geodirectory'),
92
-        'id' => 'geodir_bcc_friend',
93
-        'std' => 'yes',
94
-        'type' => 'radio',
95
-        'value' => '0',
96
-        'radiogroup' => 'end'
97
-    ),
98
-
99
-    array(
100
-        'name' => __('Send enquiry', 'geodirectory'),
101
-        'desc' => __('Yes', 'geodirectory'),
102
-        'id' => 'geodir_bcc_enquiry',
103
-        'std' => 'yes',
104
-        'type' => 'radio',
105
-        'value' => '1',
106
-        'radiogroup' => 'start'
107
-    ),
108
-    array(
109
-        'name' => __('Send enquiry', 'geodirectory'),
110
-        'desc' => __('No', 'geodirectory'),
111
-        'id' => 'geodir_bcc_enquiry',
112
-        'std' => 'yes',
113
-        'type' => 'radio',
114
-        'value' => '0',
115
-        'radiogroup' => 'end'
116
-    ),
117
-
118
-
119
-    array('type' => 'sectionend', 'id' => 'site_bcc_options'),
120
-
121
-
122
-    array('name' => __('Admin Emails', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'admin_emails'),
123
-
124
-    array('name' => __('Admin Emails', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'admin_emails'),
125
-
126
-    array(
127
-        'name' => __('Post submit success to admin email', 'geodirectory'),
128
-        'desc' => '',
129
-        'id' => 'geodir_post_submited_success_email_subject_admin',
130
-        'type' => 'text',
131
-        'css' => 'min-width:300px;',
132
-        'std' => __('Post Submitted Successfully','geodirectory') // Default value for the page title - changed in settings
133
-    ),
134
-     array(
135
-        'name' => '',
136
-        'desc' => '',
137
-        'id' => 'geodir_post_submited_success_email_content_admin',
138
-        'css' => 'width:500px; height: 150px;',
139
-        'type' => 'textarea',
140
-        'std' => __('<p>Dear Admin,</p><p>A new  listing has been published [#listing_link#]. This email is just for your information.</p><br><p>[#site_name#]</p>','geodirectory')
141
-    ),
142
-    array(
143
-        'name' => __('Notify Admin when listing edited by Author', 'geodirectory'),
144
-        'desc' => __('Yes', 'geodirectory'),
145
-        'id' => 'geodir_notify_post_edited',
146
-        'std' => '0',
147
-        'type' => 'radio',
148
-        'value' => '1',
149
-        'radiogroup' => 'start'
150
-    ),
151
-    array(
152
-        'name' => __('Notify Admin when listing edited by Author', 'geodirectory'),
153
-        'desc' => __('No', 'geodirectory'),
154
-        'id' => 'geodir_notify_post_edited',
155
-        'std' => '0',
156
-        'type' => 'radio',
157
-        'value' => '0',
158
-        'radiogroup' => 'end'
159
-    ),
160
-    array(
161
-        'name' => __('Listing edited by Author', 'geodirectory'),
162
-        'desc' => '',
163
-        'id' => 'geodir_post_edited_email_subject_admin',
164
-        'type' => 'text',
165
-        'css' => 'min-width:300px;',
166
-        'std' => __('[[#site_name#]] Listing edited by Author', 'geodirectory')
167
-    ),
168
-    array(
169
-        'name' => '',
170
-        'desc' => '',
171
-        'id' => 'geodir_post_edited_email_content_admin',
172
-        'css' => 'width:500px; height: 150px;',
173
-        'type' => 'textarea',
174
-        'std' => __('<p>Dear Admin,</p><p>A listing [#listing_link#] has been edited by it\'s author [#post_author_name#].</p><br><p><b>Listing Details:</b></p><p>Listing ID: [#post_id#]</p><p>Listing URL: [#listing_link#]</p><p>Date: [#current_date#]</p><br><p>This email is just for your information.</p><p>[#site_name#]</p>', 'geodirectory')
175
-    ),
176
-
177
-
178
-    array('type' => 'sectionend', 'id' => 'admin_emails'),
179
-
180
-
181
-    array('name' => __('Client Emails', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'client_emails'),
182
-
183
-    array('name' => __('Client Emails', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'client_emails'),
184
-
185
-    array(
186
-        'name' => __('Post submit success to client email', 'geodirectory'),
187
-        'desc' => '',
188
-        'id' => 'geodir_post_submited_success_email_subject',
189
-        'type' => 'text',
190
-        'css' => 'min-width:300px;',
191
-        'std' => __('Post Submitted Successfully','geodirectory') // Default value for the page title - changed in settings
192
-    ),
193
-    array(
194
-        'name' => '',
195
-        'desc' => '',
196
-        'id' => 'geodir_post_submited_success_email_content',
197
-        'css' => 'width:500px; height: 150px;',
198
-        'type' => 'textarea',
199
-        'std' => __('<p>Dear [#client_name#],</p><p>You submitted the below listing information. This email is just for your information.</p><p>[#listing_link#]</p><br><p>Thank you for your contribution.</p><p>[#site_name#]</p>','geodirectory')
200
-    ),
201
-
202
-
203
-    array(
204
-        'name' => __('User forgot password email', 'geodirectory'),
205
-        'desc' => '',
206
-        'id' => 'geodir_forgot_password_subject',
207
-        'type' => 'text',
208
-        'css' => 'min-width:300px;',
209
-        'std' => __('[#site_name#] - Your new password', 'geodirectory') // Default value for the page title - changed in settings
210
-    ),
211
-    array(
212
-        'name' => '',
213
-        'desc' => '',
214
-        'id' => 'geodir_forgot_password_content',
215
-        'css' => 'width:500px; height: 150px;',
216
-        'type' => 'textarea',
217
-        'std' => __("<p>Dear [#client_name#],<p><p>You requested a new password for [#site_name_url#]</p><p>[#login_details#]</p><p>You can login here: [#login_url#]</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory')
218
-    ),
219
-
220
-    array(
221
-        'name' => __('Registration success email', 'geodirectory'),
222
-        'desc' => '',
223
-        'id' => 'geodir_registration_success_email_subject',
224
-        'type' => 'text',
225
-        'css' => 'min-width:300px;',
226
-        'std' => __('Your Log In Details', 'geodirectory') // Default value for the page title - changed in settings
227
-    ),
228
-    array(
229
-        'name' => '',
230
-        'desc' => '',
231
-        'id' => 'geodir_registration_success_email_content',
232
-        'css' => 'width:500px; height: 150px;',
233
-        'type' => 'textarea',
234
-        'std' => __("<p>Dear [#client_name#],</p><p>You can log in  with the following information:</p><p>[#login_details#]</p><p>You can login here: [#login_url#]</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory')
235
-    ),
236
-    array(
237
-        'name' => __('Listing published email', 'geodirectory'),
238
-        'desc' => '',
239
-        'id' => 'geodir_post_published_email_subject',
240
-        'type' => 'text',
241
-        'css' => 'min-width:300px;',
242
-        'std' => __('Listing Published Successfully', 'geodirectory') // Default value for the page title - changed in settings
243
-    ),
244
-    array(
245
-        'name' => '',
246
-        'desc' => '',
247
-        'id' => 'geodir_post_published_email_content',
248
-        'css' => 'width:500px; height: 150px;',
249
-        'type' => 'textarea',
250
-        'std' => __("<p>Dear [#client_name#],</p><p>Your listing [#listing_link#] has been published. This email is just for your information.</p><p>[#listing_link#]</p><br><p>Thank you for your contribution.</p><p>[#site_name#]</p>", 'geodirectory')
251
-    ),
252
-
253
-    array('type' => 'sectionend', 'id' => 'client_emails'),
254
-
255
-    array('name' => __('Other Emails', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'other_emails'),
256
-
257
-    array('name' => __('Other Emails', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'other_emails'),
258
-
259
-    array(
260
-        'name' => __('Send to friend', 'geodirectory'),
261
-        'desc' => '',
262
-        'id' => 'geodir_email_friend_subject',
263
-        'type' => 'text',
264
-        'css' => 'min-width:300px;',
265
-        'std' => __('[#from_name#] thought you might be interested in..', 'geodirectory')
266
-    ),
267
-    array(
268
-        'name' => '',
269
-        'desc' => '',
270
-        'id' => 'geodir_email_friend_content',
271
-        'css' => 'width:500px; height: 150px;',
272
-        'type' => 'textarea',
273
-        'std' => __("<p>Dear [#to_name#],<p><p>Your friend has sent you a message from <b>[#site_name#]</b> </p><p>===============================</p><p><b>Subject : [#subject#]</b></p><p>[#comments#] [#listing_link#]</p><p>===============================</p><p>Thank you,<br /><br />[#site_name#].</p>",'geodirectory')
274
-    ),
275
-
276
-    array(
277
-        'name' => __('Email enquiry', 'geodirectory'),
278
-        'desc' => '',
279
-        'id' => 'geodir_email_enquiry_subject',
280
-        'type' => 'text',
281
-        'css' => 'min-width:300px;',
282
-        'std' => __('Website Enquiry', 'geodirectory')
283
-    ),
284
-    array(
285
-        'name' => '',
286
-        'desc' => '',
287
-        'id' => 'geodir_email_enquiry_content',
288
-        'css' => 'width:500px; height: 150px;',
289
-        'type' => 'textarea',
290
-        'std' => __("<p>Dear [#to_name#],<p><p>An enquiry has been sent from <b>[#listing_link#]</b></p><p>===============================</p><p>[#comments#]</p><p>===============================</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory')
291
-    ),
292
-
293
-    array('type' => 'sectionend', 'id' => 'other_emails'),
294
-
295
-
296
-    array('name' => __('Messages', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'messages'),
297
-
298
-    array('name' => __('Messages', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'messages'),
299
-
300
-    array(
301
-        'name' => __('Post submitted success', 'geodirectory'),
302
-        'desc' => '',
303
-        'id' => 'geodir_post_added_success_msg_content',
304
-        'css' => 'width:500px; height: 150px;',
305
-        'type' => 'textarea',
306
-        'std' => __('<p>Thank you, your information has been successfully received.</p><p><a href="[#submited_information_link#]" >View your submitted information &raquo;</a></p><p>Thank you for visiting us at [#site_name#].</p>','geodirectory')
307
-    ),
308
-
309
-
310
-    array('type' => 'sectionend', 'id' => 'messages'),
20
+	array('name' => __('Options', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'notification_options'),
21
+
22
+
23
+	array('name' => __('Notification Options', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'notification_options'),
24
+
25
+	array(
26
+		'name' => __('List of usable shortcodes', 'geodirectory'),
27
+		'desc' => __('[#client_name#],[#listing_link#],[#posted_date#],[#number_of_days#],[#number_of_grace_days#],[#login_url#],[#username#],[#user_email#],[#site_name_url#],[#renew_link#],[#post_id#],[#site_name#],[#from_email#](in most cases this will be the admin email, except for popup forms)', 'geodirectory'),
28
+		'id' => 'geodir_list_of_usable_shordcodes',
29
+		'type' => 'html_content',
30
+		'css' => 'min-width:300px;',
31
+		'std' => 'All Places' // Default value for the page title - changed in settings
32
+	),
33
+
34
+	array(
35
+		'name' => __('Use advanced editor? (slow loading)', 'geodirectory'),
36
+		'desc' => __('Yes', 'geodirectory'),
37
+		'id' => 'geodir_tiny_editor',
38
+		'std' => 'yes',
39
+		'type' => 'radio',
40
+		'value' => '1',
41
+		'radiogroup' => 'start'
42
+	),
43
+	array(
44
+		'name' => __('Use advanced editor?(slow loading)', 'geodirectory'),
45
+		'desc' => __('No', 'geodirectory'),
46
+		'id' => 'geodir_tiny_editor',
47
+		'std' => 'yes',
48
+		'type' => 'radio',
49
+		'value' => '0',
50
+		'radiogroup' => 'end'
51
+	),
52
+
53
+
54
+	array('type' => 'sectionend', 'id' => 'notification_options'),
55
+
56
+
57
+	array('name' => __('Site Bcc Options', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'site_bcc_options'),
58
+
59
+	array('name' => __('Site Bcc Options', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'site_bcc_options'),
60
+
61
+	array(
62
+		'name' => __('New user registration', 'geodirectory'),
63
+		'desc' => __('Yes', 'geodirectory'),
64
+		'id' => 'geodir_bcc_new_user',
65
+		'std' => 'yes',
66
+		'type' => 'radio',
67
+		'value' => '1',
68
+		'radiogroup' => 'start'
69
+	),
70
+	array(
71
+		'name' => __('New user registration', 'geodirectory'),
72
+		'desc' => __('No', 'geodirectory'),
73
+		'id' => 'geodir_bcc_new_user',
74
+		'std' => 'yes',
75
+		'type' => 'radio',
76
+		'value' => '0',
77
+		'radiogroup' => 'end'
78
+	),
79
+
80
+	array(
81
+		'name' => __('Send to friend', 'geodirectory'),
82
+		'desc' => __('Yes', 'geodirectory'),
83
+		'id' => 'geodir_bcc_friend',
84
+		'std' => 'yes',
85
+		'type' => 'radio',
86
+		'value' => '1',
87
+		'radiogroup' => 'start'
88
+	),
89
+	array(
90
+		'name' => __('Send to friend', 'geodirectory'),
91
+		'desc' => __('No', 'geodirectory'),
92
+		'id' => 'geodir_bcc_friend',
93
+		'std' => 'yes',
94
+		'type' => 'radio',
95
+		'value' => '0',
96
+		'radiogroup' => 'end'
97
+	),
98
+
99
+	array(
100
+		'name' => __('Send enquiry', 'geodirectory'),
101
+		'desc' => __('Yes', 'geodirectory'),
102
+		'id' => 'geodir_bcc_enquiry',
103
+		'std' => 'yes',
104
+		'type' => 'radio',
105
+		'value' => '1',
106
+		'radiogroup' => 'start'
107
+	),
108
+	array(
109
+		'name' => __('Send enquiry', 'geodirectory'),
110
+		'desc' => __('No', 'geodirectory'),
111
+		'id' => 'geodir_bcc_enquiry',
112
+		'std' => 'yes',
113
+		'type' => 'radio',
114
+		'value' => '0',
115
+		'radiogroup' => 'end'
116
+	),
117
+
118
+
119
+	array('type' => 'sectionend', 'id' => 'site_bcc_options'),
120
+
121
+
122
+	array('name' => __('Admin Emails', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'admin_emails'),
123
+
124
+	array('name' => __('Admin Emails', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'admin_emails'),
125
+
126
+	array(
127
+		'name' => __('Post submit success to admin email', 'geodirectory'),
128
+		'desc' => '',
129
+		'id' => 'geodir_post_submited_success_email_subject_admin',
130
+		'type' => 'text',
131
+		'css' => 'min-width:300px;',
132
+		'std' => __('Post Submitted Successfully','geodirectory') // Default value for the page title - changed in settings
133
+	),
134
+	 array(
135
+		'name' => '',
136
+		'desc' => '',
137
+		'id' => 'geodir_post_submited_success_email_content_admin',
138
+		'css' => 'width:500px; height: 150px;',
139
+		'type' => 'textarea',
140
+		'std' => __('<p>Dear Admin,</p><p>A new  listing has been published [#listing_link#]. This email is just for your information.</p><br><p>[#site_name#]</p>','geodirectory')
141
+	),
142
+	array(
143
+		'name' => __('Notify Admin when listing edited by Author', 'geodirectory'),
144
+		'desc' => __('Yes', 'geodirectory'),
145
+		'id' => 'geodir_notify_post_edited',
146
+		'std' => '0',
147
+		'type' => 'radio',
148
+		'value' => '1',
149
+		'radiogroup' => 'start'
150
+	),
151
+	array(
152
+		'name' => __('Notify Admin when listing edited by Author', 'geodirectory'),
153
+		'desc' => __('No', 'geodirectory'),
154
+		'id' => 'geodir_notify_post_edited',
155
+		'std' => '0',
156
+		'type' => 'radio',
157
+		'value' => '0',
158
+		'radiogroup' => 'end'
159
+	),
160
+	array(
161
+		'name' => __('Listing edited by Author', 'geodirectory'),
162
+		'desc' => '',
163
+		'id' => 'geodir_post_edited_email_subject_admin',
164
+		'type' => 'text',
165
+		'css' => 'min-width:300px;',
166
+		'std' => __('[[#site_name#]] Listing edited by Author', 'geodirectory')
167
+	),
168
+	array(
169
+		'name' => '',
170
+		'desc' => '',
171
+		'id' => 'geodir_post_edited_email_content_admin',
172
+		'css' => 'width:500px; height: 150px;',
173
+		'type' => 'textarea',
174
+		'std' => __('<p>Dear Admin,</p><p>A listing [#listing_link#] has been edited by it\'s author [#post_author_name#].</p><br><p><b>Listing Details:</b></p><p>Listing ID: [#post_id#]</p><p>Listing URL: [#listing_link#]</p><p>Date: [#current_date#]</p><br><p>This email is just for your information.</p><p>[#site_name#]</p>', 'geodirectory')
175
+	),
176
+
177
+
178
+	array('type' => 'sectionend', 'id' => 'admin_emails'),
179
+
180
+
181
+	array('name' => __('Client Emails', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'client_emails'),
182
+
183
+	array('name' => __('Client Emails', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'client_emails'),
184
+
185
+	array(
186
+		'name' => __('Post submit success to client email', 'geodirectory'),
187
+		'desc' => '',
188
+		'id' => 'geodir_post_submited_success_email_subject',
189
+		'type' => 'text',
190
+		'css' => 'min-width:300px;',
191
+		'std' => __('Post Submitted Successfully','geodirectory') // Default value for the page title - changed in settings
192
+	),
193
+	array(
194
+		'name' => '',
195
+		'desc' => '',
196
+		'id' => 'geodir_post_submited_success_email_content',
197
+		'css' => 'width:500px; height: 150px;',
198
+		'type' => 'textarea',
199
+		'std' => __('<p>Dear [#client_name#],</p><p>You submitted the below listing information. This email is just for your information.</p><p>[#listing_link#]</p><br><p>Thank you for your contribution.</p><p>[#site_name#]</p>','geodirectory')
200
+	),
201
+
202
+
203
+	array(
204
+		'name' => __('User forgot password email', 'geodirectory'),
205
+		'desc' => '',
206
+		'id' => 'geodir_forgot_password_subject',
207
+		'type' => 'text',
208
+		'css' => 'min-width:300px;',
209
+		'std' => __('[#site_name#] - Your new password', 'geodirectory') // Default value for the page title - changed in settings
210
+	),
211
+	array(
212
+		'name' => '',
213
+		'desc' => '',
214
+		'id' => 'geodir_forgot_password_content',
215
+		'css' => 'width:500px; height: 150px;',
216
+		'type' => 'textarea',
217
+		'std' => __("<p>Dear [#client_name#],<p><p>You requested a new password for [#site_name_url#]</p><p>[#login_details#]</p><p>You can login here: [#login_url#]</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory')
218
+	),
219
+
220
+	array(
221
+		'name' => __('Registration success email', 'geodirectory'),
222
+		'desc' => '',
223
+		'id' => 'geodir_registration_success_email_subject',
224
+		'type' => 'text',
225
+		'css' => 'min-width:300px;',
226
+		'std' => __('Your Log In Details', 'geodirectory') // Default value for the page title - changed in settings
227
+	),
228
+	array(
229
+		'name' => '',
230
+		'desc' => '',
231
+		'id' => 'geodir_registration_success_email_content',
232
+		'css' => 'width:500px; height: 150px;',
233
+		'type' => 'textarea',
234
+		'std' => __("<p>Dear [#client_name#],</p><p>You can log in  with the following information:</p><p>[#login_details#]</p><p>You can login here: [#login_url#]</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory')
235
+	),
236
+	array(
237
+		'name' => __('Listing published email', 'geodirectory'),
238
+		'desc' => '',
239
+		'id' => 'geodir_post_published_email_subject',
240
+		'type' => 'text',
241
+		'css' => 'min-width:300px;',
242
+		'std' => __('Listing Published Successfully', 'geodirectory') // Default value for the page title - changed in settings
243
+	),
244
+	array(
245
+		'name' => '',
246
+		'desc' => '',
247
+		'id' => 'geodir_post_published_email_content',
248
+		'css' => 'width:500px; height: 150px;',
249
+		'type' => 'textarea',
250
+		'std' => __("<p>Dear [#client_name#],</p><p>Your listing [#listing_link#] has been published. This email is just for your information.</p><p>[#listing_link#]</p><br><p>Thank you for your contribution.</p><p>[#site_name#]</p>", 'geodirectory')
251
+	),
252
+
253
+	array('type' => 'sectionend', 'id' => 'client_emails'),
254
+
255
+	array('name' => __('Other Emails', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'other_emails'),
256
+
257
+	array('name' => __('Other Emails', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'other_emails'),
258
+
259
+	array(
260
+		'name' => __('Send to friend', 'geodirectory'),
261
+		'desc' => '',
262
+		'id' => 'geodir_email_friend_subject',
263
+		'type' => 'text',
264
+		'css' => 'min-width:300px;',
265
+		'std' => __('[#from_name#] thought you might be interested in..', 'geodirectory')
266
+	),
267
+	array(
268
+		'name' => '',
269
+		'desc' => '',
270
+		'id' => 'geodir_email_friend_content',
271
+		'css' => 'width:500px; height: 150px;',
272
+		'type' => 'textarea',
273
+		'std' => __("<p>Dear [#to_name#],<p><p>Your friend has sent you a message from <b>[#site_name#]</b> </p><p>===============================</p><p><b>Subject : [#subject#]</b></p><p>[#comments#] [#listing_link#]</p><p>===============================</p><p>Thank you,<br /><br />[#site_name#].</p>",'geodirectory')
274
+	),
275
+
276
+	array(
277
+		'name' => __('Email enquiry', 'geodirectory'),
278
+		'desc' => '',
279
+		'id' => 'geodir_email_enquiry_subject',
280
+		'type' => 'text',
281
+		'css' => 'min-width:300px;',
282
+		'std' => __('Website Enquiry', 'geodirectory')
283
+	),
284
+	array(
285
+		'name' => '',
286
+		'desc' => '',
287
+		'id' => 'geodir_email_enquiry_content',
288
+		'css' => 'width:500px; height: 150px;',
289
+		'type' => 'textarea',
290
+		'std' => __("<p>Dear [#to_name#],<p><p>An enquiry has been sent from <b>[#listing_link#]</b></p><p>===============================</p><p>[#comments#]</p><p>===============================</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory')
291
+	),
292
+
293
+	array('type' => 'sectionend', 'id' => 'other_emails'),
294
+
295
+
296
+	array('name' => __('Messages', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'messages'),
297
+
298
+	array('name' => __('Messages', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'messages'),
299
+
300
+	array(
301
+		'name' => __('Post submitted success', 'geodirectory'),
302
+		'desc' => '',
303
+		'id' => 'geodir_post_added_success_msg_content',
304
+		'css' => 'width:500px; height: 150px;',
305
+		'type' => 'textarea',
306
+		'std' => __('<p>Thank you, your information has been successfully received.</p><p><a href="[#submited_information_link#]" >View your submitted information &raquo;</a></p><p>Thank you for visiting us at [#site_name#].</p>','geodirectory')
307
+	),
308
+
309
+
310
+	array('type' => 'sectionend', 'id' => 'messages'),
311 311
 
312 312
 )); // End Manage NOtifications settings
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         'id' => 'geodir_post_submited_success_email_subject_admin',
130 130
         'type' => 'text',
131 131
         'css' => 'min-width:300px;',
132
-        'std' => __('Post Submitted Successfully','geodirectory') // Default value for the page title - changed in settings
132
+        'std' => __('Post Submitted Successfully', 'geodirectory') // Default value for the page title - changed in settings
133 133
     ),
134 134
      array(
135 135
         'name' => '',
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
         'id' => 'geodir_post_submited_success_email_content_admin',
138 138
         'css' => 'width:500px; height: 150px;',
139 139
         'type' => 'textarea',
140
-        'std' => __('<p>Dear Admin,</p><p>A new  listing has been published [#listing_link#]. This email is just for your information.</p><br><p>[#site_name#]</p>','geodirectory')
140
+        'std' => __('<p>Dear Admin,</p><p>A new  listing has been published [#listing_link#]. This email is just for your information.</p><br><p>[#site_name#]</p>', 'geodirectory')
141 141
     ),
142 142
     array(
143 143
         'name' => __('Notify Admin when listing edited by Author', 'geodirectory'),
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
         'id' => 'geodir_post_submited_success_email_subject',
189 189
         'type' => 'text',
190 190
         'css' => 'min-width:300px;',
191
-        'std' => __('Post Submitted Successfully','geodirectory') // Default value for the page title - changed in settings
191
+        'std' => __('Post Submitted Successfully', 'geodirectory') // Default value for the page title - changed in settings
192 192
     ),
193 193
     array(
194 194
         'name' => '',
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
         'id' => 'geodir_post_submited_success_email_content',
197 197
         'css' => 'width:500px; height: 150px;',
198 198
         'type' => 'textarea',
199
-        'std' => __('<p>Dear [#client_name#],</p><p>You submitted the below listing information. This email is just for your information.</p><p>[#listing_link#]</p><br><p>Thank you for your contribution.</p><p>[#site_name#]</p>','geodirectory')
199
+        'std' => __('<p>Dear [#client_name#],</p><p>You submitted the below listing information. This email is just for your information.</p><p>[#listing_link#]</p><br><p>Thank you for your contribution.</p><p>[#site_name#]</p>', 'geodirectory')
200 200
     ),
201 201
 
202 202
 
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
         'id' => 'geodir_forgot_password_content',
215 215
         'css' => 'width:500px; height: 150px;',
216 216
         'type' => 'textarea',
217
-        'std' => __("<p>Dear [#client_name#],<p><p>You requested a new password for [#site_name_url#]</p><p>[#login_details#]</p><p>You can login here: [#login_url#]</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory')
217
+        'std' => __("<p>Dear [#client_name#],<p><p>You requested a new password for [#site_name_url#]</p><p>[#login_details#]</p><p>You can login here: [#login_url#]</p><p>Thank you,<br /><br />[#site_name_url#].</p>", 'geodirectory')
218 218
     ),
219 219
 
220 220
     array(
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
         'id' => 'geodir_registration_success_email_content',
232 232
         'css' => 'width:500px; height: 150px;',
233 233
         'type' => 'textarea',
234
-        'std' => __("<p>Dear [#client_name#],</p><p>You can log in  with the following information:</p><p>[#login_details#]</p><p>You can login here: [#login_url#]</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory')
234
+        'std' => __("<p>Dear [#client_name#],</p><p>You can log in  with the following information:</p><p>[#login_details#]</p><p>You can login here: [#login_url#]</p><p>Thank you,<br /><br />[#site_name_url#].</p>", 'geodirectory')
235 235
     ),
236 236
     array(
237 237
         'name' => __('Listing published email', 'geodirectory'),
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
         'id' => 'geodir_email_friend_content',
271 271
         'css' => 'width:500px; height: 150px;',
272 272
         'type' => 'textarea',
273
-        'std' => __("<p>Dear [#to_name#],<p><p>Your friend has sent you a message from <b>[#site_name#]</b> </p><p>===============================</p><p><b>Subject : [#subject#]</b></p><p>[#comments#] [#listing_link#]</p><p>===============================</p><p>Thank you,<br /><br />[#site_name#].</p>",'geodirectory')
273
+        'std' => __("<p>Dear [#to_name#],<p><p>Your friend has sent you a message from <b>[#site_name#]</b> </p><p>===============================</p><p><b>Subject : [#subject#]</b></p><p>[#comments#] [#listing_link#]</p><p>===============================</p><p>Thank you,<br /><br />[#site_name#].</p>", 'geodirectory')
274 274
     ),
275 275
 
276 276
     array(
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
         'id' => 'geodir_email_enquiry_content',
288 288
         'css' => 'width:500px; height: 150px;',
289 289
         'type' => 'textarea',
290
-        'std' => __("<p>Dear [#to_name#],<p><p>An enquiry has been sent from <b>[#listing_link#]</b></p><p>===============================</p><p>[#comments#]</p><p>===============================</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory')
290
+        'std' => __("<p>Dear [#to_name#],<p><p>An enquiry has been sent from <b>[#listing_link#]</b></p><p>===============================</p><p>[#comments#]</p><p>===============================</p><p>Thank you,<br /><br />[#site_name_url#].</p>", 'geodirectory')
291 291
     ),
292 292
 
293 293
     array('type' => 'sectionend', 'id' => 'other_emails'),
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
         'id' => 'geodir_post_added_success_msg_content',
304 304
         'css' => 'width:500px; height: 150px;',
305 305
         'type' => 'textarea',
306
-        'std' => __('<p>Thank you, your information has been successfully received.</p><p><a href="[#submited_information_link#]" >View your submitted information &raquo;</a></p><p>Thank you for visiting us at [#site_name#].</p>','geodirectory')
306
+        'std' => __('<p>Thank you, your information has been successfully received.</p><p><a href="[#submited_information_link#]" >View your submitted information &raquo;</a></p><p>Thank you for visiting us at [#site_name#].</p>', 'geodirectory')
307 307
     ),
308 308
 
309 309
 
Please login to merge, or discard this patch.
tests/selenium/stest-13_Send_Enquiry.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 SendEnquiry 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 testSendEnquiry()
18
-    {
19
-        $this->logInfo('Send Enquiry......');
20
-        $this->url(self::GDTEST_BASE_URL.'places/united-states/new-york/new-york/attractions/test-listing/');
21
-        $this->waitForPageLoadAndCheckForErrors();
22
-        $this->byClassName('b_send_inquiry')->click();
23
-        $this->waitForPageLoadAndCheckForErrors();
24
-        $this->byName('inq_name')->value('Test User');
25
-        $this->byName('inq_email')->value('[email protected]');
26
-        $this->byId('agt_mail_phone')->value('44444444444');
27
-        $this->byName('Send')->click();
28
-        $this->waitForPageLoadAndCheckForErrors();
29
-        $this->assertTrue( $this->isTextPresent("Enquiry sent successfully"), "Success text not found");
30
-    }
17
+	public function testSendEnquiry()
18
+	{
19
+		$this->logInfo('Send Enquiry......');
20
+		$this->url(self::GDTEST_BASE_URL.'places/united-states/new-york/new-york/attractions/test-listing/');
21
+		$this->waitForPageLoadAndCheckForErrors();
22
+		$this->byClassName('b_send_inquiry')->click();
23
+		$this->waitForPageLoadAndCheckForErrors();
24
+		$this->byName('inq_name')->value('Test User');
25
+		$this->byName('inq_email')->value('[email protected]');
26
+		$this->byId('agt_mail_phone')->value('44444444444');
27
+		$this->byName('Send')->click();
28
+		$this->waitForPageLoadAndCheckForErrors();
29
+		$this->assertTrue( $this->isTextPresent("Enquiry sent successfully"), "Success text not found");
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->byId('agt_mail_phone')->value('44444444444');
27 27
         $this->byName('Send')->click();
28 28
         $this->waitForPageLoadAndCheckForErrors();
29
-        $this->assertTrue( $this->isTextPresent("Enquiry sent successfully"), "Success text not found");
29
+        $this->assertTrue($this->isTextPresent("Enquiry sent successfully"), "Success text not found");
30 30
     }
31 31
 
32 32
     public function tearDown()
Please login to merge, or discard this patch.
tests/selenium/stest-17_Add_Custom_Fields.php 1 patch
Indentation   +65 added lines, -65 removed lines patch added patch discarded remove patch
@@ -1,74 +1,74 @@
 block discarded – undo
1 1
 <?php
2 2
 class AddCustomFields 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 testAddCustomFields()
18
-    {
19
-        $this->logInfo('Add custom fields......');
20
-        $this->prepareSession()->currentWindow()->maximize();
21
-        //Field 1
22
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=gd_place_fields_settings&subtab=custom_fields&listing_type=gd_place');
23
-        $this->waitForPageLoadAndCheckForErrors();
24
-        $this->byId('gt-text')->click();
25
-        $this->waitForPageLoadAndCheckForErrors();
26
-        $link = $this->byXPath("//li[@id='licontainer_new10']/div[contains(@class,'titlenew10')]");
27
-        $this->moveto($link);
28
-        $this->doubleclick();
29
-        $this->waitForPageLoadAndCheckForErrors();
30
-        $this->byXPath("//div[@id='field_frmnew10']//input[@id='admin_title']")->value('Text Field 1');
31
-        $this->byXPath("//div[@id='field_frmnew10']//input[@id='site_title']")->value('Text Field 1');
32
-        $this->byXPath("//div[@id='field_frmnew10']//input[@id='htmlvar_name']")->value('text_field_1');
33
-        $this->byXPath("//div[@id='field_frmnew10']//input[@id='clabels']")->value('Text Field 1');
34
-        $this->select($this->byXPath("//div[@id='field_frmnew10']//select[@id='is_active']"))->selectOptionByLabel('Yes');
35
-        $this->select($this->byXPath("//div[@id='field_frmnew10']//select[@id='show_on_listing']"))->selectOptionByLabel('Yes');
36
-        $this->select($this->byXPath("//div[@id='field_frmnew10']//select[@id='show_on_detail']"))->selectOptionByLabel('Yes');
37
-        $this->byXPath("//div[@id='field_frmnew10']//input[@id='cat_sort']")->click();
38
-        $this->byXPath("//div[@id='field_frmnew10']//input[@id='cat_filter']")->click();
39
-        $this->byXPath("//div[@id='field_frmnew10']//input[@id='save']")->click();
40
-        $this->waitForPageLoadAndCheckForErrors();
17
+	public function testAddCustomFields()
18
+	{
19
+		$this->logInfo('Add custom fields......');
20
+		$this->prepareSession()->currentWindow()->maximize();
21
+		//Field 1
22
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=gd_place_fields_settings&subtab=custom_fields&listing_type=gd_place');
23
+		$this->waitForPageLoadAndCheckForErrors();
24
+		$this->byId('gt-text')->click();
25
+		$this->waitForPageLoadAndCheckForErrors();
26
+		$link = $this->byXPath("//li[@id='licontainer_new10']/div[contains(@class,'titlenew10')]");
27
+		$this->moveto($link);
28
+		$this->doubleclick();
29
+		$this->waitForPageLoadAndCheckForErrors();
30
+		$this->byXPath("//div[@id='field_frmnew10']//input[@id='admin_title']")->value('Text Field 1');
31
+		$this->byXPath("//div[@id='field_frmnew10']//input[@id='site_title']")->value('Text Field 1');
32
+		$this->byXPath("//div[@id='field_frmnew10']//input[@id='htmlvar_name']")->value('text_field_1');
33
+		$this->byXPath("//div[@id='field_frmnew10']//input[@id='clabels']")->value('Text Field 1');
34
+		$this->select($this->byXPath("//div[@id='field_frmnew10']//select[@id='is_active']"))->selectOptionByLabel('Yes');
35
+		$this->select($this->byXPath("//div[@id='field_frmnew10']//select[@id='show_on_listing']"))->selectOptionByLabel('Yes');
36
+		$this->select($this->byXPath("//div[@id='field_frmnew10']//select[@id='show_on_detail']"))->selectOptionByLabel('Yes');
37
+		$this->byXPath("//div[@id='field_frmnew10']//input[@id='cat_sort']")->click();
38
+		$this->byXPath("//div[@id='field_frmnew10']//input[@id='cat_filter']")->click();
39
+		$this->byXPath("//div[@id='field_frmnew10']//input[@id='save']")->click();
40
+		$this->waitForPageLoadAndCheckForErrors();
41 41
 
42
-        //Field 2
43
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=gd_place_fields_settings&subtab=custom_fields&listing_type=gd_place');
44
-        $this->waitForPageLoadAndCheckForErrors();
45
-        $this->byId('gt-text')->click();
46
-        $this->waitForPageLoadAndCheckForErrors();
47
-        $link = $this->byXPath("//li[@id='licontainer_new11']/div[contains(@class,'titlenew11')]");
48
-        $this->moveto($link);
49
-        $this->doubleclick();
50
-        $this->waitForPageLoadAndCheckForErrors();
51
-        $this->byXPath("//div[@id='field_frmnew11']//input[@id='admin_title']")->value('Text Field 2');
52
-        $this->byXPath("//div[@id='field_frmnew11']//input[@id='site_title']")->value('Text Field 2');
53
-        $this->byXPath("//div[@id='field_frmnew11']//input[@id='htmlvar_name']")->value('text_field_2');
54
-        $this->byXPath("//div[@id='field_frmnew11']//input[@id='clabels']")->value('Text Field 2');
55
-        $this->select($this->byXPath("//div[@id='field_frmnew11']//select[@id='is_active']"))->selectOptionByLabel('Yes');
56
-        $this->select($this->byXPath("//div[@id='field_frmnew11']//select[@id='show_on_listing']"))->selectOptionByLabel('Yes');
57
-        $this->select($this->byXPath("//div[@id='field_frmnew11']//select[@id='show_on_detail']"))->selectOptionByLabel('Yes');
58
-        $this->byXPath("//div[@id='field_frmnew11']//input[@id='cat_sort']")->click();
59
-        $this->byXPath("//div[@id='field_frmnew11']//input[@id='cat_filter']")->click();
60
-        $this->byXPath("//div[@id='field_frmnew11']//input[@id='save']")->click();
61
-        $this->waitForPageLoadAndCheckForErrors();
62
-    }
42
+		//Field 2
43
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=gd_place_fields_settings&subtab=custom_fields&listing_type=gd_place');
44
+		$this->waitForPageLoadAndCheckForErrors();
45
+		$this->byId('gt-text')->click();
46
+		$this->waitForPageLoadAndCheckForErrors();
47
+		$link = $this->byXPath("//li[@id='licontainer_new11']/div[contains(@class,'titlenew11')]");
48
+		$this->moveto($link);
49
+		$this->doubleclick();
50
+		$this->waitForPageLoadAndCheckForErrors();
51
+		$this->byXPath("//div[@id='field_frmnew11']//input[@id='admin_title']")->value('Text Field 2');
52
+		$this->byXPath("//div[@id='field_frmnew11']//input[@id='site_title']")->value('Text Field 2');
53
+		$this->byXPath("//div[@id='field_frmnew11']//input[@id='htmlvar_name']")->value('text_field_2');
54
+		$this->byXPath("//div[@id='field_frmnew11']//input[@id='clabels']")->value('Text Field 2');
55
+		$this->select($this->byXPath("//div[@id='field_frmnew11']//select[@id='is_active']"))->selectOptionByLabel('Yes');
56
+		$this->select($this->byXPath("//div[@id='field_frmnew11']//select[@id='show_on_listing']"))->selectOptionByLabel('Yes');
57
+		$this->select($this->byXPath("//div[@id='field_frmnew11']//select[@id='show_on_detail']"))->selectOptionByLabel('Yes');
58
+		$this->byXPath("//div[@id='field_frmnew11']//input[@id='cat_sort']")->click();
59
+		$this->byXPath("//div[@id='field_frmnew11']//input[@id='cat_filter']")->click();
60
+		$this->byXPath("//div[@id='field_frmnew11']//input[@id='save']")->click();
61
+		$this->waitForPageLoadAndCheckForErrors();
62
+	}
63 63
 
64
-    public function tearDown()
65
-    {
66
-        if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
67
-            //write current file number to completed.txt
68
-            $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
69
-            $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
70
-            fwrite($completed, $CurrentFileNumber);
71
-        }
72
-    }
64
+	public function tearDown()
65
+	{
66
+		if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
67
+			//write current file number to completed.txt
68
+			$CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
69
+			$completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
70
+			fwrite($completed, $CurrentFileNumber);
71
+		}
72
+	}
73 73
 }
74 74
 ?>
75 75
\ No newline at end of file
Please login to merge, or discard this patch.
tests/selenium/stest-10_Add_A_Review.php 1 patch
Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -1,48 +1,48 @@
 block discarded – undo
1 1
 <?php
2 2
 class AddReview 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 testAddReview()
18
-    {
19
-        $this->logInfo('Adding a review......');
20
-        $this->maybeUserLogin(self::GDTEST_BASE_URL.'places/united-states/new-york/new-york/attractions/franklin-square/', true);
21
-        $this->waitForPageLoadAndCheckForErrors();
22
-        $this->prepareSession()->currentWindow()->maximize();
23
-        $this->ExecuteScript('jQuery(".geodir-tab-head").css("overflow", "hidden");');
24
-        try {
25
-            $this->byXPath("//a[text()='Reviews']")->click();
26
-        } catch (PHPUnit_Extensions_Selenium2TestCase_WebDriverException $e) {
27
-            if (PHPUnit_Extensions_Selenium2TestCase_WebDriverException::ElementNotVisible == $e->getCode()) {
28
-                $this->ExecuteScript('jQuery("#geodir-tab-mobile-menu").click();');
29
-                $this->byXPath("//a[text()='Reviews']")->click();
30
-            }
31
-        }
32
-        $this->ExecuteScript('jQuery("#geodir_overallrating").val("4");');
33
-        $this->byId('comment')->value('Cool xyz');
34
-        $this->byId('submit')->click();
35
-        $this->waitForPageLoadAndCheckForErrors();
36
-    }
17
+	public function testAddReview()
18
+	{
19
+		$this->logInfo('Adding a review......');
20
+		$this->maybeUserLogin(self::GDTEST_BASE_URL.'places/united-states/new-york/new-york/attractions/franklin-square/', true);
21
+		$this->waitForPageLoadAndCheckForErrors();
22
+		$this->prepareSession()->currentWindow()->maximize();
23
+		$this->ExecuteScript('jQuery(".geodir-tab-head").css("overflow", "hidden");');
24
+		try {
25
+			$this->byXPath("//a[text()='Reviews']")->click();
26
+		} catch (PHPUnit_Extensions_Selenium2TestCase_WebDriverException $e) {
27
+			if (PHPUnit_Extensions_Selenium2TestCase_WebDriverException::ElementNotVisible == $e->getCode()) {
28
+				$this->ExecuteScript('jQuery("#geodir-tab-mobile-menu").click();');
29
+				$this->byXPath("//a[text()='Reviews']")->click();
30
+			}
31
+		}
32
+		$this->ExecuteScript('jQuery("#geodir_overallrating").val("4");');
33
+		$this->byId('comment')->value('Cool xyz');
34
+		$this->byId('submit')->click();
35
+		$this->waitForPageLoadAndCheckForErrors();
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.
tests/selenium/stest-28_GD_Booster.php 2 patches
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -1,50 +1,50 @@
 block discarded – undo
1 1
 <?php
2 2
 class GDBooster 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 testGDBooster()
18
-    {
19
-        $this->logInfo('Testing GD booster......');
20
-
21
-        //make sure GD Booster plugin active
22
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
23
-        $this->waitForPageLoadAndCheckForErrors();
24
-
25
-        $is_active = $this->byId("gd-booster")->attribute('class');
26
-        if (is_int(strpos($is_active, 'inactive'))) {
27
-            //Activate Geodirectory Booster
28
-            $this->maybeActivatePlugin("gd-booster", 20000);
29
-            //go back to plugin page
30
-            $this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
31
-        }
32
-
33
-        $is_active1 = $this->byId("gd-booster")->attribute('class');
34
-        $this->assertFalse( strpos($is_active1, 'inactive'), "GD Booster plugin not active");
35
-
36
-
37
-
38
-    }
39
-
40
-    public function tearDown()
41
-    {
42
-        if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
43
-            //write current file number to completed.txt
44
-            $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
45
-            $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
46
-            fwrite($completed, $CurrentFileNumber);
47
-        }
48
-    }
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 testGDBooster()
18
+	{
19
+		$this->logInfo('Testing GD booster......');
20
+
21
+		//make sure GD Booster plugin active
22
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
23
+		$this->waitForPageLoadAndCheckForErrors();
24
+
25
+		$is_active = $this->byId("gd-booster")->attribute('class');
26
+		if (is_int(strpos($is_active, 'inactive'))) {
27
+			//Activate Geodirectory Booster
28
+			$this->maybeActivatePlugin("gd-booster", 20000);
29
+			//go back to plugin page
30
+			$this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
31
+		}
32
+
33
+		$is_active1 = $this->byId("gd-booster")->attribute('class');
34
+		$this->assertFalse( strpos($is_active1, 'inactive'), "GD Booster plugin not active");
35
+
36
+
37
+
38
+	}
39
+
40
+	public function tearDown()
41
+	{
42
+		if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
43
+			//write current file number to completed.txt
44
+			$CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
45
+			$completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
46
+			fwrite($completed, $CurrentFileNumber);
47
+		}
48
+	}
49 49
 }
50 50
 ?>
51 51
\ 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
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
         }
32 32
 
33 33
         $is_active1 = $this->byId("gd-booster")->attribute('class');
34
-        $this->assertFalse( strpos($is_active1, 'inactive'), "GD Booster plugin not active");
34
+        $this->assertFalse(strpos($is_active1, 'inactive'), "GD Booster plugin not active");
35 35
 
36 36
 
37 37
 
Please login to merge, or discard this patch.
tests/selenium/stest-06_Search_With_Keyword.php 2 patches
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -1,39 +1,39 @@
 block discarded – undo
1 1
 <?php
2 2
 class SearchWithKeyword 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 testSearchWithKeyword()
18
-    {
19
-        $this->logInfo('Searching with keyword......');
20
-        $this->url(self::GDTEST_BASE_URL);
21
-        $this->waitForPageLoadAndCheckForErrors();
17
+	public function testSearchWithKeyword()
18
+	{
19
+		$this->logInfo('Searching with keyword......');
20
+		$this->url(self::GDTEST_BASE_URL);
21
+		$this->waitForPageLoadAndCheckForErrors();
22 22
 //        $this->byClassName('search_text')->value('Test');
23 23
 //        $this->byClassName('geodir_submit_search')->click();
24
-        $this->url(self::GDTEST_BASE_URL.'?geodir_search=1&stype=gd_place&s=test&snear=&sgeo_lat=&sgeo_lon=');
25
-        $this->waitForPageLoadAndCheckForErrors();
26
-        $this->assertTrue( $this->isTextPresent("Search Places For"), "Not in search results page");
27
-    }
24
+		$this->url(self::GDTEST_BASE_URL.'?geodir_search=1&stype=gd_place&s=test&snear=&sgeo_lat=&sgeo_lon=');
25
+		$this->waitForPageLoadAndCheckForErrors();
26
+		$this->assertTrue( $this->isTextPresent("Search Places For"), "Not in search results page");
27
+	}
28 28
 
29
-    public function tearDown()
30
-    {
31
-        if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
32
-            //write current file number to completed.txt
33
-            $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
34
-            $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
35
-            fwrite($completed, $CurrentFileNumber);
36
-        }
37
-    }
29
+	public function tearDown()
30
+	{
31
+		if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
32
+			//write current file number to completed.txt
33
+			$CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
34
+			$completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
35
+			fwrite($completed, $CurrentFileNumber);
36
+		}
37
+	}
38 38
 }
39 39
 ?>
40 40
\ 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
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 //        $this->byClassName('geodir_submit_search')->click();
24 24
         $this->url(self::GDTEST_BASE_URL.'?geodir_search=1&stype=gd_place&s=test&snear=&sgeo_lat=&sgeo_lon=');
25 25
         $this->waitForPageLoadAndCheckForErrors();
26
-        $this->assertTrue( $this->isTextPresent("Search Places For"), "Not in search results page");
26
+        $this->assertTrue($this->isTextPresent("Search Places For"), "Not in search results page");
27 27
     }
28 28
 
29 29
     public function tearDown()
Please login to merge, or discard this patch.
tests/selenium/stest-07_Search_With_Near.php 2 patches
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -1,39 +1,39 @@
 block discarded – undo
1 1
 <?php
2 2
 class SearchWithNear 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 testSearchWithNear()
18
-    {
19
-        $this->logInfo('Searching with near......');
20
-        $this->url(self::GDTEST_BASE_URL);
21
-        $this->waitForPageLoadAndCheckForErrors();
17
+	public function testSearchWithNear()
18
+	{
19
+		$this->logInfo('Searching with near......');
20
+		$this->url(self::GDTEST_BASE_URL);
21
+		$this->waitForPageLoadAndCheckForErrors();
22 22
 //        $this->byClassName('snear')->value('New York');
23 23
 //        $this->byClassName('geodir_submit_search')->click();
24
-        $this->url(self::GDTEST_BASE_URL.'?geodir_search=1&stype=gd_place&s=+&snear=New+York&sgeo_lat=40.7127837&sgeo_lon=-74.00594130000002');
25
-        $this->waitForPageLoadAndCheckForErrors();
26
-        $this->assertTrue( $this->isTextPresent("Search Places"), "Not in search results page");
27
-    }
24
+		$this->url(self::GDTEST_BASE_URL.'?geodir_search=1&stype=gd_place&s=+&snear=New+York&sgeo_lat=40.7127837&sgeo_lon=-74.00594130000002');
25
+		$this->waitForPageLoadAndCheckForErrors();
26
+		$this->assertTrue( $this->isTextPresent("Search Places"), "Not in search results page");
27
+	}
28 28
 
29
-    public function tearDown()
30
-    {
31
-        if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
32
-            //write current file number to completed.txt
33
-            $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
34
-            $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
35
-            fwrite($completed, $CurrentFileNumber);
36
-        }
37
-    }
29
+	public function tearDown()
30
+	{
31
+		if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
32
+			//write current file number to completed.txt
33
+			$CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
34
+			$completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
35
+			fwrite($completed, $CurrentFileNumber);
36
+		}
37
+	}
38 38
 }
39 39
 ?>
40 40
\ 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
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 //        $this->byClassName('geodir_submit_search')->click();
24 24
         $this->url(self::GDTEST_BASE_URL.'?geodir_search=1&stype=gd_place&s=+&snear=New+York&sgeo_lat=40.7127837&sgeo_lon=-74.00594130000002');
25 25
         $this->waitForPageLoadAndCheckForErrors();
26
-        $this->assertTrue( $this->isTextPresent("Search Places"), "Not in search results page");
26
+        $this->assertTrue($this->isTextPresent("Search Places"), "Not in search results page");
27 27
     }
28 28
 
29 29
     public function tearDown()
Please login to merge, or discard this patch.
tests/selenium/stest-19_Switch_Locations.php 2 patches
Indentation   +166 added lines, -166 removed lines patch added patch discarded remove patch
@@ -1,171 +1,171 @@
 block discarded – undo
1 1
 <?php
2 2
 class SwitchLocations 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 testSwitchLocations()
18
-    {
19
-        $this->logInfo('Switch locations......');
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
-
36
-        //Make sure Show location switcher in menu checked.
37
-        $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_setting');
38
-        $this->waitForPageLoadAndCheckForErrors();
39
-        $is_checked = $this->byId('geodir_show_changelocation_nave')->attribute('checked');
40
-        if (!$is_checked) {
41
-            $this->byId('geodir_show_changelocation_nave')->click();
42
-            $this->byClassName('button-primary')->click();
43
-            $this->waitForPageLoadAndCheckForErrors();
44
-        }
45
-
46
-        //Set Navigation Locations
47
-        $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=design_settings');
48
-        $this->waitForPageLoadAndCheckForErrors();
49
-        $this->byLinkText('Navigation')->click();
50
-        $this->ExecuteScript('jQuery("#geodir_theme_location_nav").show();');
51
-        $this->select($this->byId('geodir_theme_location_nav'))->selectOptionByLabel('The Main Menu');
52
-        $this->byName('save')->click();
53
-        $this->waitForPageLoadAndCheckForErrors();
54
-
55
-        //Add new location
56
-        //make sure multi locations plugin active
57
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
58
-        $this->waitForPageLoadAndCheckForErrors();
59
-
60
-        $is_active = $this->byId("geodirectory-location-manager")->attribute('class');
61
-        if (is_int(strpos($is_active, 'inactive'))) {
62
-            //Activate Geodirectory Location Manager
63
-            $this->maybeActivatePlugin("geodirectory-location-manager", 20000);
64
-            //go back to plugin page
65
-            $this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
66
-        }
67
-
68
-        $is_active1 = $this->byId("geodirectory-location-manager")->attribute('class');
69
-        $this->assertFalse( strpos($is_active1, 'inactive'), "Location Manager plugin not active");
70
-
71
-        // Add few locations
72
-        // Las vegas
73
-        $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit');
74
-        $this->prepareSession()->currentWindow()->maximize();
75
-        $this->waitForPageLoadAndCheckForErrors();
76
-        $this->byId('gd_city')->value('Las Vegas');
77
-        $this->byId('gd_region')->value('Nevada');
78
-        $this->byId('gd_set_address_button')->click();
79
-        $this->waitForPageLoadAndCheckForErrors();
80
-        $this->byId('geodir_location_save')->click();
81
-        $this->waitForPageLoadAndCheckForErrors();
82
-        $this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found");
83
-
84
-        //London
85
-        $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit');
86
-        $this->waitForPageLoadAndCheckForErrors();
87
-        $this->byId('gd_city')->value('London');
88
-        $this->byId('gd_region')->value('Greater London');
89
-        $this->byId('gd_set_address_button')->click();
90
-        $this->waitForPageLoadAndCheckForErrors();
91
-        $this->byId('geodir_location_save')->click();
92
-        $this->waitForPageLoadAndCheckForErrors();
93
-        $this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found");
94
-
95
-        //Glasgow
96
-        $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit');
97
-        $this->waitForPageLoadAndCheckForErrors();
98
-        $this->byId('gd_city')->value('Glasgow');
99
-        $this->byId('gd_region')->value('Glasgow City');
100
-        $this->byId('gd_set_address_button')->click();
101
-        $this->waitForPageLoadAndCheckForErrors();
102
-        $this->byId('geodir_location_save')->click();
103
-        $this->waitForPageLoadAndCheckForErrors();
104
-        $this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found");
105
-
106
-        //Mexico City
107
-        $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit');
108
-        $this->waitForPageLoadAndCheckForErrors();
109
-        $this->byId('gd_city')->value('Mexico City');
110
-        $this->byId('gd_region')->value('Federal District');
111
-        $this->byId('gd_set_address_button')->click();
112
-        $this->waitForPageLoadAndCheckForErrors();
113
-        $this->byId('geodir_location_save')->click();
114
-        $this->waitForPageLoadAndCheckForErrors();
115
-        $this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found");
116
-
117
-        //sydney
118
-        $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit');
119
-        $this->waitForPageLoadAndCheckForErrors();
120
-        $this->byId('gd_city')->value('sydney');
121
-        $this->byId('gd_region')->value('New South Wales');
122
-        $this->byId('gd_set_address_button')->click();
123
-        $this->waitForPageLoadAndCheckForErrors();
124
-        $this->byId('geodir_location_save')->click();
125
-        $this->waitForPageLoadAndCheckForErrors();
126
-        $this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found");
127
-
128
-        //tokyo
129
-        $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit');
130
-        $this->waitForPageLoadAndCheckForErrors();
131
-        $this->byId('gd_city')->value('tokyo');
132
-        $this->byId('gd_region')->value('Tokyo');
133
-        $this->byId('gd_set_address_button')->click();
134
-        $this->waitForPageLoadAndCheckForErrors();
135
-        $this->byId('geodir_location_save')->click();
136
-        $this->waitForPageLoadAndCheckForErrors();
137
-        $this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found");
138
-
139
-        //Chennai
140
-        $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit');
141
-        $this->waitForPageLoadAndCheckForErrors();
142
-        $this->byId('gd_city')->value('Chennai');
143
-        $this->byId('gd_region')->value('Tamil Nadu');
144
-        $this->byId('gd_set_address_button')->click();
145
-        $this->waitForPageLoadAndCheckForErrors();
146
-        $this->byId('geodir_location_save')->click();
147
-        $this->waitForPageLoadAndCheckForErrors();
148
-        $this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found");
149
-
150
-
151
-        //front end switch locations
152
-        $this->url(self::GDTEST_BASE_URL.'location/united-states/nevada/las-vegas/');
153
-        $this->waitForPageLoadAndCheckForErrors();
154
-        $this->assertTrue( $this->isTextPresent("Las Vegas"), "'Las Vegas' text not found");
155
-
156
-        $this->url(self::GDTEST_BASE_URL.'location/united-states/new-york/new-york/');
157
-        $this->waitForPageLoadAndCheckForErrors();
158
-        $this->assertTrue( $this->isTextPresent("New York"), "'New York' text not found");
159
-    }
160
-
161
-    public function tearDown()
162
-    {
163
-        if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
164
-            //write current file number to completed.txt
165
-            $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
166
-            $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
167
-            fwrite($completed, $CurrentFileNumber);
168
-        }
169
-    }
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 testSwitchLocations()
18
+	{
19
+		$this->logInfo('Switch locations......');
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
+
36
+		//Make sure Show location switcher in menu checked.
37
+		$this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_setting');
38
+		$this->waitForPageLoadAndCheckForErrors();
39
+		$is_checked = $this->byId('geodir_show_changelocation_nave')->attribute('checked');
40
+		if (!$is_checked) {
41
+			$this->byId('geodir_show_changelocation_nave')->click();
42
+			$this->byClassName('button-primary')->click();
43
+			$this->waitForPageLoadAndCheckForErrors();
44
+		}
45
+
46
+		//Set Navigation Locations
47
+		$this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=design_settings');
48
+		$this->waitForPageLoadAndCheckForErrors();
49
+		$this->byLinkText('Navigation')->click();
50
+		$this->ExecuteScript('jQuery("#geodir_theme_location_nav").show();');
51
+		$this->select($this->byId('geodir_theme_location_nav'))->selectOptionByLabel('The Main Menu');
52
+		$this->byName('save')->click();
53
+		$this->waitForPageLoadAndCheckForErrors();
54
+
55
+		//Add new location
56
+		//make sure multi locations plugin active
57
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
58
+		$this->waitForPageLoadAndCheckForErrors();
59
+
60
+		$is_active = $this->byId("geodirectory-location-manager")->attribute('class');
61
+		if (is_int(strpos($is_active, 'inactive'))) {
62
+			//Activate Geodirectory Location Manager
63
+			$this->maybeActivatePlugin("geodirectory-location-manager", 20000);
64
+			//go back to plugin page
65
+			$this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
66
+		}
67
+
68
+		$is_active1 = $this->byId("geodirectory-location-manager")->attribute('class');
69
+		$this->assertFalse( strpos($is_active1, 'inactive'), "Location Manager plugin not active");
70
+
71
+		// Add few locations
72
+		// Las vegas
73
+		$this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit');
74
+		$this->prepareSession()->currentWindow()->maximize();
75
+		$this->waitForPageLoadAndCheckForErrors();
76
+		$this->byId('gd_city')->value('Las Vegas');
77
+		$this->byId('gd_region')->value('Nevada');
78
+		$this->byId('gd_set_address_button')->click();
79
+		$this->waitForPageLoadAndCheckForErrors();
80
+		$this->byId('geodir_location_save')->click();
81
+		$this->waitForPageLoadAndCheckForErrors();
82
+		$this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found");
83
+
84
+		//London
85
+		$this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit');
86
+		$this->waitForPageLoadAndCheckForErrors();
87
+		$this->byId('gd_city')->value('London');
88
+		$this->byId('gd_region')->value('Greater London');
89
+		$this->byId('gd_set_address_button')->click();
90
+		$this->waitForPageLoadAndCheckForErrors();
91
+		$this->byId('geodir_location_save')->click();
92
+		$this->waitForPageLoadAndCheckForErrors();
93
+		$this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found");
94
+
95
+		//Glasgow
96
+		$this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit');
97
+		$this->waitForPageLoadAndCheckForErrors();
98
+		$this->byId('gd_city')->value('Glasgow');
99
+		$this->byId('gd_region')->value('Glasgow City');
100
+		$this->byId('gd_set_address_button')->click();
101
+		$this->waitForPageLoadAndCheckForErrors();
102
+		$this->byId('geodir_location_save')->click();
103
+		$this->waitForPageLoadAndCheckForErrors();
104
+		$this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found");
105
+
106
+		//Mexico City
107
+		$this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit');
108
+		$this->waitForPageLoadAndCheckForErrors();
109
+		$this->byId('gd_city')->value('Mexico City');
110
+		$this->byId('gd_region')->value('Federal District');
111
+		$this->byId('gd_set_address_button')->click();
112
+		$this->waitForPageLoadAndCheckForErrors();
113
+		$this->byId('geodir_location_save')->click();
114
+		$this->waitForPageLoadAndCheckForErrors();
115
+		$this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found");
116
+
117
+		//sydney
118
+		$this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit');
119
+		$this->waitForPageLoadAndCheckForErrors();
120
+		$this->byId('gd_city')->value('sydney');
121
+		$this->byId('gd_region')->value('New South Wales');
122
+		$this->byId('gd_set_address_button')->click();
123
+		$this->waitForPageLoadAndCheckForErrors();
124
+		$this->byId('geodir_location_save')->click();
125
+		$this->waitForPageLoadAndCheckForErrors();
126
+		$this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found");
127
+
128
+		//tokyo
129
+		$this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit');
130
+		$this->waitForPageLoadAndCheckForErrors();
131
+		$this->byId('gd_city')->value('tokyo');
132
+		$this->byId('gd_region')->value('Tokyo');
133
+		$this->byId('gd_set_address_button')->click();
134
+		$this->waitForPageLoadAndCheckForErrors();
135
+		$this->byId('geodir_location_save')->click();
136
+		$this->waitForPageLoadAndCheckForErrors();
137
+		$this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found");
138
+
139
+		//Chennai
140
+		$this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit');
141
+		$this->waitForPageLoadAndCheckForErrors();
142
+		$this->byId('gd_city')->value('Chennai');
143
+		$this->byId('gd_region')->value('Tamil Nadu');
144
+		$this->byId('gd_set_address_button')->click();
145
+		$this->waitForPageLoadAndCheckForErrors();
146
+		$this->byId('geodir_location_save')->click();
147
+		$this->waitForPageLoadAndCheckForErrors();
148
+		$this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found");
149
+
150
+
151
+		//front end switch locations
152
+		$this->url(self::GDTEST_BASE_URL.'location/united-states/nevada/las-vegas/');
153
+		$this->waitForPageLoadAndCheckForErrors();
154
+		$this->assertTrue( $this->isTextPresent("Las Vegas"), "'Las Vegas' text not found");
155
+
156
+		$this->url(self::GDTEST_BASE_URL.'location/united-states/new-york/new-york/');
157
+		$this->waitForPageLoadAndCheckForErrors();
158
+		$this->assertTrue( $this->isTextPresent("New York"), "'New York' text not found");
159
+	}
160
+
161
+	public function tearDown()
162
+	{
163
+		if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
164
+			//write current file number to completed.txt
165
+			$CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
166
+			$completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
167
+			fwrite($completed, $CurrentFileNumber);
168
+		}
169
+	}
170 170
 }
171 171
 ?>
172 172
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 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-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
 
36 36
         //Make sure Show location switcher in menu checked.
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         }
67 67
 
68 68
         $is_active1 = $this->byId("geodirectory-location-manager")->attribute('class');
69
-        $this->assertFalse( strpos($is_active1, 'inactive'), "Location Manager plugin not active");
69
+        $this->assertFalse(strpos($is_active1, 'inactive'), "Location Manager plugin not active");
70 70
 
71 71
         // Add few locations
72 72
         // Las vegas
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         $this->waitForPageLoadAndCheckForErrors();
80 80
         $this->byId('geodir_location_save')->click();
81 81
         $this->waitForPageLoadAndCheckForErrors();
82
-        $this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found");
82
+        $this->assertTrue($this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found");
83 83
 
84 84
         //London
85 85
         $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit');
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         $this->waitForPageLoadAndCheckForErrors();
91 91
         $this->byId('geodir_location_save')->click();
92 92
         $this->waitForPageLoadAndCheckForErrors();
93
-        $this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found");
93
+        $this->assertTrue($this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found");
94 94
 
95 95
         //Glasgow
96 96
         $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit');
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         $this->waitForPageLoadAndCheckForErrors();
102 102
         $this->byId('geodir_location_save')->click();
103 103
         $this->waitForPageLoadAndCheckForErrors();
104
-        $this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found");
104
+        $this->assertTrue($this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found");
105 105
 
106 106
         //Mexico City
107 107
         $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit');
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         $this->waitForPageLoadAndCheckForErrors();
113 113
         $this->byId('geodir_location_save')->click();
114 114
         $this->waitForPageLoadAndCheckForErrors();
115
-        $this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found");
115
+        $this->assertTrue($this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found");
116 116
 
117 117
         //sydney
118 118
         $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit');
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
         $this->waitForPageLoadAndCheckForErrors();
124 124
         $this->byId('geodir_location_save')->click();
125 125
         $this->waitForPageLoadAndCheckForErrors();
126
-        $this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found");
126
+        $this->assertTrue($this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found");
127 127
 
128 128
         //tokyo
129 129
         $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit');
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
         $this->waitForPageLoadAndCheckForErrors();
135 135
         $this->byId('geodir_location_save')->click();
136 136
         $this->waitForPageLoadAndCheckForErrors();
137
-        $this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found");
137
+        $this->assertTrue($this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found");
138 138
 
139 139
         //Chennai
140 140
         $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit');
@@ -145,17 +145,17 @@  discard block
 block discarded – undo
145 145
         $this->waitForPageLoadAndCheckForErrors();
146 146
         $this->byId('geodir_location_save')->click();
147 147
         $this->waitForPageLoadAndCheckForErrors();
148
-        $this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found");
148
+        $this->assertTrue($this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found");
149 149
 
150 150
 
151 151
         //front end switch locations
152 152
         $this->url(self::GDTEST_BASE_URL.'location/united-states/nevada/las-vegas/');
153 153
         $this->waitForPageLoadAndCheckForErrors();
154
-        $this->assertTrue( $this->isTextPresent("Las Vegas"), "'Las Vegas' text not found");
154
+        $this->assertTrue($this->isTextPresent("Las Vegas"), "'Las Vegas' text not found");
155 155
 
156 156
         $this->url(self::GDTEST_BASE_URL.'location/united-states/new-york/new-york/');
157 157
         $this->waitForPageLoadAndCheckForErrors();
158
-        $this->assertTrue( $this->isTextPresent("New York"), "'New York' text not found");
158
+        $this->assertTrue($this->isTextPresent("New York"), "'New York' text not found");
159 159
     }
160 160
 
161 161
     public function tearDown()
Please login to merge, or discard this patch.