Test Failed
Push — master ( c9cfa7...621ef4 )
by Stiofan
13:38 queued 49s
created
tests/selenium/stest-41_Check_Shortcodes.php 2 patches
Indentation   +159 added lines, -159 removed lines patch added patch discarded remove patch
@@ -1,164 +1,164 @@
 block discarded – undo
1 1
 <?php
2 2
 class CheckShortcodes 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 testCheckShortcodes()
18
-    {
19
-        $this->logInfo('Testing shortcodes......');
20
-
21
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/post-new.php?post_type=page');
22
-        $this->waitForPageLoadAndCheckForErrors();
23
-        $this->byId('title')->value('Shortcode Test: Home Page Map');
24
-        $this->byId('content')->value('[gd_homepage_map width=100% height=300 scrollwheel=false]');
25
-        $this->byId('publish')->click();
26
-        $this->waitForPageLoadAndCheckForErrors();
27
-        $this->byLinkText('View page')->click();
28
-        $this->waitForPageLoadAndCheckForErrors();
29
-        $this->assertTrue( $this->isTextPresent("geodir-map-home-page"), "Home page map not found");
30
-
31
-
32
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/post-new.php?post_type=page');
33
-        $this->waitForPageLoadAndCheckForErrors();
34
-        $this->byId('title')->value('Shortcode Test: Custom Post Type Categories');
35
-        $this->byId('content')->value('[gd_cpt_categories show_count=1]');
36
-        $this->byId('publish')->click();
37
-        $this->waitForPageLoadAndCheckForErrors();
38
-        $this->byLinkText('View page')->click();
39
-        $this->waitForPageLoadAndCheckForErrors();
40
-        $this->assertTrue( $this->isTextPresent("gd-cptcats-widget"), "Custom Post Type Categories not found");
41
-
42
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/post-new.php?post_type=page');
43
-        $this->waitForPageLoadAndCheckForErrors();
44
-        $this->byId('title')->value('Shortcode Test: Listings Page Map');
45
-        $this->byId('content')->value('[gd_listing_map width=100% height=300 scrollwheel=false sticky=true]');
46
-        $this->byId('publish')->click();
47
-        $this->waitForPageLoadAndCheckForErrors();
48
-        $this->byLinkText('View page')->click();
49
-        $this->waitForPageLoadAndCheckForErrors();
50
-        $this->assertTrue( $this->isTextPresent("geodir-map-listing-page"), "Listings Page Map not found");
51
-
52
-
53
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/post-new.php?post_type=page');
54
-        $this->waitForPageLoadAndCheckForErrors();
55
-        $this->byId('title')->value('Shortcode Test: Listing Slider');
56
-        $this->byId('content')->value('[gd_listing_slider post_number=5 category=3 slideshow=true show_featured_only=true]');
57
-        $this->byId('publish')->click();
58
-        $this->waitForPageLoadAndCheckForErrors();
59
-        $this->byLinkText('View page')->click();
60
-        $this->waitForPageLoadAndCheckForErrors();
61
-        $this->assertTrue( $this->isTextPresent("geodir_widget_carousel"), "Listing Slider not found");
62
-
63
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/post-new.php?post_type=page');
64
-        $this->waitForPageLoadAndCheckForErrors();
65
-        $this->byId('title')->value('Shortcode Test: Login Box');
66
-        $this->byId('content')->value('[gd_login_box]');
67
-        $this->byId('publish')->click();
68
-        $this->waitForPageLoadAndCheckForErrors();
69
-        $this->byLinkText('View page')->click();
70
-        $this->waitForPageLoadAndCheckForErrors();
71
-        $this->assertTrue( $this->isTextPresent("geodir-loginbox-list"), "Login Box not found");
72
-
73
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/post-new.php?post_type=page');
74
-        $this->waitForPageLoadAndCheckForErrors();
75
-        $this->byId('title')->value('Shortcode Test: Popular Post Category');
76
-        $this->byId('content')->value('[gd_popular_post_category category_limit=10]');
77
-        $this->byId('publish')->click();
78
-        $this->waitForPageLoadAndCheckForErrors();
79
-        $this->byLinkText('View page')->click();
80
-        $this->waitForPageLoadAndCheckForErrors();
81
-        $this->assertTrue( $this->isTextPresent("geodir-popular-cat-list"), "Popular Post Category not found");
82
-
83
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/post-new.php?post_type=page');
84
-        $this->waitForPageLoadAndCheckForErrors();
85
-        $this->byId('title')->value('Shortcode Test: Popular Post View');
86
-        $this->byId('content')->value('[gd_popular_post_view category=3 layout=5 add_location_filter=true character_count=0 show_featured_only=true]');
87
-        $this->byId('publish')->click();
88
-        $this->waitForPageLoadAndCheckForErrors();
89
-        $this->byLinkText('View page')->click();
90
-        $this->waitForPageLoadAndCheckForErrors();
91
-        $this->assertTrue( $this->isTextPresent("geodir_category_list_view"), "Popular Post View not found");
92
-
93
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/post-new.php?post_type=page');
94
-        $this->waitForPageLoadAndCheckForErrors();
95
-        $this->byId('title')->value('Shortcode Test: Recent Review');
96
-        $this->byId('content')->value('[gd_recent_reviews count=5]');
97
-        $this->byId('publish')->click();
98
-        $this->waitForPageLoadAndCheckForErrors();
99
-        $this->byLinkText('View page')->click();
100
-        $this->waitForPageLoadAndCheckForErrors();
101
-        $this->assertTrue( $this->isTextPresent("geodir_sc_recent_reviews"), "Recent Review not found");
102
-
103
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/post-new.php?post_type=page');
104
-        $this->waitForPageLoadAndCheckForErrors();
105
-        $this->byId('title')->value('Shortcode Test: Related Listings');
106
-        $this->byId('content')->value('[gd_related_listings relate_to=tags layout=3 add_location_filter=true list_sort=featured character_count=0]');
107
-        $this->byId('publish')->click();
108
-        $this->waitForPageLoadAndCheckForErrors();
109
-        $this->byLinkText('View page')->click();
110
-        $this->waitForPageLoadAndCheckForErrors();
111
-        $this->assertTrue( $this->isTextPresent("geodir_location_listing"), "Related Listings not found");
112
-
113
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/post-new.php?post_type=page');
114
-        $this->waitForPageLoadAndCheckForErrors();
115
-        $this->byId('title')->value('Shortcode Test: Search');
116
-        $this->byId('content')->value('[gd_advanced_search]');
117
-        $this->byId('publish')->click();
118
-        $this->waitForPageLoadAndCheckForErrors();
119
-        $this->byLinkText('View page')->click();
120
-        $this->waitForPageLoadAndCheckForErrors();
121
-        $this->assertTrue( $this->isTextPresent("geodir-map-home-page"), "Search not found");
122
-
123
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/post-new.php?post_type=page');
124
-        $this->waitForPageLoadAndCheckForErrors();
125
-        $this->byId('title')->value('Shortcode Test: GD Listings');
126
-        $this->byId('content')->value('[gd_listings post_type="gd_place" category="1,3" post_number="10" list_sort="high_review"]');
127
-        $this->byId('publish')->click();
128
-        $this->waitForPageLoadAndCheckForErrors();
129
-        $this->byLinkText('View page')->click();
130
-        $this->waitForPageLoadAndCheckForErrors();
131
-        $this->assertTrue( $this->isTextPresent("geodir-sc-gd-listings"), "GD Listings not found");
132
-
133
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/post-new.php?post_type=page');
134
-        $this->waitForPageLoadAndCheckForErrors();
135
-        $this->byId('title')->value('Shortcode Test: GD Best of');
136
-        $this->byId('content')->value('[gd_bestof_widget title="widget title" post_type=gd_hotel post_limit=5 categ_limit=6 character_count=50 use_viewing_post_type=true add_location_filter=true tab_layout=bestof-tabs-as-dropdown]');
137
-        $this->byId('publish')->click();
138
-        $this->waitForPageLoadAndCheckForErrors();
139
-        $this->byLinkText('View page')->click();
140
-        $this->waitForPageLoadAndCheckForErrors();
141
-        $this->assertTrue( $this->isTextPresent("geodir_bestof_widget"), "GD Best of not found");
142
-
143
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/post-new.php?post_type=page');
144
-        $this->waitForPageLoadAndCheckForErrors();
145
-        $this->byId('title')->value('Shortcode Test: Add Listing Form');
146
-        $this->byId('content')->value('[gd_add_listing listing_type=gd_event login_msg="Please register and login to submit listings" show_login=true]');
147
-        $this->byId('publish')->click();
148
-        $this->waitForPageLoadAndCheckForErrors();
149
-        $this->byLinkText('View page')->click();
150
-        $this->waitForPageLoadAndCheckForErrors();
151
-        $this->assertTrue( $this->isTextPresent("geodir-add-listing-submit"), "Add Listing Form not found");
152
-    }
153
-
154
-    public function tearDown()
155
-    {
156
-        if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
157
-            //write current file number to completed.txt
158
-            $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
159
-            $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
160
-            fwrite($completed, $CurrentFileNumber);
161
-        }
162
-    }
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 testCheckShortcodes()
18
+	{
19
+		$this->logInfo('Testing shortcodes......');
20
+
21
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/post-new.php?post_type=page');
22
+		$this->waitForPageLoadAndCheckForErrors();
23
+		$this->byId('title')->value('Shortcode Test: Home Page Map');
24
+		$this->byId('content')->value('[gd_homepage_map width=100% height=300 scrollwheel=false]');
25
+		$this->byId('publish')->click();
26
+		$this->waitForPageLoadAndCheckForErrors();
27
+		$this->byLinkText('View page')->click();
28
+		$this->waitForPageLoadAndCheckForErrors();
29
+		$this->assertTrue( $this->isTextPresent("geodir-map-home-page"), "Home page map not found");
30
+
31
+
32
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/post-new.php?post_type=page');
33
+		$this->waitForPageLoadAndCheckForErrors();
34
+		$this->byId('title')->value('Shortcode Test: Custom Post Type Categories');
35
+		$this->byId('content')->value('[gd_cpt_categories show_count=1]');
36
+		$this->byId('publish')->click();
37
+		$this->waitForPageLoadAndCheckForErrors();
38
+		$this->byLinkText('View page')->click();
39
+		$this->waitForPageLoadAndCheckForErrors();
40
+		$this->assertTrue( $this->isTextPresent("gd-cptcats-widget"), "Custom Post Type Categories not found");
41
+
42
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/post-new.php?post_type=page');
43
+		$this->waitForPageLoadAndCheckForErrors();
44
+		$this->byId('title')->value('Shortcode Test: Listings Page Map');
45
+		$this->byId('content')->value('[gd_listing_map width=100% height=300 scrollwheel=false sticky=true]');
46
+		$this->byId('publish')->click();
47
+		$this->waitForPageLoadAndCheckForErrors();
48
+		$this->byLinkText('View page')->click();
49
+		$this->waitForPageLoadAndCheckForErrors();
50
+		$this->assertTrue( $this->isTextPresent("geodir-map-listing-page"), "Listings Page Map not found");
51
+
52
+
53
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/post-new.php?post_type=page');
54
+		$this->waitForPageLoadAndCheckForErrors();
55
+		$this->byId('title')->value('Shortcode Test: Listing Slider');
56
+		$this->byId('content')->value('[gd_listing_slider post_number=5 category=3 slideshow=true show_featured_only=true]');
57
+		$this->byId('publish')->click();
58
+		$this->waitForPageLoadAndCheckForErrors();
59
+		$this->byLinkText('View page')->click();
60
+		$this->waitForPageLoadAndCheckForErrors();
61
+		$this->assertTrue( $this->isTextPresent("geodir_widget_carousel"), "Listing Slider not found");
62
+
63
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/post-new.php?post_type=page');
64
+		$this->waitForPageLoadAndCheckForErrors();
65
+		$this->byId('title')->value('Shortcode Test: Login Box');
66
+		$this->byId('content')->value('[gd_login_box]');
67
+		$this->byId('publish')->click();
68
+		$this->waitForPageLoadAndCheckForErrors();
69
+		$this->byLinkText('View page')->click();
70
+		$this->waitForPageLoadAndCheckForErrors();
71
+		$this->assertTrue( $this->isTextPresent("geodir-loginbox-list"), "Login Box not found");
72
+
73
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/post-new.php?post_type=page');
74
+		$this->waitForPageLoadAndCheckForErrors();
75
+		$this->byId('title')->value('Shortcode Test: Popular Post Category');
76
+		$this->byId('content')->value('[gd_popular_post_category category_limit=10]');
77
+		$this->byId('publish')->click();
78
+		$this->waitForPageLoadAndCheckForErrors();
79
+		$this->byLinkText('View page')->click();
80
+		$this->waitForPageLoadAndCheckForErrors();
81
+		$this->assertTrue( $this->isTextPresent("geodir-popular-cat-list"), "Popular Post Category not found");
82
+
83
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/post-new.php?post_type=page');
84
+		$this->waitForPageLoadAndCheckForErrors();
85
+		$this->byId('title')->value('Shortcode Test: Popular Post View');
86
+		$this->byId('content')->value('[gd_popular_post_view category=3 layout=5 add_location_filter=true character_count=0 show_featured_only=true]');
87
+		$this->byId('publish')->click();
88
+		$this->waitForPageLoadAndCheckForErrors();
89
+		$this->byLinkText('View page')->click();
90
+		$this->waitForPageLoadAndCheckForErrors();
91
+		$this->assertTrue( $this->isTextPresent("geodir_category_list_view"), "Popular Post View not found");
92
+
93
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/post-new.php?post_type=page');
94
+		$this->waitForPageLoadAndCheckForErrors();
95
+		$this->byId('title')->value('Shortcode Test: Recent Review');
96
+		$this->byId('content')->value('[gd_recent_reviews count=5]');
97
+		$this->byId('publish')->click();
98
+		$this->waitForPageLoadAndCheckForErrors();
99
+		$this->byLinkText('View page')->click();
100
+		$this->waitForPageLoadAndCheckForErrors();
101
+		$this->assertTrue( $this->isTextPresent("geodir_sc_recent_reviews"), "Recent Review not found");
102
+
103
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/post-new.php?post_type=page');
104
+		$this->waitForPageLoadAndCheckForErrors();
105
+		$this->byId('title')->value('Shortcode Test: Related Listings');
106
+		$this->byId('content')->value('[gd_related_listings relate_to=tags layout=3 add_location_filter=true list_sort=featured character_count=0]');
107
+		$this->byId('publish')->click();
108
+		$this->waitForPageLoadAndCheckForErrors();
109
+		$this->byLinkText('View page')->click();
110
+		$this->waitForPageLoadAndCheckForErrors();
111
+		$this->assertTrue( $this->isTextPresent("geodir_location_listing"), "Related Listings not found");
112
+
113
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/post-new.php?post_type=page');
114
+		$this->waitForPageLoadAndCheckForErrors();
115
+		$this->byId('title')->value('Shortcode Test: Search');
116
+		$this->byId('content')->value('[gd_advanced_search]');
117
+		$this->byId('publish')->click();
118
+		$this->waitForPageLoadAndCheckForErrors();
119
+		$this->byLinkText('View page')->click();
120
+		$this->waitForPageLoadAndCheckForErrors();
121
+		$this->assertTrue( $this->isTextPresent("geodir-map-home-page"), "Search not found");
122
+
123
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/post-new.php?post_type=page');
124
+		$this->waitForPageLoadAndCheckForErrors();
125
+		$this->byId('title')->value('Shortcode Test: GD Listings');
126
+		$this->byId('content')->value('[gd_listings post_type="gd_place" category="1,3" post_number="10" list_sort="high_review"]');
127
+		$this->byId('publish')->click();
128
+		$this->waitForPageLoadAndCheckForErrors();
129
+		$this->byLinkText('View page')->click();
130
+		$this->waitForPageLoadAndCheckForErrors();
131
+		$this->assertTrue( $this->isTextPresent("geodir-sc-gd-listings"), "GD Listings not found");
132
+
133
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/post-new.php?post_type=page');
134
+		$this->waitForPageLoadAndCheckForErrors();
135
+		$this->byId('title')->value('Shortcode Test: GD Best of');
136
+		$this->byId('content')->value('[gd_bestof_widget title="widget title" post_type=gd_hotel post_limit=5 categ_limit=6 character_count=50 use_viewing_post_type=true add_location_filter=true tab_layout=bestof-tabs-as-dropdown]');
137
+		$this->byId('publish')->click();
138
+		$this->waitForPageLoadAndCheckForErrors();
139
+		$this->byLinkText('View page')->click();
140
+		$this->waitForPageLoadAndCheckForErrors();
141
+		$this->assertTrue( $this->isTextPresent("geodir_bestof_widget"), "GD Best of not found");
142
+
143
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/post-new.php?post_type=page');
144
+		$this->waitForPageLoadAndCheckForErrors();
145
+		$this->byId('title')->value('Shortcode Test: Add Listing Form');
146
+		$this->byId('content')->value('[gd_add_listing listing_type=gd_event login_msg="Please register and login to submit listings" show_login=true]');
147
+		$this->byId('publish')->click();
148
+		$this->waitForPageLoadAndCheckForErrors();
149
+		$this->byLinkText('View page')->click();
150
+		$this->waitForPageLoadAndCheckForErrors();
151
+		$this->assertTrue( $this->isTextPresent("geodir-add-listing-submit"), "Add Listing Form not found");
152
+	}
153
+
154
+	public function tearDown()
155
+	{
156
+		if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
157
+			//write current file number to completed.txt
158
+			$CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
159
+			$completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
160
+			fwrite($completed, $CurrentFileNumber);
161
+		}
162
+	}
163 163
 }
