Test Setup Failed
Pull Request — master (#454)
by Kiran
29:40
created
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.
tests/selenium/stest-40_Check_Login_Box.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 CheckLoginBox 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 testCheckLoginBox()
18
-    {
19
-        $this->logInfo('Testing login box......');
20
-        $this->url(self::GDTEST_BASE_URL);
21
-        $this->waitForPageLoadAndCheckForErrors();
22
-        $this->assertTrue( $this->isTextPresent("gdf_welcome_login_wrap"), "Login welcome widget not found");
23
-        $this->byName('log')->value('[email protected]');
24
-        $this->byName('pwd')->value('1');
25
-        // Submit the form
26
-        $this->byClassName('b_signin')->click();
27
-        $this->waitForPageLoadAndCheckForErrors();
28
-        $this->assertFalse( $this->isTextPresent("Invalid Username/Password."), "Invalid Username/Password.");
29
-        $this->assertTrue( $this->isTextPresent("Welcome,"), "Welcome text not found");
30
-    }
17
+	public function testCheckLoginBox()
18
+	{
19
+		$this->logInfo('Testing login box......');
20
+		$this->url(self::GDTEST_BASE_URL);
21
+		$this->waitForPageLoadAndCheckForErrors();
22
+		$this->assertTrue( $this->isTextPresent("gdf_welcome_login_wrap"), "Login welcome widget not found");
23
+		$this->byName('log')->value('[email protected]');
24
+		$this->byName('pwd')->value('1');
25
+		// Submit the form
26
+		$this->byClassName('b_signin')->click();
27
+		$this->waitForPageLoadAndCheckForErrors();
28
+		$this->assertFalse( $this->isTextPresent("Invalid Username/Password."), "Invalid Username/Password.");
29
+		$this->assertTrue( $this->isTextPresent("Welcome,"), "Welcome 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   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,14 +19,14 @@
 block discarded – undo
19 19
         $this->logInfo('Testing login box......');
20 20
         $this->url(self::GDTEST_BASE_URL);
21 21
         $this->waitForPageLoadAndCheckForErrors();
22
-        $this->assertTrue( $this->isTextPresent("gdf_welcome_login_wrap"), "Login welcome widget not found");
22
+        $this->assertTrue($this->isTextPresent("gdf_welcome_login_wrap"), "Login welcome widget not found");
23 23
         $this->byName('log')->value('[email protected]');
24 24
         $this->byName('pwd')->value('1');
25 25
         // Submit the form
26 26
         $this->byClassName('b_signin')->click();
27 27
         $this->waitForPageLoadAndCheckForErrors();
28
-        $this->assertFalse( $this->isTextPresent("Invalid Username/Password."), "Invalid Username/Password.");
29
-        $this->assertTrue( $this->isTextPresent("Welcome,"), "Welcome text not found");
28
+        $this->assertFalse($this->isTextPresent("Invalid Username/Password."), "Invalid Username/Password.");
29
+        $this->assertTrue($this->isTextPresent("Welcome,"), "Welcome text not found");
30 30
     }
31 31
 
32 32
     public function tearDown()
Please login to merge, or discard this patch.
tests/selenium/stest-23_Check_PinPoint.php 1 patch
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -1,37 +1,37 @@
 block discarded – undo
1 1
 <?php
2 2
 class CheckPinpoint 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 testCheckPinpoint()
18
-    {
19
-        $this->logInfo('Checking pin point......');
20
-        $this->url(self::GDTEST_BASE_URL.'places/');
21
-        $this->waitForPageLoadAndCheckForErrors();
22
-        $this->ExecuteScript('jQuery("a.geodir-pinpoint-link").trigger("mouseover");');
23
-        $this->waitForPageLoadAndCheckForErrors(5000);
24
-        $this->ExecuteScript('jQuery("a.geodir-pinpoint-link").trigger("mouseout");');
25
-    }
17
+	public function testCheckPinpoint()
18
+	{
19
+		$this->logInfo('Checking pin point......');
20
+		$this->url(self::GDTEST_BASE_URL.'places/');
21
+		$this->waitForPageLoadAndCheckForErrors();
22
+		$this->ExecuteScript('jQuery("a.geodir-pinpoint-link").trigger("mouseover");');
23
+		$this->waitForPageLoadAndCheckForErrors(5000);
24
+		$this->ExecuteScript('jQuery("a.geodir-pinpoint-link").trigger("mouseout");');
25
+	}
26 26
 
27
-    public function tearDown()
28
-    {
29
-        if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
30
-            //write current file number to completed.txt
31
-            $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
32
-            $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
33
-            fwrite($completed, $CurrentFileNumber);
34
-        }
35
-    }
27
+	public function tearDown()
28
+	{
29
+		if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
30
+			//write current file number to completed.txt
31
+			$CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
32
+			$completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
33
+			fwrite($completed, $CurrentFileNumber);
34
+		}
35
+	}
36 36
 }
