Test Setup Failed
Pull Request — master (#454)
by Kiran
29:40
created
tests/selenium/stest-24_Favourites.php 2 patches
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -1,42 +1,42 @@
 block discarded – undo
1 1
 <?php
2 2
 class Favourites extends GD_Test
3 3
 {
4
-    public function setUp()
5
-    {
6
-        parent::setUp();
4
+	public function setUp()
5
+	{
6
+		parent::setUp();
7 7
 
8
-        //skip test if already completed.
9
-        if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
10
-            $this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......');
11
-            return;
12
-        } else {
13
-            $this->prepareSession()->currentWindow()->maximize();
14
-        }
15
-    }
8
+		//skip test if already completed.
9
+		if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
10
+			$this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......');
11
+			return;
12
+		} else {
13
+			$this->prepareSession()->currentWindow()->maximize();
14
+		}
15
+	}
16 16
 
17
-    public function testFavourites()
18
-    {
19
-        $this->logInfo('Testing Favorites......');
20
-        $this->url(self::GDTEST_BASE_URL.'places/');
21
-        $this->waitForPageLoadAndCheckForErrors();
22
-        $elements = $this->elements($this->using('css selector')->value('.geodir-addtofav-icon'));
23
-        if ($elements) {
24
-            $elements[0]->click();
25
-        }
26
-        $this->waitForPageLoadAndCheckForErrors();
27
-        $this->url(self::GDTEST_BASE_URL.'author/admin/?geodir_dashbord=true&stype=gd_place&list=favourite');
28
-        $this->waitForPageLoadAndCheckForErrors();
29
-        $this->assertTrue( $this->isTextPresent("Favorite Places"), "Not in Favourites page");
30
-    }
17
+	public function testFavourites()
18
+	{
19
+		$this->logInfo('Testing Favorites......');
20
+		$this->url(self::GDTEST_BASE_URL.'places/');
21
+		$this->waitForPageLoadAndCheckForErrors();
22
+		$elements = $this->elements($this->using('css selector')->value('.geodir-addtofav-icon'));
23
+		if ($elements) {
24
+			$elements[0]->click();
25
+		}
26
+		$this->waitForPageLoadAndCheckForErrors();
27
+		$this->url(self::GDTEST_BASE_URL.'author/admin/?geodir_dashbord=true&stype=gd_place&list=favourite');
28
+		$this->waitForPageLoadAndCheckForErrors();
29
+		$this->assertTrue( $this->isTextPresent("Favorite Places"), "Not in Favourites page");
30
+	}
31 31
 
32
-    public function tearDown()
33
-    {
34
-        if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
35
-            //write current file number to completed.txt
36
-            $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
37
-            $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
38
-            fwrite($completed, $CurrentFileNumber);
39
-        }
40
-    }
32
+	public function tearDown()
33
+	{
34
+		if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
35
+			//write current file number to completed.txt
36
+			$CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
37
+			$completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
38
+			fwrite($completed, $CurrentFileNumber);
39
+		}
40
+	}
41 41
 }
42 42
 ?>
43 43
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
         $this->waitForPageLoadAndCheckForErrors();
27 27
         $this->url(self::GDTEST_BASE_URL.'author/admin/?geodir_dashbord=true&stype=gd_place&list=favourite');
28 28
         $this->waitForPageLoadAndCheckForErrors();
29
-        $this->assertTrue( $this->isTextPresent("Favorite Places"), "Not in Favourites page");
29
+        $this->assertTrue($this->isTextPresent("Favorite Places"), "Not in Favourites page");
30 30
     }
31 31
 
32 32
     public function tearDown()
Please login to merge, or discard this patch.
tests/selenium/stest-30_Google_Analytics.php 1 patch
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -1,44 +1,44 @@
 block discarded – undo
1 1
 <?php
2 2
 class GoogleAnalytics extends GD_Test
3 3
 {
4
-    public function setUp()
5
-    {
6
-        parent::setUp();
4
+	public function setUp()
5
+	{
6
+		parent::setUp();
7 7
 
8
-        //skip test if already completed.
9
-        if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
10
-            $this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......');
11
-            return;
12
-        } else {
13
-            $this->prepareSession()->currentWindow()->maximize();
14
-        }
15
-    }
8
+		//skip test if already completed.
9
+		if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
10
+			$this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......');
11
+			return;
12
+		} else {
13
+			$this->prepareSession()->currentWindow()->maximize();
14
+		}
15
+	}
16 16
 