164 164
 ?>
165 165
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
         $this->waitForPageLoadAndCheckForErrors();
27 27
         $this->byLinkText('View page')->click();
28 28
         $this->waitForPageLoadAndCheckForErrors();
29
-        $this->assertTrue( $this->isTextPresent("geodir-map-home-page"), "Home page map not found");
29
+        $this->assertTrue($this->isTextPresent("geodir-map-home-page"), "Home page map not found");
30 30
 
31 31
 
32 32
         $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/post-new.php?post_type=page');
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         $this->waitForPageLoadAndCheckForErrors();
38 38
         $this->byLinkText('View page')->click();
39 39
         $this->waitForPageLoadAndCheckForErrors();
40
-        $this->assertTrue( $this->isTextPresent("gd-cptcats-widget"), "Custom Post Type Categories not found");
40
+        $this->assertTrue($this->isTextPresent("gd-cptcats-widget"), "Custom Post Type Categories not found");
41 41
 
42 42
         $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/post-new.php?post_type=page');
43 43
         $this->waitForPageLoadAndCheckForErrors();
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         $this->waitForPageLoadAndCheckForErrors();
48 48
         $this->byLinkText('View page')->click();
49 49
         $this->waitForPageLoadAndCheckForErrors();
50
-        $this->assertTrue( $this->isTextPresent("geodir-map-listing-page"), "Listings Page Map not found");
50
+        $this->assertTrue($this->isTextPresent("geodir-map-listing-page"), "Listings Page Map not found");
51 51
 