37 37
 ?>
38 38
\ No newline at end of file
Please login to merge, or discard this patch.
tests/selenium/stest-32_Social_Importer.php 2 patches
Indentation   +108 added lines, -108 removed lines patch added patch discarded remove patch
@@ -1,113 +1,113 @@
 block discarded – undo
1 1
 <?php
2 2
 class SocialImporter 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 testSocialImporter()
18
-    {
19
-        $this->logInfo('Testing social importer......');
20
-        //make sure Social Importer plugin active
21
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
22
-        $this->waitForPageLoadAndCheckForErrors();
23
-
24
-        $is_active = $this->byId("geodirectory-social-importer")->attribute('class');
25
-        if (is_int(strpos($is_active, 'inactive'))) {
26
-            //Activate Geodirectory Social Importer
27
-            $this->maybeActivatePlugin("geodirectory-social-importer", 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-social-importer")->attribute('class');
33
-        $this->assertFalse( strpos($is_active1, 'inactive'), "Social Importer plugin not active");
34
-
35
-        $stop_script = false;
36
-
37
-        $fb_app_id  = getenv( 'FACEBOOK_APP_ID' );
38
-        $fb_app_secret  = getenv( 'FACEBOOK_APP_SECRET' );
39
-        $yelp_key  = getenv( 'YELP_KEY' );
40
-        $yelp_key_secret  = getenv( 'YELP_KEY_SECRET' );
41
-        $yelp_token  = getenv( 'YELP_TOKEN' );
42
-        $yelp_token_secret  = getenv( 'YELP_TOKEN_SECRET' );
43
-
44
-        if (!$fb_app_id) {
45
-            $this->logError("ENV variable FACEBOOK_APP_ID not available");
46
-            $stop_script = true;
47
-        }
48
-
49
-        if (!$fb_app_secret) {
50
-            $this->logError("ENV variable FACEBOOK_APP_SECRET not available");
51
-            $stop_script = true;
52
-        }
53
-
54
-        if (!$yelp_key) {
55
-            $this->logError("ENV variable YELP_KEY not available");
56
-            $stop_script = true;
57
-        }
58
-
59
-        if (!$yelp_key_secret) {
60
-            $this->logError("ENV variable YELP_KEY_SECRET not available");
61
-            $stop_script = true;
62
-        }
63
-
64
-        if (!$yelp_token) {
65
-            $this->logError("ENV variable YELP_TOKEN not available");
66
-            $stop_script = true;
67
-        }
68
-
69
-        if (!$yelp_token_secret) {
70
-            $this->logError("ENV variable YELP_TOKEN_SECRET not available");
71
-            $stop_script = true;
72
-        }
73
-
74
-        if($stop_script) {
75
-            $this->logInfo("Stopping the script. Please fix the errors to continue");
76
-            return;
77
-        }
78
-
79
-        // facebook
80
-        $this->url(self::GDTEST_BASE_URL.'admin.php?page=geodirectory&tab=facebook_integration&subtab=geodir_gdfi_options');
81
-        $this->byId('gdfi_app_id')->value($fb_app_id);
82
-        $this->byId('gdfi_app_secret')->value($fb_app_secret);
83
-        $this->byName('gdfi_facebook_integration_options_save')->click();
84
-        $this->waitForPageLoadAndCheckForErrors();
85
-
86
-        //yelp
87
-        $this->url(self::GDTEST_BASE_URL.'admin.php?page=geodirectory&tab=facebook_integration&subtab=manage_gdfi_options_yelp');
88
-        $this->byId('gdfi_yelp_key')->value($yelp_key);
89
-        $this->byId('gdfi_yelp_key_secret')->value($yelp_key_secret);
90
-        $this->byId('gdfi_yelp_token')->value($yelp_token);
91
-        $this->byId('gdfi_yelp_token_secret')->value($yelp_token_secret);
92
-        $this->byName('gdfi_yelp_integration_options_save')->click();
93
-        $this->waitForPageLoadAndCheckForErrors();
94
-
95
-        // import listing
96
-        $this->url(self::GDTEST_BASE_URL.'add-listing/?listing_type=gd_place');
97
-        $this->byId('gdfi_import_url')->value('http://www.yelp.com/biz/mcdonalds-mountain-view-3');
98
-        $this->byId('gd_facebook_import')->click();
99
-
100
-
101
-    }
102
-
103
-    public function tearDown()
104
-    {
105
-        if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
106
-            //write current file number to completed.txt
107
-            $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
108
-            $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
109
-            fwrite($completed, $CurrentFileNumber);
110
-        }
111
-    }
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 testSocialImporter()
18
+	{
19
+		$this->logInfo('Testing social importer......');
20
+		//make sure Social Importer plugin active
21
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
22
+		$this->waitForPageLoadAndCheckForErrors();
23
+
24
+		$is_active = $this->byId("geodirectory-social-importer")->attribute('class');
25
+		if (is_int(strpos($is_active, 'inactive'))) {
26
+			//Activate Geodirectory Social Importer
27
+			$this->maybeActivatePlugin("geodirectory-social-importer", 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-social-importer")->attribute('class');
33
+		$this->assertFalse( strpos($is_active1, 'inactive'), "Social Importer plugin not active");
34
+
35
+		$stop_script = false;
36
+
37
+		$fb_app_id  = getenv( 'FACEBOOK_APP_ID' );
38
+		$fb_app_secret  = getenv( 'FACEBOOK_APP_SECRET' );
39
+		$yelp_key  = getenv( 'YELP_KEY' );
40
+		$yelp_key_secret  = getenv( 'YELP_KEY_SECRET' );
41
+		$yelp_token  = getenv( 'YELP_TOKEN' );
42
+		$yelp_token_secret  = getenv( 'YELP_TOKEN_SECRET' );
43
+
44
+		if (!$fb_app_id) {
45
+			$this->logError("ENV variable FACEBOOK_APP_ID not available");
46
+			$stop_script = true;
47
+		}
48
+
49
+		if (!$fb_app_secret) {
50
+			$this->logError("ENV variable FACEBOOK_APP_SECRET not available");
51
+			$stop_script = true;
52
+		}
53
+
54
+		if (!$yelp_key) {
55
+			$this->logError("ENV variable YELP_KEY not available");
56
+			$stop_script = true;
57
+		}
58
+
59
+		if (!$yelp_key_secret) {
60
+			$this->logError("ENV variable YELP_KEY_SECRET not available");
61
+			$stop_script = true;
62
+		}
63
+
64
+		if (!$yelp_token) {
65
+			$this->logError("ENV variable YELP_TOKEN not available");
66
+			$stop_script = true;
67
+		}
68
+
69
+		if (!$yelp_token_secret) {
70
+			$this->logError("ENV variable YELP_TOKEN_SECRET not available");
71
+			$stop_script = true;
72
+		}
73
+
74
+		if($stop_script) {
75
+			$this->logInfo("Stopping the script. Please fix the errors to continue");
76
+			return;
77
+		}
78
+
79
+		// facebook
80
+		$this->url(self::GDTEST_BASE_URL.'admin.php?page=geodirectory&tab=facebook_integration&subtab=geodir_gdfi_options');
81
+		$this->byId('gdfi_app_id')->value($fb_app_id);
82
+		$this->byId('gdfi_app_secret')->value($fb_app_secret);
83
+		$this->byName('gdfi_facebook_integration_options_save')->click();
84
+		$this->waitForPageLoadAndCheckForErrors();
85
+
86
+		//yelp
87
+		$this->url(self::GDTEST_BASE_URL.'admin.php?page=geodirectory&tab=facebook_integration&subtab=manage_gdfi_options_yelp');
88
+		$this->byId('gdfi_yelp_key')->value($yelp_key);
89
+		$this->byId('gdfi_yelp_key_secret')->value($yelp_key_secret);
90
+		$this->byId('gdfi_yelp_token')->value($yelp_token);
91
+		$this->byId('gdfi_yelp_token_secret')->value($yelp_token_secret);
92
+		$this->byName('gdfi_yelp_integration_options_save')->click();
93
+		$this->waitForPageLoadAndCheckForErrors();
94
+
95
+		// import listing
96
+		$this->url(self::GDTEST_BASE_URL.'add-listing/?listing_type=gd_place');
97
+		$this->byId('gdfi_import_url')->value('http://www.yelp.com/biz/mcdonalds-mountain-view-3');
98
+		$this->byId('gd_facebook_import')->click();
99
+
100
+
101
+	}
102
+
103
+	public function tearDown()
104
+	{
105
+		if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
106
+			//write current file number to completed.txt
107
+			$CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
108
+			$completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
109
+			fwrite($completed, $CurrentFileNumber);
110
+		}
111
+	}
112 112
 }
113 113
 ?>
114 114
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -30,16 +30,16 @@  discard block
 block discarded – undo
30 30
         }