17
-    public function testGoogleAnalytics()
18
-    {
19
-        $this->logInfo('Testing google analytics......');
20
-        //make sure Google Analytics Authorized
21
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=general_settings');
22
-        $this->waitForPageLoadAndCheckForErrors();
23
-        $this->byLinkText('Google Analytics')->click();
17
+	public function testGoogleAnalytics()
18
+	{
19
+		$this->logInfo('Testing google analytics......');
20
+		//make sure Google Analytics Authorized
21
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=general_settings');
22
+		$this->waitForPageLoadAndCheckForErrors();
23
+		$this->byLinkText('Google Analytics')->click();
24 24
 
25
-        $value = $this->byId('geodir_ga_id')->value();
26
-        if (empty($value)) {
27
-            echo "Google Analytics not configured";
28
-        }
25
+		$value = $this->byId('geodir_ga_id')->value();
26
+		if (empty($value)) {
27
+			echo "Google Analytics not configured";
28
+		}
29 29
 
30
-        $this->url(self::GDTEST_BASE_URL.'places/united-states/new-york/new-york/attractions/franklin-square/');
31
-        $this->waitForPageLoadAndCheckForErrors();
32
-    }
30
+		$this->url(self::GDTEST_BASE_URL.'places/united-states/new-york/new-york/attractions/franklin-square/');
31
+		$this->waitForPageLoadAndCheckForErrors();
32
+	}
33 33
 
34
-    public function tearDown()
35
-    {
36
-        if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
37
-            //write current file number to completed.txt
38
-            $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
39
-            $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
40
-            fwrite($completed, $CurrentFileNumber);
41
-        }
42
-    }
34
+	public function tearDown()
35
+	{
36
+		if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
37
+			//write current file number to completed.txt
38
+			$CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
39
+			$completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
40
+			fwrite($completed, $CurrentFileNumber);
41
+		}
42
+	}
43 43
 }
44 44
 ?>
45 45
\ No newline at end of file
Please login to merge, or discard this patch.
tests/selenium/stest-35_Create_New_CPT.php 2 patches
Indentation   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -1,65 +1,65 @@
 block discarded – undo
1 1
 <?php
2 2
 class CreateNewCPT extends GD_Test
3 3
 {
4
-    public function setUp()
5
-    {
6
-        parent::setUp();
4
+	public function setUp()
5
+	{
6
+		parent::setUp();
7 7
 
8
-        //skip test if already completed.
9
-        if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
10
-            $this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......');
11
-            return;
12
-        } else {
13
-            $this->prepareSession()->currentWindow()->maximize();
14
-        }
15
-    }
8
+		//skip test if already completed.
9
+		if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
10
+			$this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......');
11
+			return;
12
+		} else {
13
+			$this->prepareSession()->currentWindow()->maximize();
14
+		}
15
+	}
16 16
 