52 52
 
53 53
         $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/post-new.php?post_type=page');
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         $this->waitForPageLoadAndCheckForErrors();
59 59
         $this->byLinkText('View page')->click();
60 60
         $this->waitForPageLoadAndCheckForErrors();
61
-        $this->assertTrue( $this->isTextPresent("geodir_widget_carousel"), "Listing Slider not found");
61
+        $this->assertTrue($this->isTextPresent("geodir_widget_carousel"), "Listing Slider not found");
62 62
 
63 63
         $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/post-new.php?post_type=page');
64 64
         $this->waitForPageLoadAndCheckForErrors();
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         $this->waitForPageLoadAndCheckForErrors();
69 69
         $this->byLinkText('View page')->click();
70 70
         $this->waitForPageLoadAndCheckForErrors();
71
-        $this->assertTrue( $this->isTextPresent("geodir-loginbox-list"), "Login Box not found");
71
+        $this->assertTrue($this->isTextPresent("geodir-loginbox-list"), "Login Box not found");
72 72
 
73 73
         $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/post-new.php?post_type=page');
74 74
         $this->waitForPageLoadAndCheckForErrors();
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
         $this->waitForPageLoadAndCheckForErrors();
79 79
         $this->byLinkText('View page')->click();
80 80
         $this->waitForPageLoadAndCheckForErrors();
81
-        $this->assertTrue( $this->isTextPresent("geodir-popular-cat-list"), "Popular Post Category not found");
81
+        $this->assertTrue($this->isTextPresent("geodir-popular-cat-list"), "Popular Post Category not found");
82 82
 
83 83
         $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/post-new.php?post_type=page');
84 84
         $this->waitForPageLoadAndCheckForErrors();
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
         $this->waitForPageLoadAndCheckForErrors();
89 89
         $this->byLinkText('View page')->click();
90 90
         $this->waitForPageLoadAndCheckForErrors();
91
-        $this->assertTrue( $this->isTextPresent("geodir_category_list_view"), "Popular Post View not found");
91
+        $this->assertTrue($this->isTextPresent("geodir_category_list_view"), "Popular Post View not found");
92 92
 
93 93
         $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/post-new.php?post_type=page');
94 94
         $this->waitForPageLoadAndCheckForErrors();
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         $this->waitForPageLoadAndCheckForErrors();
99 99
         $this->byLinkText('View page')->click();
100 100
         $this->waitForPageLoadAndCheckForErrors();
101
-        $this->assertTrue( $this->isTextPresent("geodir_sc_recent_reviews"), "Recent Review not found");
101
+        $this->assertTrue($this->isTextPresent("geodir_sc_recent_reviews"), "Recent Review not found");
102 102
 
103 103
         $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/post-new.php?post_type=page');
104 104
         $this->waitForPageLoadAndCheckForErrors();
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
         $this->waitForPageLoadAndCheckForErrors();
109 109
         $this->byLinkText('View page')->click();
110 110
         $this->waitForPageLoadAndCheckForErrors();
111
-        $this->assertTrue( $this->isTextPresent("geodir_location_listing"), "Related Listings not found");
111
+        $this->assertTrue($this->isTextPresent("geodir_location_listing"), "Related Listings not found");
112 112
 
113 113
         $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/post-new.php?post_type=page');
114 114
         $this->waitForPageLoadAndCheckForErrors();
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
         $this->waitForPageLoadAndCheckForErrors();
119 119
         $this->byLinkText('View page')->click();
120 120
         $this->waitForPageLoadAndCheckForErrors();
121
-        $this->assertTrue( $this->isTextPresent("geodir-map-home-page"), "Search not found");
121
+        $this->assertTrue($this->isTextPresent("geodir-map-home-page"), "Search not found");
122 122
 
123 123
         $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/post-new.php?post_type=page');
124 124
         $this->waitForPageLoadAndCheckForErrors();
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
         $this->waitForPageLoadAndCheckForErrors();
129 129
         $this->byLinkText('View page')->click();
130 130
         $this->waitForPageLoadAndCheckForErrors();
131
-        $this->assertTrue( $this->isTextPresent("geodir-sc-gd-listings"), "GD Listings not found");
131
+        $this->assertTrue($this->isTextPresent("geodir-sc-gd-listings"), "GD Listings not found");
132 132
 
133 133
         $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/post-new.php?post_type=page');
134 134
         $this->waitForPageLoadAndCheckForErrors();
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
         $this->waitForPageLoadAndCheckForErrors();
139 139
         $this->byLinkText('View page')->click();
140 140
         $this->waitForPageLoadAndCheckForErrors();
141
-        $this->assertTrue( $this->isTextPresent("geodir_bestof_widget"), "GD Best of not found");
141
+        $this->assertTrue($this->isTextPresent("geodir_bestof_widget"), "GD Best of not found");
142 142
 
143 143
         $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/post-new.php?post_type=page');
144 144
         $this->waitForPageLoadAndCheckForErrors();
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
         $this->waitForPageLoadAndCheckForErrors();
149 149
         $this->byLinkText('View page')->click();
150 150
         $this->waitForPageLoadAndCheckForErrors();
151
-        $this->assertTrue( $this->isTextPresent("geodir-add-listing-submit"), "Add Listing Form not found");
151
+        $this->assertTrue($this->isTextPresent("geodir-add-listing-submit"), "Add Listing Form not found");
152 152
     }
153 153
 
154 154
     public function tearDown()
Please login to merge, or discard this patch.
tests/selenium/stest-11_Sort_A_Review.php 2 patches
Indentation   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -1,58 +1,58 @@
 block discarded – undo
1 1
 <?php
2 2
 class SortReview 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 testSortReview()
18
-    {
19
-        $this->logInfo('sorting reviews......');
20
-        //make sure advance search filters plugin active
21
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
22
-        $this->waitForPageLoadAndCheckForErrors();
17
+	public function testSortReview()
18
+	{
19
+		$this->logInfo('sorting reviews......');
20
+		//make sure advance search filters plugin active
21
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
22
+		$this->waitForPageLoadAndCheckForErrors();
23 23
 
24
-        $is_active = $this->byId("geodirectory-review-rating-manager")->attribute('class');
25
-        if (is_int(strpos($is_active, 'inactive'))) {
26
-            //Activate Geodirectory Review Rating Manager
27
-            $this->maybeActivatePlugin("geodirectory-review-rating-manager", 20000);
28
-            //go back to plugin page
29
-            $this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
30
-        }
24
+		$is_active = $this->byId("geodirectory-review-rating-manager")->attribute('class');
25
+		if (is_int(strpos($is_active, 'inactive'))) {
26
+			//Activate Geodirectory Review Rating Manager
27
+			$this->maybeActivatePlugin("geodirectory-review-rating-manager", 20000);
28
+			//go back to plugin page
29
+			$this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
30
+		}
31 31
 
32
-        $is_active1 = $this->byId("geodirectory-review-rating-manager")->attribute('class');
33
-        $this->assertFalse( strpos($is_active1, 'inactive'), "Review Rating Manager plugin not active");
32
+		$is_active1 = $this->byId("geodirectory-review-rating-manager")->attribute('class');
33
+		$this->assertFalse( strpos($is_active1, 'inactive'), "Review Rating Manager plugin not active");
34 34
 
35
-        //Make sure Enable comment list sorting checked.
36
-        $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=multirating_fields&subtab=geodir_multirating_options');
37
-        $this->waitForPageLoadAndCheckForErrors();
38
-        $is_checked = $this->byId('geodir_reviewrating_enable_sorting')->attribute('checked');
39
-        if (!$is_checked) {
40
-            $this->byId('geodir_reviewrating_enable_sorting')->click();
41
-            $this->byName('save')->click();
42
-            $this->waitForPageLoadAndCheckForErrors();
43
-        }
44
-        $this->url(self::GDTEST_BASE_URL.'places/united-states/new-york/new-york/attractions/test-listing/?comment_sorting=high_rating');
45
-        $this->waitForPageLoadAndCheckForErrors();
46
-    }
35
+		//Make sure Enable comment list sorting checked.
36
+		$this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=multirating_fields&subtab=geodir_multirating_options');
37
+		$this->waitForPageLoadAndCheckForErrors();
38
+		$is_checked = $this->byId('geodir_reviewrating_enable_sorting')->attribute('checked');
39
+		if (!$is_checked) {
40
+			$this->byId('geodir_reviewrating_enable_sorting')->click();
41
+			$this->byName('save')->click();
42
+			$this->waitForPageLoadAndCheckForErrors();
43
+		}
44
+		$this->url(self::GDTEST_BASE_URL.'places/united-states/new-york/new-york/attractions/test-listing/?comment_sorting=high_rating');
45
+		$this->waitForPageLoadAndCheckForErrors();
46
+	}
47 47
 
48
-    public function tearDown()
49
-    {
50
-        if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
51
-            //write current file number to completed.txt
52
-            $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
53
-            $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
54
-            fwrite($completed, $CurrentFileNumber);
55
-        }
56
-    }
48
+	public function tearDown()
49
+	{
50
+		if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
51
+			//write current file number to completed.txt
52
+			$CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
53
+			$completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
54
+			fwrite($completed, $CurrentFileNumber);
55
+		}
56
+	}
57 57
 }