31 31
 
32 32
         $is_active1 = $this->byId("geodirectory-social-importer")->attribute('class');
33
-        $this->assertFalse( strpos($is_active1, 'inactive'), "Social Importer plugin not active");
33
+        $this->assertFalse(strpos($is_active1, 'inactive'), "Social Importer plugin not active");
34 34
 
35 35
         $stop_script = false;
36 36
 
37
-        $fb_app_id  = getenv( 'FACEBOOK_APP_ID' );
38
-        $fb_app_secret  = getenv( 'FACEBOOK_APP_SECRET' );
39
-        $yelp_key  = getenv( 'YELP_KEY' );
40
-        $yelp_key_secret  = getenv( 'YELP_KEY_SECRET' );
41
-        $yelp_token  = getenv( 'YELP_TOKEN' );
42
-        $yelp_token_secret  = getenv( 'YELP_TOKEN_SECRET' );
37
+        $fb_app_id = getenv('FACEBOOK_APP_ID');
38
+        $fb_app_secret = getenv('FACEBOOK_APP_SECRET');
39
+        $yelp_key = getenv('YELP_KEY');
40
+        $yelp_key_secret = getenv('YELP_KEY_SECRET');
41
+        $yelp_token = getenv('YELP_TOKEN');
42
+        $yelp_token_secret = getenv('YELP_TOKEN_SECRET');
43 43
 