17
-    public function testCreateNewCPT()
18
-    {
19
-        $this->logInfo('Testing new CPT......');
20
-        //make sure custom post types plugin active
21
-        $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
22
-        $this->waitForPageLoadAndCheckForErrors();
17
+	public function testCreateNewCPT()
18
+	{
19
+		$this->logInfo('Testing new CPT......');
20
+		//make sure custom post types plugin active
21
+		$this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
22
+		$this->waitForPageLoadAndCheckForErrors();
23 23
 
24
-        $is_active = $this->byId("geodirectory-custom-post-types")->attribute('class');
25
-        if (is_int(strpos($is_active, 'inactive'))) {
26
-            //Activate Geodirectory Custom Post Types
27
-            $this->maybeActivatePlugin("geodirectory-custom-post-types", 20000);
28
-            //go back to plugin page
29
-            $this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
30
-        }
24
+		$is_active = $this->byId("geodirectory-custom-post-types")->attribute('class');
25
+		if (is_int(strpos($is_active, 'inactive'))) {
26
+			//Activate Geodirectory Custom Post Types
27
+			$this->maybeActivatePlugin("geodirectory-custom-post-types", 20000);
28
+			//go back to plugin page
29
+			$this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php');
30
+		}
31 31
 
32
-        $is_active1 = $this->byId("geodirectory-custom-post-types")->attribute('class');
33
-        $this->assertFalse( strpos($is_active1, 'inactive'), "Custom Post Types plugin not active");
32
+		$is_active1 = $this->byId("geodirectory-custom-post-types")->attribute('class');
33
+		$this->assertFalse( strpos($is_active1, 'inactive'), "Custom Post Types plugin not active");
34 34
 
35 35
 
36
-        $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=geodir_manage_custom_posts');
37
-        $this->waitForPageLoadAndCheckForErrors();
38
-        if ($this->isTextPresent("gd_hotel")) {
39
-            echo "Hotel post type already found. Please delete it first";
40
-            return;
41
-        }
36
+		$this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=geodir_manage_custom_posts');
37
+		$this->waitForPageLoadAndCheckForErrors();
38
+		if ($this->isTextPresent("gd_hotel")) {
39
+			echo "Hotel post type already found. Please delete it first";
40
+			return;
41
+		}
42 42
 
43
-        $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=geodir_manage_custom_posts&action=cp_addedit');
44
-        $this->waitForPageLoadAndCheckForErrors();
45
-        $this->assertTrue( $this->isTextPresent("Post Type"), "Post Type text not found");
46
-        $this->byId('geodir_custom_post_type')->value('hotel');
47
-        $this->byId('geodir_listing_slug')->value('hotels');
48
-        $this->byId('geodir_listing_order')->value('10');
49
-        $this->byId('geodir_name')->value('Hotels');
50
-        $this->byId('geodir_singular_name')->value('Hotel');
51
-        $this->byName('geodir_save_post_type')->click();
52
-        $this->waitForPageLoadAndCheckForErrors();
53
-    }
43
+		$this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=geodir_manage_custom_posts&action=cp_addedit');
44
+		$this->waitForPageLoadAndCheckForErrors();
45
+		$this->assertTrue( $this->isTextPresent("Post Type"), "Post Type text not found");
46
+		$this->byId('geodir_custom_post_type')->value('hotel');
47
+		$this->byId('geodir_listing_slug')->value('hotels');
48
+		$this->byId('geodir_listing_order')->value('10');
49
+		$this->byId('geodir_name')->value('Hotels');
50
+		$this->byId('geodir_singular_name')->value('Hotel');
51
+		$this->byName('geodir_save_post_type')->click();
52
+		$this->waitForPageLoadAndCheckForErrors();
53
+	}
54 54
 
55
-    public function tearDown()
56
-    {
57
-        if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
58
-            //write current file number to completed.txt
59
-            $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
60
-            $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
61
-            fwrite($completed, $CurrentFileNumber);
62
-        }
63
-    }
55
+	public function tearDown()
56
+	{
57
+		if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) {
58
+			//write current file number to completed.txt
59
+			$CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME));
60
+			$completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!");
61
+			fwrite($completed, $CurrentFileNumber);
62
+		}
63
+	}
64 64
 }
65 65
 ?>
66 66
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         }
31 31
 
32 32
         $is_active1 = $this->byId("geodirectory-custom-post-types")->attribute('class');
33
-        $this->assertFalse( strpos($is_active1, 'inactive'), "Custom Post Types plugin not active");
33
+        $this->assertFalse(strpos($is_active1, 'inactive'), "Custom Post Types plugin not active");
34 34
 
35 35
 
36 36
         $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=geodir_manage_custom_posts');
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
         $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=geodir_manage_custom_posts&action=cp_addedit');
44 44
         $this->waitForPageLoadAndCheckForErrors();
45
-        $this->assertTrue( $this->isTextPresent("Post Type"), "Post Type text not found");
45
+        $this->assertTrue($this->isTextPresent("Post Type"), "Post Type text not found");
46 46
         $this->byId('geodir_custom_post_type')->value('hotel');
47 47
         $this->byId('geodir_listing_slug')->value('hotels');
48 48
         $this->byId('geodir_listing_order')->value('10');
Please login to merge, or discard this patch.
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.