58 58
 ?>
59 59
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
         }
31 31
 
32 32
         $is_active1 = $this->byId("geodirectory-review-rating-manager")->attribute('class');
33
-        $this->assertFalse( strpos($is_active1, 'inactive'), "Review Rating Manager plugin not active");
33
+        $this->assertFalse(strpos($is_active1, 'inactive'), "Review Rating Manager plugin not active");
34 34
 
35 35
         //Make sure Enable comment list sorting checked.
36 36
         $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=multirating_fields&subtab=geodir_multirating_options');
Please login to merge, or discard this patch.
tests/selenium/stest-03_Add_Listing.php 2 patches
Indentation   +62 added lines, -62 removed lines patch added patch discarded remove patch
@@ -1,70 +1,70 @@
 block discarded – undo
1 1
 <?php
2 2
 class AddListing 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 testAddListing()
18
-    {
19
-        $this->logInfo('Add GD Place listing......');
20
-        $this->url(self::GDTEST_BASE_URL.'add-listing/?listing_type=gd_place');
21
-        $this->waitForPageLoadAndCheckForErrors();
22
-        if ($this->isTextPresent("Sign In")) {
23
-            $this->byId('user_login')->value('[email protected]');
24
-            $this->byId('user_pass')->value('1');
25
-            $this->byId('rememberme')->click();
26
-            // Submit the form
27
-            $this->byId('cus_loginform')->submit();
28
-            $this->waitForPageLoadAndCheckForErrors();
29
-            $this->url(self::GDTEST_BASE_URL.'add-listing/?listing_type=gd_place');
30
-        }
31
-        $this->assertTrue( $this->isTextPresent("Add Place"), "Add Place text not found");
32
-        $this->byId('post_title')->value('Test Listing');
33
-        $this->byId('post_desc')->value('Test Desc');
34
-        $this->byId('post_tags')->value('tag1,tag2');
35
-        $this->ExecuteScript('jQuery("select#gd_placecategory").show();');
36
-        $this->select($this->byXPath("//select[@id='gd_placecategory']"))->selectOptionByLabel('Attractions');
37
-        $this->waitForPageLoadAndCheckForErrors(2000);
38
-        $this->byId('post_address')->value('wall street');
39
-        $this->byId('post_address')->value('10006');
40
-        $this->byId('post_set_address_button')->click();
41
-        $this->waitForPageLoadAndCheckForErrors();
42
-        $this->byId('geodir_timing')->value('10.00 am to 6 pm every day');
43
-        $this->byId('geodir_contact')->value('444444444444');
44
-        $this->byId('geodir_email')->value('[email protected]');
45
-        $this->byId('geodir_website')->value('http://test.com');
46
-        $this->byId('geodir_twitter')->value('http://twitter.com/test');
47
-        $this->byId('geodir_facebook')->value('http://facebook.com/test');
48
-        $this->byId('geodir_special_offers')->value('Test Offer');
49
-        $this->byId('geodir_accept_term_condition')->click();
50
-        // Submit the form
51
-        $this->byXPath("//div[@id='geodir-add-listing-submit']//input[@type='submit']")->click();
52
-        $this->waitForPageLoadAndCheckForErrors();
53
-        $this->assertTrue( $this->isTextPresent("This is a preview of your listing"), "Not in preview page.");
54
-        // Submit the form
55
-        $this->byClassName('geodir_publish_button')->click();
56
-        $this->waitForPageLoadAndCheckForErrors();
57
-        $this->assertTrue( $this->isTextPresent("Thank you, your information has been successfully received"), "Not in success page");
58
-    }
17
+	public function testAddListing()
18
+	{
19
+		$this->logInfo('Add GD Place listing......');
20
+		$this->url(self::GDTEST_BASE_URL.'add-listing/?listing_type=gd_place');
21
+		$this->waitForPageLoadAndCheckForErrors();
22
+		if ($this->isTextPresent("Sign In")) {
23
+			$this->byId('user_login')->value('[email protected]');
24
+			$this->byId('user_pass')->value('1');
25
+			$this->byId('rememberme')->click();
26
+			// Submit the form
27
+			$this->byId('cus_loginform')->submit();
28
+			$this->waitForPageLoadAndCheckForErrors();
29
+			$this->url(self::GDTEST_BASE_URL.'add-listing/?listing_type=gd_place');
30
+		}
31
+		$this->assertTrue( $this->isTextPresent("Add Place"), "Add Place text not found");
32
+		$this->byId('post_title')->value('Test Listing');
33
+		$this->byId('post_desc')->value('Test Desc');
34
+		$this->byId('post_tags')->value('tag1,tag2');
35
+		$this->ExecuteScript('jQuery("select#gd_placecategory").show();');
36
+		$this->select($this->byXPath("//select[@id='gd_placecategory']"))->selectOptionByLabel('Attractions');
37
+		$this->waitForPageLoadAndCheckForErrors(2000);
38
+		$this->byId('post_address')->value('wall street');
39
+		$this->byId('post_address')->value('10006');
40
+		$this->byId('post_set_address_button')->click();
41
+		$this->waitForPageLoadAndCheckForErrors();
42
+		$this->byId('geodir_timing')->value('10.00 am to 6 pm every day');
43
+		$this->byId('geodir_contact')->value('444444444444');
44
+		$this->byId('geodir_email')->value('[email protected]');
45
+		$this->byId('geodir_website')->value('http://test.com');
46
+		$this->byId('geodir_twitter')->value('http://twitter.com/test');
47
+		$this->byId('geodir_facebook')->value('http://facebook.com/test');
48
+		$this->byId('geodir_special_offers')->value('Test Offer');
49
+		$this->byId('geodir_accept_term_condition')->click();
50
+		// Submit the form
51
+		$this->byXPath("//div[@id='geodir-add-listing-submit']//input[@type='submit']")->click();
52
+		$this->waitForPageLoadAndCheckForErrors();
53
+		$this->assertTrue( $this->isTextPresent("This is a preview of your listing"), "Not in preview page.");
54
+		// Submit the form
55
+		$this->byClassName('geodir_publish_button')->click();
56
+		$this->waitForPageLoadAndCheckForErrors();
57
+		$this->assertTrue( $this->isTextPresent("Thank you, your information has been successfully received"), "Not in success page");
58
+	}
59 59
 
60
-    public function tearDown()
61
-    {
62
-        if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
63
-            //write current file number to completed.txt
64
-            $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
65
-            $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
66
-            fwrite($completed, $CurrentFileNumber);
67
-        }
68
-    }
60
+	public function tearDown()
61
+	{
62
+		if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
63
+			//write current file number to completed.txt
64
+			$CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
65
+			$completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
66
+			fwrite($completed, $CurrentFileNumber);
67
+		}
68
+	}
69 69
 }
70 70
 ?>
71 71
\ 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
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
             $this->waitForPageLoadAndCheckForErrors();
29 29
             $this->url(self::GDTEST_BASE_URL.'add-listing/?listing_type=gd_place');
30 30
         }
31
-        $this->assertTrue( $this->isTextPresent("Add Place"), "Add Place text not found");
31
+        $this->assertTrue($this->isTextPresent("Add Place"), "Add Place text not found");
32 32
         $this->byId('post_title')->value('Test Listing');
33 33
         $this->byId('post_desc')->value('Test Desc');
34 34
         $this->byId('post_tags')->value('tag1,tag2');
@@ -50,11 +50,11 @@  discard block
 block discarded – undo
50 50
         // Submit the form
51 51
         $this->byXPath("//div[@id='geodir-add-listing-submit']//input[@type='submit']")->click();
52 52
         $this->waitForPageLoadAndCheckForErrors();
53
-        $this->assertTrue( $this->isTextPresent("This is a preview of your listing"), "Not in preview page.");
53
+        $this->assertTrue($this->isTextPresent("This is a preview of your listing"), "Not in preview page.");
54 54
         // Submit the form
55 55
         $this->byClassName('geodir_publish_button')->click();
56 56
         $this->waitForPageLoadAndCheckForErrors();
57
-        $this->assertTrue( $this->isTextPresent("Thank you, your information has been successfully received"), "Not in success page");
57
+        $this->assertTrue($this->isTextPresent("Thank you, your information has been successfully received"), "Not in success page");
58 58
     }
59 59
 
60 60
     public function tearDown()
Please login to merge, or discard this patch.
tests/selenium/stest-36_Locationless_CPT.php 2 patches
Indentation   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -1,69 +1,69 @@
 block discarded – undo
1 1
 <?php
2 2
 class LocationlessCPT 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 testLocationlessCPT()