44 44
         if (!$fb_app_id) {
45 45
             $this->logError("ENV variable FACEBOOK_APP_ID not available");
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
             $stop_script = true;
72 72
         }
73 73
 
74
-        if($stop_script) {
74
+        if ($stop_script) {
75 75
             $this->logInfo("Stopping the script. Please fix the errors to continue");
76 76
             return;
77 77
         }
Please login to merge, or discard this patch.
tests/selenium/stest-42_Test_Dummy_Data.php 2 patches
Indentation   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -1,60 +1,60 @@
 block discarded – undo
1 1
 <?php
2 2
 class TestDummyData 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 testTestDummyData()
18
-    {
19
-        $this->logInfo('Testing dummy data......');
20
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=general_settings');
21
-        $this->waitForPageLoadAndCheckForErrors();
22
-        $this->byLinkText('Dummy Data')->click();
23
-
24
-        $html = $this->byId('sub_dummy_data_settings')->attribute('innerHTML');
25
-        if (is_int(strpos($html, 'Yes Delete Please!'))) {
26
-            //delete event data
27
-        }
28
-
29
-
30
-        //make sure event manager plugin active
31
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
32
-        $this->waitForPageLoadAndCheckForErrors();
33
-        $is_active = $this->byId("geodirectory-events")->attribute('class');
34
-        $this->assertFalse( strpos($is_active, 'inactive'), "event manager plugin not active");
35
-        if (strpos($is_active, 'inactive')) {
36
-            return;
37
-        }
38
-
39
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=general_settings');
40
-        $this->waitForPageLoadAndCheckForErrors();
41
-        $this->byLinkText('Event Dummy Data')->click();
42
-
43
-        $html = $this->byId('sub_gdevent_dummy_data_settings')->attribute('innerHTML');
44
-        if (is_int(strpos($html, 'Yes Delete Please!'))) {
45
-            //delete event data
46
-        }
47
-
48
-    }
49
-
50
-    public function tearDown()
51
-    {
52
-        if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
53
-            //write current file number to completed.txt
54
-            $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
55
-            $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
56
-            fwrite($completed, $CurrentFileNumber);
57
-        }
58
-    }
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 testTestDummyData()
18
+	{
19
+		$this->logInfo('Testing dummy data......');
20
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=general_settings');
21
+		$this->waitForPageLoadAndCheckForErrors();
22
+		$this->byLinkText('Dummy Data')->click();
23
+
24
+		$html = $this->byId('sub_dummy_data_settings')->attribute('innerHTML');
25
+		if (is_int(strpos($html, 'Yes Delete Please!'))) {
26
+			//delete event data
27
+		}
28
+
29
+
30
+		//make sure event manager plugin active
31
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
32
+		$this->waitForPageLoadAndCheckForErrors();
33
+		$is_active = $this->byId("geodirectory-events")->attribute('class');
34
+		$this->assertFalse( strpos($is_active, 'inactive'), "event manager plugin not active");
35
+		if (strpos($is_active, 'inactive')) {
36
+			return;
37
+		}
38
+
39
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=general_settings');
40
+		$this->waitForPageLoadAndCheckForErrors();
41
+		$this->byLinkText('Event Dummy Data')->click();
42
+
43
+		$html = $this->byId('sub_gdevent_dummy_data_settings')->attribute('innerHTML');
44
+		if (is_int(strpos($html, 'Yes Delete Please!'))) {
45
+			//delete event data
46
+		}
47
+
48
+	}
49
+
50
+	public function tearDown()
51
+	{
52
+		if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
53
+			//write current file number to completed.txt
54
+			$CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
55
+			$completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
56
+			fwrite($completed, $CurrentFileNumber);
57
+		}
58
+	}
59 59
 }
60 60
 ?>
61 61
\ 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
         $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
32 32
         $this->waitForPageLoadAndCheckForErrors();
33 33
         $is_active = $this->byId("geodirectory-events")->attribute('class');
34
-        $this->assertFalse( strpos($is_active, 'inactive'), "event manager plugin not active");
34
+        $this->assertFalse(strpos($is_active, 'inactive'), "event manager plugin not active");
35 35
         if (strpos($is_active, 'inactive')) {
36 36
             return;
37 37
         }
Please login to merge, or discard this patch.
tests/selenium/stest-09_Sort_Listing.php 1 patch
Indentation   +63 added lines, -63 removed lines patch added patch discarded remove patch
@@ -1,40 +1,40 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 class SortListing 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 testSortListing()
18
-    {
19
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=gd_place_fields_settings&subtab=custom_fields&listing_type=gd_place');
20
-        $this->waitForPageLoadAndCheckForErrors();
21
-        $this->byId('gt-text')->click();
22
-        $this->waitForPageLoadAndCheckForErrors();
17
+	public function testSortListing()
18
+	{
19
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=gd_place_fields_settings&subtab=custom_fields&listing_type=gd_place');
20
+		$this->waitForPageLoadAndCheckForErrors();
21
+		$this->byId('gt-text')->click();
22
+		$this->waitForPageLoadAndCheckForErrors();
23 23
 
24
-        $link = $this->byXPath("//li[@id='licontainer_new9']/div[contains(@class,'titlenew9')]");
25
-        $this->moveto($link);
26
-        $this->doubleclick();
27
-        $this->waitForPageLoadAndCheckForErrors();
28
-        $this->byXPath("//div[@id='field_frmnew9']//input[@id='admin_title']")->value('Price');
29
-        $this->byXPath("//div[@id='field_frmnew9']//input[@id='site_title']")->value('Price');
30
-        $this->byXPath("//div[@id='field_frmnew9']//input[@id='htmlvar_name']")->value('price');
31
-        $this->byXPath("//div[@id='field_frmnew9']//input[@id='clabels']")->value('Price');
32
-        $this->select($this->byXPath("//div[@id='field_frmnew9']//select[@id='is_active']"))->selectOptionByLabel('Yes');
33
-        $this->select($this->byXPath("//div[@id='field_frmnew9']//select[@id='show_on_listing']"))->selectOptionByLabel('Yes');
34
-        $this->select($this->byXPath("//div[@id='field_frmnew9']//select[@id='show_on_detail']"))->selectOptionByLabel('Yes');
35
-        $this->byXPath("//div[@id='field_frmnew9']//input[@id='cat_sort']")->click();
36
-        $this->byXPath("//div[@id='field_frmnew9']//input[@id='cat_filter']")->click();
37
-        $this->byXPath("//div[@id='field_frmnew9']//input[@id='save']")->click();
24
+		$link = $this->byXPath("//li[@id='licontainer_new9']/div[contains(@class,'titlenew9')]");
25
+		$this->moveto($link);
26
+		$this->doubleclick();
27
+		$this->waitForPageLoadAndCheckForErrors();
28
+		$this->byXPath("//div[@id='field_frmnew9']//input[@id='admin_title']")->value('Price');
29
+		$this->byXPath("//div[@id='field_frmnew9']//input[@id='site_title']")->value('Price');
30
+		$this->byXPath("//div[@id='field_frmnew9']//input[@id='htmlvar_name']")->value('price');
31
+		$this->byXPath("//div[@id='field_frmnew9']//input[@id='clabels']")->value('Price');
32
+		$this->select($this->byXPath("//div[@id='field_frmnew9']//select[@id='is_active']"))->selectOptionByLabel('Yes');
33
+		$this->select($this->byXPath("//div[@id='field_frmnew9']//select[@id='show_on_listing']"))->selectOptionByLabel('Yes');
34
+		$this->select($this->byXPath("//div[@id='field_frmnew9']//select[@id='show_on_detail']"))->selectOptionByLabel('Yes');
35
+		$this->byXPath("//div[@id='field_frmnew9']//input[@id='cat_sort']")->click();
36
+		$this->byXPath("//div[@id='field_frmnew9']//input[@id='cat_filter']")->click();
37
+		$this->byXPath("//div[@id='field_frmnew9']//input[@id='save']")->click();
38 38
 //        $this->byId('admin_title')->value('Price');
39 39
 //        $this->byId('site_title')->value('Price');
40 40
 //        $this->byId('htmlvar_name')->value('price');
@@ -45,10 +45,10 @@  discard block
 block discarded – undo
45 45
 //        $this->byId('cat_sort')->click();
46 46
 //        $this->byId('cat_filter')->click();
47 47
 //        $this->byId('save')->click();
48
-        $this->waitForPageLoadAndCheckForErrors();
48
+		$this->waitForPageLoadAndCheckForErrors();
49 49
 
50
-        $this->logInfo('Testing list sorting......');
51
-        //Make sure sorting options available
50
+		$this->logInfo('Testing list sorting......');
51
+		//Make sure sorting options available
52 52
 //        $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=gd_place_fields_settings&subtab=sorting_options&listing_type=gd_place');
53 53
 //        $this->waitForPageLoadAndCheckForErrors();
54 54
 //        $this->byId('gt-text-_-geodir_price')->click();
@@ -63,37 +63,37 @@  discard block
 block discarded – undo
63 63
 //        $this->byXPath("//div[@id='field_frmnew-1']//input[@id='save']")->click();
64 64
 //        $this->waitForPageLoadAndCheckForErrors();
65 65
 
66
-        $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=gd_place_fields_settings&subtab=sorting_options&listing_type=gd_place');
67
-        $this->waitForPageLoadAndCheckForErrors();
68
-        $this->byId('gt-float-_-overall_rating')->click();
69
-        $this->waitForPageLoadAndCheckForErrors();
70
-        $link = $this->byXPath("//li[@id='licontainer_new-1']/div");
71
-        $this->moveto($link);
72
-        $this->doubleclick();
73
-        $this->waitForPageLoadAndCheckForErrors();
74
-        $this->byXPath("//li[@id='licontainer_new-1']//input[@id='asc_title']")->value('Rating ASC');
75
-        $this->byXPath("//li[@id='licontainer_new-1']//input[@id='asc']")->click();
76
-        $this->byXPath("//li[@id='licontainer_new-1']//input[contains(@name,'is_default') and contains(@value,'overall_rating_asc')]")->click();
77
-        $this->byXPath("//li[@id='licontainer_new-1']//input[@id='desc']")->click();
78
-        $this->byXPath("//li[@id='licontainer_new-1']//input[@id='desc_title']")->value('Rating DESC');
79
-        $this->byXPath("//li[@id='licontainer_new-1']//input[@id='save']")->click();
80
-        $this->waitForPageLoadAndCheckForErrors();
66
+		$this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=gd_place_fields_settings&subtab=sorting_options&listing_type=gd_place');
67
+		$this->waitForPageLoadAndCheckForErrors();
68
+		$this->byId('gt-float-_-overall_rating')->click();
69
+		$this->waitForPageLoadAndCheckForErrors();
70
+		$link = $this->byXPath("//li[@id='licontainer_new-1']/div");
71
+		$this->moveto($link);
72
+		$this->doubleclick();
73
+		$this->waitForPageLoadAndCheckForErrors();
74
+		$this->byXPath("//li[@id='licontainer_new-1']//input[@id='asc_title']")->value('Rating ASC');
75
+		$this->byXPath("//li[@id='licontainer_new-1']//input[@id='asc']")->click();
76
+		$this->byXPath("//li[@id='licontainer_new-1']//input[contains(@name,'is_default') and contains(@value,'overall_rating_asc')]")->click();
77
+		$this->byXPath("//li[@id='licontainer_new-1']//input[@id='desc']")->click();
78
+		$this->byXPath("//li[@id='licontainer_new-1']//input[@id='desc_title']")->value('Rating DESC');
79
+		$this->byXPath("//li[@id='licontainer_new-1']//input[@id='save']")->click();
80
+		$this->waitForPageLoadAndCheckForErrors();
81 81
 
82 82
 
83
-        $this->url(self::GDTEST_BASE_URL.'places/');
84
-        $this->waitForPageLoadAndCheckForErrors();
85
-        $this->select($this->byId('sort_by'))->selectOptionByLabel('Rating DESC');
86
-        $this->waitForPageLoadAndCheckForErrors();
87
-    }
83
+		$this->url(self::GDTEST_BASE_URL.'places/');
84
+		$this->waitForPageLoadAndCheckForErrors();
85
+		$this->select($this->byId('sort_by'))->selectOptionByLabel('Rating DESC');
86
+		$this->waitForPageLoadAndCheckForErrors();
87
+	}
88 88
 