18
-    {
19
-        $this->logInfo('Testing locationless CPT......');
20
-        //make sure custom post types plugin active
21
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
22
-        $this->waitForPageLoadAndCheckForErrors();
17
+	public function testLocationlessCPT()
18
+	{
19
+		$this->logInfo('Testing locationless CPT......');
20
+		//make sure custom post types plugin active
21
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
22
+		$this->waitForPageLoadAndCheckForErrors();
23 23
 
24
-        $is_active = $this->byId("geodirectory-custom-post-types")->attribute('class');
25
-        if (is_int(strpos($is_active, 'inactive'))) {
26
-            //Activate Geodirectory Custom Post Types
27
-            $this->maybeActivatePlugin("geodirectory-custom-post-types", 20000);
28
-            //go back to plugin page
29
-            $this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
30
-        }
24
+		$is_active = $this->byId("geodirectory-custom-post-types")->attribute('class');
25
+		if (is_int(strpos($is_active, 'inactive'))) {
26
+			//Activate Geodirectory Custom Post Types
27
+			$this->maybeActivatePlugin("geodirectory-custom-post-types", 20000);
28
+			//go back to plugin page
29
+			$this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
30
+		}
31 31
 
32
-        $is_active1 = $this->byId("geodirectory-custom-post-types")->attribute('class');
33
-        $this->assertFalse( strpos($is_active1, 'inactive'), "Custom Post Types plugin not active");
32
+		$is_active1 = $this->byId("geodirectory-custom-post-types")->attribute('class');
33
+		$this->assertFalse( strpos($is_active1, 'inactive'), "Custom Post Types plugin not active");
34 34
 
35
-        $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=geodir_manage_custom_posts');
36
-        $this->waitForPageLoadAndCheckForErrors();
37
-        if ($this->isTextPresent("gd_product")) {
38
-            echo "Product post type already found. Please delete it to test a locationless CPT";
39
-            return;
40
-        }
35
+		$this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=geodir_manage_custom_posts');
36
+		$this->waitForPageLoadAndCheckForErrors();
37
+		if ($this->isTextPresent("gd_product")) {
38
+			echo "Product post type already found. Please delete it to test a locationless CPT";
39
+			return;
40
+		}
41 41
 
42
-        $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=geodir_manage_custom_posts&action=cp_addedit');
43
-        $this->waitForPageLoadAndCheckForErrors();
44
-        $this->assertTrue( $this->isTextPresent("Post Type"), "Post Type text not found");
45
-        $this->byId('geodir_custom_post_type')->value('product');
46
-        $this->byId('geodir_listing_slug')->value('products');
47
-        $this->byId('geodir_listing_order')->value('10');
48
-        $this->byId('geodir_name')->value('Products');
49
-        $this->byId('geodir_singular_name')->value('Product');
50
-        $this->byName('geodir_save_post_type')->click();
51
-        $this->waitForPageLoadAndCheckForErrors();
42
+		$this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=geodir_manage_custom_posts&action=cp_addedit');
43
+		$this->waitForPageLoadAndCheckForErrors();
44
+		$this->assertTrue( $this->isTextPresent("Post Type"), "Post Type text not found");
45
+		$this->byId('geodir_custom_post_type')->value('product');
46
+		$this->byId('geodir_listing_slug')->value('products');
47
+		$this->byId('geodir_listing_order')->value('10');
48
+		$this->byId('geodir_name')->value('Products');
49
+		$this->byId('geodir_singular_name')->value('Product');
50
+		$this->byName('geodir_save_post_type')->click();
51
+		$this->waitForPageLoadAndCheckForErrors();
52 52
 
53
-        $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=general_settings');
54
-        $this->waitForPageLoadAndCheckForErrors();
55
-        //Todo:find a way to click chosen dropdown
53
+		$this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=general_settings');
54
+		$this->waitForPageLoadAndCheckForErrors();
55
+		//Todo:find a way to click chosen dropdown
56 56
 
57
-    }
57
+	}
58 58
 
59
-    public function tearDown()
60
-    {
61
-        if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
62
-            //write current file number to completed.txt
63
-            $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
64
-            $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
65
-            fwrite($completed, $CurrentFileNumber);
66
-        }
67
-    }
59
+	public function tearDown()
60
+	{
61
+		if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
62
+			//write current file number to completed.txt
63
+			$CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
64
+			$completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
65
+			fwrite($completed, $CurrentFileNumber);
66
+		}
67
+	}
68 68
 }
69 69
 ?>
70 70
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         }
31 31
 
32 32
         $is_active1 = $this->byId("geodirectory-custom-post-types")->attribute('class');
33
-        $this->assertFalse( strpos($is_active1, 'inactive'), "Custom Post Types plugin not active");
33
+        $this->assertFalse(strpos($is_active1, 'inactive'), "Custom Post Types plugin not active");
34 34
 
35 35
         $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=geodir_manage_custom_posts');
36 36
         $this->waitForPageLoadAndCheckForErrors();
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 
42 42
         $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=geodir_manage_custom_posts&action=cp_addedit');
43 43
         $this->waitForPageLoadAndCheckForErrors();
44
-        $this->assertTrue( $this->isTextPresent("Post Type"), "Post Type text not found");
44
+        $this->assertTrue($this->isTextPresent("Post Type"), "Post Type text not found");
45 45
         $this->byId('geodir_custom_post_type')->value('product');
46 46
         $this->byId('geodir_listing_slug')->value('products');
47 47
         $this->byId('geodir_listing_order')->value('10');
Please login to merge, or discard this patch.
tests/selenium/stest-15_Import_Export.php 1 patch
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -1,23 +1,23 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 class ImportExport 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 testImportExport()
18
-    {
19
-        $this->logInfo('Import Export......');
20
-        $this->logInfo('Skipping Import Export since its not possible......');
17
+	public function testImportExport()
18
+	{
19
+		$this->logInfo('Import Export......');
20
+		$this->logInfo('Skipping Import Export since its not possible......');
21 21
 //        //export listing
22 22
 //        $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=import_export');
23 23
 //        $this->waitForPageLoadAndCheckForErrors();
@@ -28,17 +28,17 @@  discard block
 block discarded – undo
28 28
 //        $this->byId('gd_ie_excats_submit')->click();
29 29
 //        $this->waitForPageLoadAndCheckForErrors();
30 30
 
31
-        //Todo: find a way to test import
32
-    }
31
+		//Todo: find a way to test import
32
+	}
33 33
 
34
-    public function tearDown()
35
-    {
36
-        if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
37
-            //write current file number to completed.txt
38
-            $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
39
-            $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
40
-            fwrite($completed, $CurrentFileNumber);
41
-        }
42
-    }
34
+	public function tearDown()
35
+	{
36
+		if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
37
+			//write current file number to completed.txt
38
+			$CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
39
+			$completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
40
+			fwrite($completed, $CurrentFileNumber);
41
+		}
42
+	}
43 43
 }
44 44
 ?>
45 45
\ No newline at end of file
Please login to merge, or discard this patch.
tests/selenium/stest-27_Expiry_Listing.php 1 patch
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -1,35 +1,35 @@
 block discarded – undo
1 1
 <?php
2 2
 class ExpiryListing 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 testExpiryListing()
18
-    {
19
-        $this->logInfo('Testing expiry listing......');
20
-        $this->logInfo('Skipping Import Export since its not possible......');
17
+	public function testExpiryListing()
18
+	{
19
+		$this->logInfo('Testing expiry listing......');
20
+		$this->logInfo('Skipping Import Export since its not possible......');
21 21
 //        $this->url(self::GDTEST_BASE_URL);
22 22
 //        $this->waitForPageLoadAndCheckForErrors();
23
-    }
23
+	}
24 24
 
25
-    public function tearDown()
26
-    {
27
-        if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
28
-            //write current file number to completed.txt
29
-            $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
30
-            $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
31
-            fwrite($completed, $CurrentFileNumber);
32
-        }
33
-    }
25
+	public function tearDown()
26
+	{
27
+		if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
28
+			//write current file number to completed.txt
29
+			$CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
30
+			$completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
31
+			fwrite($completed, $CurrentFileNumber);
32
+		}
33
+	}
34 34
 }
35 35
 ?>
36 36
\ No newline at end of file
Please login to merge, or discard this patch.
tests/selenium/stest-26_Event_To_Business.php 2 patches
Indentation   +90 added lines, -90 removed lines patch added patch discarded remove patch
@@ -1,110 +1,110 @@
 block discarded – undo
1 1
 <?php
2 2
 class EventToBusiness 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 testEventToBusiness()