89
-    public function tearDown()
90
-    {
91
-        if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
92
-            //write current file number to completed.txt
93
-            $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
94
-            $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
95
-            fwrite($completed, $CurrentFileNumber);
96
-        }
97
-    }
89
+	public function tearDown()
90
+	{
91
+		if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
92
+			//write current file number to completed.txt
93
+			$CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
94
+			$completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
95
+			fwrite($completed, $CurrentFileNumber);
96
+		}
97
+	}
98 98
 }
99 99
 ?>
100 100
\ No newline at end of file
Please login to merge, or discard this patch.
tests/selenium/stest-21_Search_Near_Me.php 1 patch
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -1,23 +1,23 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 class SearchNearMe 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 testSearchNearMe()
18
-    {
19
-        $this->logInfo('Test search near me......');
20
-        $this->logInfo('Skipping since user need to share the location manually......');
17
+	public function testSearchNearMe()
18
+	{
19
+		$this->logInfo('Test search near me......');
20
+		$this->logInfo('Skipping since user need to share the location manually......');
21 21
 //        $this->logInfo('Test search near me......');
22 22
 //        //make sure event manager plugin active
23 23
 //        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
@@ -44,16 +44,16 @@  discard block
 block discarded – undo
44 44
 //        $this->waitForPageLoadAndCheckForErrors();
45 45
 //        $this->assertTrue( $this->isTextPresent("Search Places For"), "Not in search results page");
46 46
 
47
-    }
47
+	}
48 48
 
49
-    public function tearDown()
50
-    {
51
-        if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
52
-            //write current file number to completed.txt
53
-            $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
54
-            $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
55
-            fwrite($completed, $CurrentFileNumber);
56
-        }
57
-    }
49
+	public function tearDown()
50
+	{
51
+		if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
52
+			//write current file number to completed.txt
53
+			$CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
54
+			$completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
55
+			fwrite($completed, $CurrentFileNumber);
56
+		}
57
+	}
58 58
 }
59 59
 ?>
60 60
\ No newline at end of file
Please login to merge, or discard this patch.
tests/selenium/stest-16_Add_New_Price.php 2 patches
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -1,41 +1,41 @@
 block discarded – undo
1 1
 <?php
2 2
 class AddNewPrice extends GD_Test
3 3
 {
4
-    public function setUp()
5
-    {
6
-        parent::setUp();
4
+	public function setUp()
5
+	{
6
+		parent::setUp();
7 7
 
8
-        //skip test if already completed.
9
-        if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
10
-            $this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......');
11
-            return;
12
-        } else {
13
-            $this->prepareSession()->currentWindow()->maximize();
14
-        }
15
-    }
8
+		//skip test if already completed.
9
+		if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
10
+			$this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......');
11
+			return;
12
+		} else {
13
+			$this->prepareSession()->currentWindow()->maximize();
14
+		}
15
+	}
16 16
 