18
-    {
19
-        //make sure event manager plugin active
20
-        $this->logInfo('Testing events......');
21
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
22
-        $this->waitForPageLoadAndCheckForErrors();
17
+	public function testEventToBusiness()
18
+	{
19
+		//make sure event manager plugin active
20
+		$this->logInfo('Testing events......');
21
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
22
+		$this->waitForPageLoadAndCheckForErrors();
23 23
 
24
-        $is_active = $this->byId("geodirectory-events")->attribute('class');
25
-        if (is_int(strpos($is_active, 'inactive'))) {
26
-            //Activate Geodirectory Events
27
-            $this->maybeActivatePlugin("geodirectory-events", 20000);
28
-            //go back to plugin page
29
-            $this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
30
-        }
24
+		$is_active = $this->byId("geodirectory-events")->attribute('class');
25
+		if (is_int(strpos($is_active, 'inactive'))) {
26
+			//Activate Geodirectory Events
27
+			$this->maybeActivatePlugin("geodirectory-events", 20000);
28
+			//go back to plugin page
29
+			$this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
30
+		}
31 31
 
32
-        $is_active1 = $this->byId("geodirectory-events")->attribute('class');
33
-        $this->assertFalse( strpos($is_active1, 'inactive'), "Events plugin not active");
32
+		$is_active1 = $this->byId("geodirectory-events")->attribute('class');
33
+		$this->assertFalse( strpos($is_active1, 'inactive'), "Events plugin not active");
34 34
 
35 35
 
36
-        // Event post type -> Allow post type to add from frontend
37
-        $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=design_settings');
38
-        $this->waitForPageLoadAndCheckForErrors();
39
-        $this->byLinkText('Navigation')->click();
40
-        $this->ExecuteScript('jQuery("#geodir_allow_posttype_frontend").show();');
41
-        $this->select($this->byId('geodir_allow_posttype_frontend'))->selectOptionByLabel('Event');
42
-        $this->byName('save')->click();
43
-        $this->waitForPageLoadAndCheckForErrors();
36
+		// Event post type -> Allow post type to add from frontend
37
+		$this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=design_settings');
38
+		$this->waitForPageLoadAndCheckForErrors();
39
+		$this->byLinkText('Navigation')->click();
40
+		$this->ExecuteScript('jQuery("#geodir_allow_posttype_frontend").show();');
41
+		$this->select($this->byId('geodir_allow_posttype_frontend'))->selectOptionByLabel('Event');
42
+		$this->byName('save')->click();
43
+		$this->waitForPageLoadAndCheckForErrors();
44 44
 
45
-        $this->url(self::GDTEST_BASE_URL.'add-listing/?listing_type=gd_event');
46
-        $this->waitForPageLoadAndCheckForErrors();
47
-        if ($this->isTextPresent("Sign In")) {
48
-            $this->byId('user_login')->value('[email protected]');
49
-            $this->byId('user_pass')->value('12345');
50
-            $this->byId('rememberme')->click();
51
-            // Submit the form
52
-            $this->byId('cus_loginform')->submit();
53
-            $this->waitForPageLoadAndCheckForErrors();
54
-            $this->url(self::GDTEST_BASE_URL.'add-listing/?listing_type=gd_event');
55
-        }
56
-        $this->assertTrue( $this->isTextPresent("Add Event"), "Add Event text not found");
57
-        //event info
58
-        $this->byId('is_recurring_n')->click();
59
-        $this->byId('event_start')->value('2016-01-01');
60
-        $this->byId('event_end')->value('2016-01-31');
61
-        $this->byId('all_day')->click();
45
+		$this->url(self::GDTEST_BASE_URL.'add-listing/?listing_type=gd_event');
46
+		$this->waitForPageLoadAndCheckForErrors();
47
+		if ($this->isTextPresent("Sign In")) {
48
+			$this->byId('user_login')->value('[email protected]');
49
+			$this->byId('user_pass')->value('12345');
50
+			$this->byId('rememberme')->click();
51
+			// Submit the form
52
+			$this->byId('cus_loginform')->submit();
53
+			$this->waitForPageLoadAndCheckForErrors();
54
+			$this->url(self::GDTEST_BASE_URL.'add-listing/?listing_type=gd_event');
55
+		}
56
+		$this->assertTrue( $this->isTextPresent("Add Event"), "Add Event text not found");
57
+		//event info
58
+		$this->byId('is_recurring_n')->click();
59
+		$this->byId('event_start')->value('2016-01-01');
60
+		$this->byId('event_end')->value('2016-01-31');
61
+		$this->byId('all_day')->click();
62 62
 
63 63
 
64
-        if ($this->isTextPresent("Business Owner/Associate")) {
64
+		if ($this->isTextPresent("Business Owner/Associate")) {
65 65
 //            $elements = $this->elements($this->using('name')->value('claimed'));
66 66
 //            $elements[0]->click();
67 67
 //            $this->byXPath("//input[contains(@name,'claimed') and contains(@value,'0')]")->click();
68
-            $this->ExecuteScript('jQuery("#geodir_claimed_row input:radio:first").prop("checked", true).trigger("click");');
69
-        }
68
+			$this->ExecuteScript('jQuery("#geodir_claimed_row input:radio:first").prop("checked", true).trigger("click");');
69
+		}
70 70
 
71
-        $this->byId('post_title')->value('Test Event');
72
-        $this->byId('post_desc')->value('Test Desc');
73
-        $this->byId('post_tags')->value('tag1,tag2');
74
-        $this->ExecuteScript('jQuery("select#gd_eventcategory").show();');
75
-        $this->select($this->byXPath("//select[@id='gd_eventcategory']"))->selectOptionByLabel('Events');
76
-        $this->waitForPageLoadAndCheckForErrors(2000);
77
-        $this->byId('post_address')->value('wall street');
78
-        $this->byId('post_address')->value('10006');
79
-        $this->byId('post_set_address_button')->click();
80
-        $this->waitForPageLoadAndCheckForErrors();
81
-        $this->byId('geodir_timing')->value('10.00 am to 6 pm every day');
82
-        $this->byId('geodir_contact')->value('444444444444');
83
-        $this->byId('geodir_email')->value('[email protected]');
84
-        $this->byId('geodir_website')->value('http://test.com');
85
-        $this->byId('geodir_twitter')->value('http://twitter.com/test');
86
-        $this->byId('geodir_facebook')->value('http://facebook.com/test');
87
-        $this->byId('geodir_special_offers')->value('Test Offer');
88
-        $this->byId('geodir_accept_term_condition')->click();
89
-        // Submit the form
90
-        $this->byXPath("//div[@id='geodir-add-listing-submit']//input[@type='submit']")->click();
91
-        $this->waitForPageLoadAndCheckForErrors();
92
-        $this->assertTrue( $this->isTextPresent("This is a preview of your listing"), "Not in preview page.");
93
-        // Submit the form
94
-        $this->byClassName('geodir_publish_button')->click();
95
-        $this->waitForPageLoadAndCheckForErrors();
96
-        $this->assertTrue( $this->isTextPresent("Thank you, your information has been successfully received"), "Not in success page");
71
+		$this->byId('post_title')->value('Test Event');
72
+		$this->byId('post_desc')->value('Test Desc');
73
+		$this->byId('post_tags')->value('tag1,tag2');
74
+		$this->ExecuteScript('jQuery("select#gd_eventcategory").show();');
75
+		$this->select($this->byXPath("//select[@id='gd_eventcategory']"))->selectOptionByLabel('Events');
76
+		$this->waitForPageLoadAndCheckForErrors(2000);
77
+		$this->byId('post_address')->value('wall street');
78
+		$this->byId('post_address')->value('10006');
79
+		$this->byId('post_set_address_button')->click();
80
+		$this->waitForPageLoadAndCheckForErrors();
81
+		$this->byId('geodir_timing')->value('10.00 am to 6 pm every day');
82
+		$this->byId('geodir_contact')->value('444444444444');
83
+		$this->byId('geodir_email')->value('[email protected]');
84
+		$this->byId('geodir_website')->value('http://test.com');
85
+		$this->byId('geodir_twitter')->value('http://twitter.com/test');
86
+		$this->byId('geodir_facebook')->value('http://facebook.com/test');
87
+		$this->byId('geodir_special_offers')->value('Test Offer');
88
+		$this->byId('geodir_accept_term_condition')->click();
89
+		// Submit the form
90
+		$this->byXPath("//div[@id='geodir-add-listing-submit']//input[@type='submit']")->click();
91
+		$this->waitForPageLoadAndCheckForErrors();
92
+		$this->assertTrue( $this->isTextPresent("This is a preview of your listing"), "Not in preview page.");
93
+		// Submit the form
94
+		$this->byClassName('geodir_publish_button')->click();
95
+		$this->waitForPageLoadAndCheckForErrors();
96
+		$this->assertTrue( $this->isTextPresent("Thank you, your information has been successfully received"), "Not in success page");
97 97
 
98
-    }
98
+	}
99 99
 
100
-    public function tearDown()
101
-    {
102
-        if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
103
-            //write current file number to completed.txt
104
-            $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
105
-            $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
106
-            fwrite($completed, $CurrentFileNumber);
107
-        }
108
-    }
100
+	public function tearDown()
101
+	{
102
+		if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
103
+			//write current file number to completed.txt
104
+			$CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
105
+			$completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
106
+			fwrite($completed, $CurrentFileNumber);
107
+		}
108
+	}
109 109
 }
110 110
 ?>
111 111
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         }
31 31
 
32 32
         $is_active1 = $this->byId("geodirectory-events")->attribute('class');
33
-        $this->assertFalse( strpos($is_active1, 'inactive'), "Events plugin not active");
33
+        $this->assertFalse(strpos($is_active1, 'inactive'), "Events plugin not active");
34 34
 
35 35
 
36 36
         // Event post type -> Allow post type to add from frontend
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
             $this->waitForPageLoadAndCheckForErrors();
54 54
             $this->url(self::GDTEST_BASE_URL.'add-listing/?listing_type=gd_event');
55 55
         }
56
-        $this->assertTrue( $this->isTextPresent("Add Event"), "Add Event text not found");
56
+        $this->assertTrue($this->isTextPresent("Add Event"), "Add Event text not found");
57 57
         //event info
58 58
         $this->byId('is_recurring_n')->click();
59 59
         $this->byId('event_start')->value('2016-01-01');
@@ -89,11 +89,11 @@  discard block
 block discarded – undo
89 89
         // Submit the form
90 90
         $this->byXPath("//div[@id='geodir-add-listing-submit']//input[@type='submit']")->click();
91 91
         $this->waitForPageLoadAndCheckForErrors();
92
-        $this->assertTrue( $this->isTextPresent("This is a preview of your listing"), "Not in preview page.");
92
+        $this->assertTrue($this->isTextPresent("This is a preview of your listing"), "Not in preview page.");
93 93
         // Submit the form
94 94
         $this->byClassName('geodir_publish_button')->click();
95 95
         $this->waitForPageLoadAndCheckForErrors();
96
-        $this->assertTrue( $this->isTextPresent("Thank you, your information has been successfully received"), "Not in success page");
96
+        $this->assertTrue($this->isTextPresent("Thank you, your information has been successfully received"), "Not in success page");
97 97
 