17
-    public function testAddNewPrice()
18
-    {
19
-        $this->logInfo('Add a new price......');
20
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=paymentmanager_fields&subtab=geodir_payment_manager&gd_pagetype=addeditprice');
21
-        $this->waitForPageLoadAndCheckForErrors();
22
-        $this->assertTrue( $this->isTextPresent("Add Price"), "Add Price text not found");
23
-        $this->byId('title')->value('Premium Plus');
24
-        $this->byId('days')->value('0');
25
-        $this->byName('gd_amount')->value('5');
26
-        $this->select($this->byName('gd_status'))->selectOptionByValue(1);
27
-        $this->byName('submit')->click();
28
-        $this->waitForPageLoadAndCheckForErrors();
29
-    }
17
+	public function testAddNewPrice()
18
+	{
19
+		$this->logInfo('Add a new price......');
20
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=paymentmanager_fields&subtab=geodir_payment_manager&gd_pagetype=addeditprice');
21
+		$this->waitForPageLoadAndCheckForErrors();
22
+		$this->assertTrue( $this->isTextPresent("Add Price"), "Add Price text not found");
23
+		$this->byId('title')->value('Premium Plus');
24
+		$this->byId('days')->value('0');
25
+		$this->byName('gd_amount')->value('5');
26
+		$this->select($this->byName('gd_status'))->selectOptionByValue(1);
27
+		$this->byName('submit')->click();
28
+		$this->waitForPageLoadAndCheckForErrors();
29
+	}
30 30
 
31
-    public function tearDown()
32
-    {
33
-        if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
34
-            //write current file number to completed.txt
35
-            $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
36
-            $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
37
-            fwrite($completed, $CurrentFileNumber);
38
-        }
39
-    }
31
+	public function tearDown()
32
+	{
33
+		if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
34
+			//write current file number to completed.txt
35
+			$CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
36
+			$completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
37
+			fwrite($completed, $CurrentFileNumber);
38
+		}
39
+	}
40 40
 }
41 41
 ?>
42 42
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
         $this->logInfo('Add a new price......');
20 20
         $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=paymentmanager_fields&subtab=geodir_payment_manager&gd_pagetype=addeditprice');
21 21
         $this->waitForPageLoadAndCheckForErrors();
22
-        $this->assertTrue( $this->isTextPresent("Add Price"), "Add Price text not found");
22
+        $this->assertTrue($this->isTextPresent("Add Price"), "Add Price text not found");
23 23
         $this->byId('title')->value('Premium Plus');
24 24
         $this->byId('days')->value('0');
25 25
         $this->byName('gd_amount')->value('5');
Please login to merge, or discard this patch.