98 98
     }
99 99
 
Please login to merge, or discard this patch.
tests/selenium/stest-34_BuddyPress.php 2 patches
Indentation   +144 added lines, -144 removed lines patch added patch discarded remove patch
@@ -1,149 +1,149 @@
 block discarded – undo
1 1
 <?php
2 2
 class BuddyPress 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 testBuddyPress()
18
-    {
19
-        $this->logInfo('Testing buddypress......');
20
-        //make sure BuddyPress core plugin active
21
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
22
-        $this->waitForPageLoadAndCheckForErrors();
23
-
24
-        $is_active = $this->byId("buddypress")->attribute('class');
25
-        if (is_int(strpos($is_active, 'inactive'))) {
26
-            //Activate Geodirectory buddypress
27
-            $this->maybeActivatePlugin("buddypress", 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("buddypress")->attribute('class');
33
-        $this->assertFalse( strpos($is_active1, 'inactive'), "buddypress plugin not active");
34
-
35
-        //make sure BuddyPress Integration plugin active
36
-        $is_active = $this->byId("geodirectory-buddypress-integration")->attribute('class');
37
-        if (is_int(strpos($is_active, 'inactive'))) {
38
-            //Activate Geodirectory buddypress integration
39
-            $this->maybeActivatePlugin("geodirectory-buddypress-integration", 20000);
40
-            //go back to plugin page
41
-            $this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
42
-        }
43
-
44
-        $is_active1 = $this->byId("geodirectory-buddypress-integration")->attribute('class');
45
-        $this->assertFalse( strpos($is_active1, 'inactive'), "geodirectory buddypress integration plugin not active");
46
-
47
-
48
-        //Make sure "Use BuddyPress registration form" checked.
49
-        $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=geodir_buddypress&subtab=gdbuddypress_settings');
50
-        $this->waitForPageLoadAndCheckForErrors();
51
-        $this->prepareSession()->currentWindow()->maximize();
52
-
53
-        $to_save = false;
54
-
55
-        $options = array(
56
-            'geodir_buddypress_bp_register',
57
-            'geodir_buddypress_link_listing',
58
-            'geodir_buddypress_link_favorite',
59
-            'geodir_buddypress_link_author',
60
-            'geodir_buddypress_show_feature_image'
61
-        );
62
-
63
-        foreach ($options as $option) {
64
-            $is_checked = $this->byId($option)->attribute('checked');
65
-            if (!$is_checked) {
66
-                $this->byId($option)->click();
67
-                $to_save = true;
68
-            }
69
-        }
70
-
71
-        if ($to_save) {
72
-            $this->byName('save')->click();
73
-            $this->waitForPageLoadAndCheckForErrors();
74
-        }
75
-
76
-
77
-        $this->url(self::GDTEST_BASE_URL.'gd-login/');
78
-        $this->waitForPageLoadAndCheckForErrors();
79
-        $this->assertTrue( $this->isTextPresent("Sign In"), "No text found");
80
-        $this->assertFalse( $this->isTextPresent("Sign Up Now"), "Sign up now text found in buddypress login");
81
-
82
-        $this->byClassName('goedir-newuser-link')->click();
83
-        $this->waitForPageLoadAndCheckForErrors();
84
-        $this->assertTrue( $this->isTextPresent("Create an Account"), "Create an Account text not found");
85
-
86
-        //register
87
-        $this->byId('signup_username')->value('testuser123');
88
-        $this->byId('signup_email')->value('[email protected]');
89
-        $this->byId('signup_password')->value('test12345');
90
-        $this->byId('signup_password_confirm')->value('test12345');
91
-        $this->byId('field_1')->value('Test User');
92
-        $this->byId('signup_submit')->click();
93
-        $this->waitForPageLoadAndCheckForErrors();
94
-        $this->assertTrue( $this->isTextPresent("Check Your Email To Activate Your Account"), "BuddyPress Signup not successful");
95
-
96
-
97
-        //check listings page for errors
98
-        $this->url(self::GDTEST_BASE_URL.'members/admin/listings/');
99
-        $this->waitForPageLoadAndCheckForErrors();
100
-        $this->assertTrue( $this->isTextPresent("Places"), "Not in listings page");
101
-
102
-        //check favorites page for errors
103
-        $this->url(self::GDTEST_BASE_URL.'members/admin/favorites/');
104
-        $this->waitForPageLoadAndCheckForErrors();
105
-        $this->assertTrue( $this->isTextPresent("Places"), "Not in favorites page");
106
-
107
-        //check reviews page for errors
108
-        $this->url(self::GDTEST_BASE_URL.'members/admin/reviews/');
109
-        $this->waitForPageLoadAndCheckForErrors();
110
-        $this->assertTrue( $this->isTextPresent("Places"), "Not in reviews page");
111
-
112
-        //test all buddypress pages and catch errors and warnings
113
-        $this->url(self::GDTEST_BASE_URL.'members/');
114
-        $this->waitForPageLoadAndCheckForErrors();
115
-
116
-        $this->url(self::GDTEST_BASE_URL.'members/admin/');
117
-        $this->waitForPageLoadAndCheckForErrors();
118
-
119
-        $this->url(self::GDTEST_BASE_URL.'members/admin/profile/');
120
-        $this->waitForPageLoadAndCheckForErrors();
121
-
122
-        $this->url(self::GDTEST_BASE_URL.'members/admin/notifications/');
123
-        $this->waitForPageLoadAndCheckForErrors();
124
-
125
-        $this->url(self::GDTEST_BASE_URL.'members/admin/messages/');
126
-        $this->waitForPageLoadAndCheckForErrors();
127
-
128
-        $this->url(self::GDTEST_BASE_URL.'members/admin/friends/');
129
-        $this->waitForPageLoadAndCheckForErrors();
130
-
131
-        $this->url(self::GDTEST_BASE_URL.'members/admin/groups/');
132
-        $this->waitForPageLoadAndCheckForErrors();
133
-
134
-        $this->url(self::GDTEST_BASE_URL.'members/admin/listings/');
135
-        $this->waitForPageLoadAndCheckForErrors();
136
-
137
-    }
138
-
139
-    public function tearDown()
140
-    {
141
-        if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
142
-            //write current file number to completed.txt
143
-            $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
144
-            $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
145
-            fwrite($completed, $CurrentFileNumber);
146
-        }
147
-    }
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 testBuddyPress()
18
+	{
19
+		$this->logInfo('Testing buddypress......');
20
+		//make sure BuddyPress core plugin active
21
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
22
+		$this->waitForPageLoadAndCheckForErrors();
23
+
24
+		$is_active = $this->byId("buddypress")->attribute('class');
25
+		if (is_int(strpos($is_active, 'inactive'))) {
26
+			//Activate Geodirectory buddypress
27
+			$this->maybeActivatePlugin("buddypress", 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("buddypress")->attribute('class');
33
+		$this->assertFalse( strpos($is_active1, 'inactive'), "buddypress plugin not active");
34
+
35
+		//make sure BuddyPress Integration plugin active
36
+		$is_active = $this->byId("geodirectory-buddypress-integration")->attribute('class');
37
+		if (is_int(strpos($is_active, 'inactive'))) {
38
+			//Activate Geodirectory buddypress integration
39
+			$this->maybeActivatePlugin("geodirectory-buddypress-integration", 20000);
40
+			//go back to plugin page
41
+			$this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
42
+		}
43
+
44
+		$is_active1 = $this->byId("geodirectory-buddypress-integration")->attribute('class');
45
+		$this->assertFalse( strpos($is_active1, 'inactive'), "geodirectory buddypress integration plugin not active");
46
+
47
+
48
+		//Make sure "Use BuddyPress registration form" checked.
49
+		$this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=geodir_buddypress&subtab=gdbuddypress_settings');
50
+		$this->waitForPageLoadAndCheckForErrors();
51
+		$this->prepareSession()->currentWindow()->maximize();
52
+
53
+		$to_save = false;
54
+
55
+		$options = array(
56
+			'geodir_buddypress_bp_register',
57
+			'geodir_buddypress_link_listing',
58
+			'geodir_buddypress_link_favorite',
59
+			'geodir_buddypress_link_author',
60
+			'geodir_buddypress_show_feature_image'
61
+		);
62
+
63
+		foreach ($options as $option) {
64
+			$is_checked = $this->byId($option)->attribute('checked');
65
+			if (!$is_checked) {
66
+				$this->byId($option)->click();
67
+				$to_save = true;
68
+			}
69
+		}
70
+
71
+		if ($to_save) {
72
+			$this->byName('save')->click();
73
+			$this->waitForPageLoadAndCheckForErrors();
74
+		}
75
+
76
+
77
+		$this->url(self::GDTEST_BASE_URL.'gd-login/');
78
+		$this->waitForPageLoadAndCheckForErrors();
79
+		$this->assertTrue( $this->isTextPresent("Sign In"), "No text found");
80
+		$this->assertFalse( $this->isTextPresent("Sign Up Now"), "Sign up now text found in buddypress login");
81
+
82
+		$this->byClassName('goedir-newuser-link')->click();
83
+		$this->waitForPageLoadAndCheckForErrors();
84
+		$this->assertTrue( $this->isTextPresent("Create an Account"), "Create an Account text not found");
85
+
86
+		//register
87
+		$this->byId('signup_username')->value('testuser123');
88
+		$this->byId('signup_email')->value('[email protected]');
89
+		$this->byId('signup_password')->value('test12345');
90
+		$this->byId('signup_password_confirm')->value('test12345');
91
+		$this->byId('field_1')->value('Test User');
92
+		$this->byId('signup_submit')->click();
93
+		$this->waitForPageLoadAndCheckForErrors();
94
+		$this->assertTrue( $this->isTextPresent("Check Your Email To Activate Your Account"), "BuddyPress Signup not successful");
95
+
96
+
97
+		//check listings page for errors
98
+		$this->url(self::GDTEST_BASE_URL.'members/admin/listings/');
99
+		$this->waitForPageLoadAndCheckForErrors();
100
+		$this->assertTrue( $this->isTextPresent("Places"), "Not in listings page");
101
+
102
+		//check favorites page for errors
103
+		$this->url(self::GDTEST_BASE_URL.'members/admin/favorites/');
104
+		$this->waitForPageLoadAndCheckForErrors();
105
+		$this->assertTrue( $this->isTextPresent("Places"), "Not in favorites page");
106
+
107
+		//check reviews page for errors
108
+		$this->url(self::GDTEST_BASE_URL.'members/admin/reviews/');
109
+		$this->waitForPageLoadAndCheckForErrors();
110
+		$this->assertTrue( $this->isTextPresent("Places"), "Not in reviews page");
111
+
112
+		//test all buddypress pages and catch errors and warnings
113
+		$this->url(self::GDTEST_BASE_URL.'members/');
114
+		$this->waitForPageLoadAndCheckForErrors();
115
+
116
+		$this->url(self::GDTEST_BASE_URL.'members/admin/');
117
+		$this->waitForPageLoadAndCheckForErrors();
118
+
119
+		$this->url(self::GDTEST_BASE_URL.'members/admin/profile/');
120
+		$this->waitForPageLoadAndCheckForErrors();
121
+
122
+		$this->url(self::GDTEST_BASE_URL.'members/admin/notifications/');
123
+		$this->waitForPageLoadAndCheckForErrors();
124
+
125
+		$this->url(self::GDTEST_BASE_URL.'members/admin/messages/');
126
+		$this->waitForPageLoadAndCheckForErrors();
127
+
128
+		$this->url(self::GDTEST_BASE_URL.'members/admin/friends/');
129
+		$this->waitForPageLoadAndCheckForErrors();
130
+
131
+		$this->url(self::GDTEST_BASE_URL.'members/admin/groups/');
132
+		$this->waitForPageLoadAndCheckForErrors();
133
+
134
+		$this->url(self::GDTEST_BASE_URL.'members/admin/listings/');
135
+		$this->waitForPageLoadAndCheckForErrors();
136
+
137
+	}
138
+
139
+	public function tearDown()
140
+	{
141
+		if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
142
+			//write current file number to completed.txt
143
+			$CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
144
+			$completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
145
+			fwrite($completed, $CurrentFileNumber);
146
+		}
147
+	}
148 148
 }
149 149
 ?>
150 150
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 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("buddypress")->attribute('class');
33
-        $this->assertFalse( strpos($is_active1, 'inactive'), "buddypress plugin not active");
33
+        $this->assertFalse(strpos($is_active1, 'inactive'), "buddypress plugin not active");
34 34
 
35 35
         //make sure BuddyPress Integration plugin active
36 36
         $is_active = $this->byId("geodirectory-buddypress-integration")->attribute('class');
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
         }
43 43
 
44 44
         $is_active1 = $this->byId("geodirectory-buddypress-integration")->attribute('class');
45
-        $this->assertFalse( strpos($is_active1, 'inactive'), "geodirectory buddypress integration plugin not active");
45
+        $this->assertFalse(strpos($is_active1, 'inactive'), "geodirectory buddypress integration plugin not active");
46 46
 
47 47
 
48 48
         //Make sure "Use BuddyPress registration form" checked.
@@ -76,12 +76,12 @@  discard block
 block discarded – undo
76 76
 
77 77
         $this->url(self::GDTEST_BASE_URL.'gd-login/');
78 78
         $this->waitForPageLoadAndCheckForErrors();
79
-        $this->assertTrue( $this->isTextPresent("Sign In"), "No text found");
80
-        $this->assertFalse( $this->isTextPresent("Sign Up Now"), "Sign up now text found in buddypress login");
79
+        $this->assertTrue($this->isTextPresent("Sign In"), "No text found");
80
+        $this->assertFalse($this->isTextPresent("Sign Up Now"), "Sign up now text found in buddypress login");
81 81
 
82 82
         $this->byClassName('goedir-newuser-link')->click();
83 83
         $this->waitForPageLoadAndCheckForErrors();
84
-        $this->assertTrue( $this->isTextPresent("Create an Account"), "Create an Account text not found");
84
+        $this->assertTrue($this->isTextPresent("Create an Account"), "Create an Account text not found");
85 85
 
86 86
         //register
87 87
         $this->byId('signup_username')->value('testuser123');
@@ -91,23 +91,23 @@  discard block
 block discarded – undo
91 91
         $this->byId('field_1')->value('Test User');
92 92
         $this->byId('signup_submit')->click();
93 93
         $this->waitForPageLoadAndCheckForErrors();
94
-        $this->assertTrue( $this->isTextPresent("Check Your Email To Activate Your Account"), "BuddyPress Signup not successful");
94
+        $this->assertTrue($this->isTextPresent("Check Your Email To Activate Your Account"), "BuddyPress Signup not successful");
95 95
 
96 96
 
97 97
         //check listings page for errors
98 98
         $this->url(self::GDTEST_BASE_URL.'members/admin/listings/');
99 99
         $this->waitForPageLoadAndCheckForErrors();
100
-        $this->assertTrue( $this->isTextPresent("Places"), "Not in listings page");
100
+        $this->assertTrue($this->isTextPresent("Places"), "Not in listings page");
101 101
 
102 102
         //check favorites page for errors
103 103
         $this->url(self::GDTEST_BASE_URL.'members/admin/favorites/');
104 104
         $this->waitForPageLoadAndCheckForErrors();
105
-        $this->assertTrue( $this->isTextPresent("Places"), "Not in favorites page");
105
+        $this->assertTrue($this->isTextPresent("Places"), "Not in favorites page");
106 106
 
107 107
         //check reviews page for errors
108 108
         $this->url(self::GDTEST_BASE_URL.'members/admin/reviews/');
109 109
         $this->waitForPageLoadAndCheckForErrors();
110
-        $this->assertTrue( $this->isTextPresent("Places"), "Not in reviews page");
110
+        $this->assertTrue($this->isTextPresent("Places"), "Not in reviews page");
111 111
 
112 112
         //test all buddypress pages and catch errors and warnings
113 113
         $this->url(self::GDTEST_BASE_URL.'members/');
Please login to merge, or discard this patch.
tests/selenium/stest-29_New_Location.php 2 patches
Indentation   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -1,59 +1,59 @@
 block discarded – undo
1 1
 <?php
2 2
 class NewLocation 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 testNewLocation()
18
-    {
19
-        $this->logInfo('Testing new location......');
20
-        //make sure multi locations plugin active
21
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
22
-        $this->waitForPageLoadAndCheckForErrors();
17
+	public function testNewLocation()
18
+	{
19
+		$this->logInfo('Testing new location......');
20
+		//make sure multi locations plugin active
21
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
22
+		$this->waitForPageLoadAndCheckForErrors();
23 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
-        }
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 31
 
32
-        $is_active1 = $this->byId("geodirectory-location-manager")->attribute('class');
33
-        $this->assertFalse( strpos($is_active1, 'inactive'), "Location Manager plugin not active");
32
+		$is_active1 = $this->byId("geodirectory-location-manager")->attribute('class');
33
+		$this->assertFalse( strpos($is_active1, 'inactive'), "Location Manager plugin not active");
34 34
 
35
-        $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit');
36
-        $this->waitForPageLoadAndCheckForErrors();
37
-        $this->prepareSession()->currentWindow()->maximize();
38
-        $this->byId('gd_city')->value('Bengaluru');
39
-        $this->byId('gd_region')->value('Karnataka');
40
-        $this->waitForPageLoadAndCheckForErrors();
35
+		$this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit');
36
+		$this->waitForPageLoadAndCheckForErrors();
37
+		$this->prepareSession()->currentWindow()->maximize();
38
+		$this->byId('gd_city')->value('Bengaluru');
39
+		$this->byId('gd_region')->value('Karnataka');
40
+		$this->waitForPageLoadAndCheckForErrors();
41 41
 //        $this->byId('gd_city')->value('texas');
42
-        $this->byId('gd_set_address_button')->click();
43
-        $this->waitForPageLoadAndCheckForErrors();
44
-        $this->byId('geodir_location_save')->click();
45
-        $this->waitForPageLoadAndCheckForErrors();
46
-        $this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found");
47
-    }
42
+		$this->byId('gd_set_address_button')->click();
43
+		$this->waitForPageLoadAndCheckForErrors();
44
+		$this->byId('geodir_location_save')->click();
45
+		$this->waitForPageLoadAndCheckForErrors();
46
+		$this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found");
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.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         }
31 31
 
32 32
         $is_active1 = $this->byId("geodirectory-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
         $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit');
36 36
         $this->waitForPageLoadAndCheckForErrors();
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         $this->waitForPageLoadAndCheckForErrors();
44 44
         $this->byId('geodir_location_save')->click();
45 45
         $this->waitForPageLoadAndCheckForErrors();
46
-        $this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found");
46
+        $this->assertTrue($this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found");
47 47
     }
48 48
 
49 49
     public function tearDown()
Please login to merge, or discard this patch.