@@ -29,7 +29,7 @@ |
||
| 29 | 29 | 'post_type' => 'gd_place' |
| 30 | 30 | ); |
| 31 | 31 | |
| 32 | - $all_posts = new WP_Query( $query_args ); |
|
| 32 | + $all_posts = new WP_Query($query_args); |
|
| 33 | 33 | |
| 34 | 34 | $total_posts = $all_posts->found_posts; |
| 35 | 35 | |
@@ -1,50 +1,50 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | class TestDummyData extends WP_UnitTestCase |
| 3 | 3 | { |
| 4 | - public function setUp() |
|
| 5 | - { |
|
| 6 | - parent::setUp(); |
|
| 7 | - wp_set_current_user(1); |
|
| 8 | - geodir_delete_dummy_posts(); |
|
| 9 | - } |
|
| 4 | + public function setUp() |
|
| 5 | + { |
|
| 6 | + parent::setUp(); |
|
| 7 | + wp_set_current_user(1); |
|
| 8 | + geodir_delete_dummy_posts(); |
|
| 9 | + } |
|
| 10 | 10 | |
| 11 | - public function testCreatePlaces() |
|
| 12 | - { |
|
| 13 | - global $dummy_post_index, $city_bound_lat1, $city_bound_lng1, $city_bound_lat2, $city_bound_lng2; |
|
| 11 | + public function testCreatePlaces() |
|
| 12 | + { |
|
| 13 | + global $dummy_post_index, $city_bound_lat1, $city_bound_lng1, $city_bound_lat2, $city_bound_lng2; |
|
| 14 | 14 | |
| 15 | - global $geodir_post_custom_fields_cache; |
|
| 16 | - $geodir_post_custom_fields_cache = array(); |
|
| 15 | + global $geodir_post_custom_fields_cache; |
|
| 16 | + $geodir_post_custom_fields_cache = array(); |
|
| 17 | 17 | |
| 18 | - $city_bound_lat1 = 40.4960439; |
|
| 19 | - $city_bound_lng1 = -74.2557349; |
|
| 20 | - $city_bound_lat2 = 40.91525559999999; |
|
| 21 | - $city_bound_lng2 = -73.7002721; |
|
| 18 | + $city_bound_lat1 = 40.4960439; |
|
| 19 | + $city_bound_lng1 = -74.2557349; |
|
| 20 | + $city_bound_lat2 = 40.91525559999999; |
|
| 21 | + $city_bound_lng2 = -73.7002721; |
|
| 22 | 22 | |
| 23 | 23 | |
| 24 | - $dummy_post_index = 30; |
|
| 25 | - test_create_dummy_posts(30); |
|
| 24 | + $dummy_post_index = 30; |
|
| 25 | + test_create_dummy_posts(30); |
|
| 26 | 26 | |
| 27 | - $query_args = array( |
|
| 28 | - 'post_status' => 'publish', |
|
| 29 | - 'post_type' => 'gd_place' |
|
| 30 | - ); |
|
| 27 | + $query_args = array( |
|
| 28 | + 'post_status' => 'publish', |
|
| 29 | + 'post_type' => 'gd_place' |
|
| 30 | + ); |
|
| 31 | 31 | |
| 32 | - $all_posts = new WP_Query( $query_args ); |
|
| 32 | + $all_posts = new WP_Query( $query_args ); |
|
| 33 | 33 | |
| 34 | - $total_posts = $all_posts->found_posts; |
|
| 34 | + $total_posts = $all_posts->found_posts; |
|
| 35 | 35 | |
| 36 | - $this->assertTrue((int) $total_posts > 0); |
|
| 36 | + $this->assertTrue((int) $total_posts > 0); |
|
| 37 | 37 | |
| 38 | - } |
|
| 38 | + } |
|
| 39 | 39 | |
| 40 | - public function testDeletePlaces() |
|
| 41 | - { |
|
| 42 | - geodir_delete_dummy_posts(); |
|
| 43 | - } |
|
| 40 | + public function testDeletePlaces() |
|
| 41 | + { |
|
| 42 | + geodir_delete_dummy_posts(); |
|
| 43 | + } |
|
| 44 | 44 | |
| 45 | - public function tearDown() |
|
| 46 | - { |
|
| 47 | - parent::tearDown(); |
|
| 48 | - } |
|
| 45 | + public function tearDown() |
|
| 46 | + { |
|
| 47 | + parent::tearDown(); |
|
| 48 | + } |
|
| 49 | 49 | } |
| 50 | 50 | ?> |
| 51 | 51 | \ No newline at end of file |
@@ -1,19 +1,19 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | class ImportExport extends WP_UnitTestCase |
| 3 | 3 | { |
| 4 | - public function setUp() |
|
| 5 | - { |
|
| 6 | - parent::setUp(); |
|
| 7 | - } |
|
| 4 | + public function setUp() |
|
| 5 | + { |
|
| 6 | + parent::setUp(); |
|
| 7 | + } |
|
| 8 | 8 | |
| 9 | - public function testImportExport() |
|
| 10 | - { |
|
| 9 | + public function testImportExport() |
|
| 10 | + { |
|
| 11 | 11 | |
| 12 | - } |
|
| 12 | + } |
|
| 13 | 13 | |
| 14 | - public function tearDown() |
|
| 15 | - { |
|
| 16 | - parent::tearDown(); |
|
| 17 | - } |
|
| 14 | + public function tearDown() |
|
| 15 | + { |
|
| 16 | + parent::tearDown(); |
|
| 17 | + } |
|
| 18 | 18 | } |
| 19 | 19 | ?> |
| 20 | 20 | \ No newline at end of file |
@@ -1,42 +1,42 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | class SendEnquiry extends GD_Test |
| 3 | 3 | { |
| 4 | - public function setUp() |
|
| 5 | - { |
|
| 6 | - parent::setUp(); |
|
| 4 | + public function setUp() |
|
| 5 | + { |
|
| 6 | + parent::setUp(); |
|
| 7 | 7 | |
| 8 | - //skip test if already completed. |
|
| 9 | - if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 10 | - $this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......'); |
|
| 11 | - return; |
|
| 12 | - } else { |
|
| 13 | - $this->prepareSession()->currentWindow()->maximize(); |
|
| 14 | - } |
|
| 15 | - } |
|
| 8 | + //skip test if already completed. |
|
| 9 | + if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 10 | + $this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......'); |
|
| 11 | + return; |
|
| 12 | + } else { |
|
| 13 | + $this->prepareSession()->currentWindow()->maximize(); |
|
| 14 | + } |
|
| 15 | + } |
|
| 16 | 16 | |
| 17 | - public function testSendEnquiry() |
|
| 18 | - { |
|
| 19 | - $this->logInfo('Send Enquiry......'); |
|
| 20 | - $this->url(self::GDTEST_BASE_URL.'places/united-states/new-york/new-york/attractions/test-listing/'); |
|
| 21 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 22 | - $this->byClassName('b_send_inquiry')->click(); |
|
| 23 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 24 | - $this->byName('inq_name')->value('Test User'); |
|
| 25 | - $this->byName('inq_email')->value('[email protected]'); |
|
| 26 | - $this->byId('agt_mail_phone')->value('44444444444'); |
|
| 27 | - $this->byName('Send')->click(); |
|
| 28 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 29 | - $this->assertTrue( $this->isTextPresent("Enquiry sent successfully"), "Success text not found"); |
|
| 30 | - } |
|
| 17 | + public function testSendEnquiry() |
|
| 18 | + { |
|
| 19 | + $this->logInfo('Send Enquiry......'); |
|
| 20 | + $this->url(self::GDTEST_BASE_URL.'places/united-states/new-york/new-york/attractions/test-listing/'); |
|
| 21 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 22 | + $this->byClassName('b_send_inquiry')->click(); |
|
| 23 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 24 | + $this->byName('inq_name')->value('Test User'); |
|
| 25 | + $this->byName('inq_email')->value('[email protected]'); |
|
| 26 | + $this->byId('agt_mail_phone')->value('44444444444'); |
|
| 27 | + $this->byName('Send')->click(); |
|
| 28 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 29 | + $this->assertTrue( $this->isTextPresent("Enquiry sent successfully"), "Success text not found"); |
|
| 30 | + } |
|
| 31 | 31 | |
| 32 | - public function tearDown() |
|
| 33 | - { |
|
| 34 | - if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 35 | - //write current file number to completed.txt |
|
| 36 | - $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)); |
|
| 37 | - $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!"); |
|
| 38 | - fwrite($completed, $CurrentFileNumber); |
|
| 39 | - } |
|
| 40 | - } |
|
| 32 | + public function tearDown() |
|
| 33 | + { |
|
| 34 | + if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 35 | + //write current file number to completed.txt |
|
| 36 | + $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)); |
|
| 37 | + $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!"); |
|
| 38 | + fwrite($completed, $CurrentFileNumber); |
|
| 39 | + } |
|
| 40 | + } |
|
| 41 | 41 | } |
| 42 | 42 | ?> |
| 43 | 43 | \ No newline at end of file |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | $this->byId('agt_mail_phone')->value('44444444444'); |
| 27 | 27 | $this->byName('Send')->click(); |
| 28 | 28 | $this->waitForPageLoadAndCheckForErrors(); |
| 29 | - $this->assertTrue( $this->isTextPresent("Enquiry sent successfully"), "Success text not found"); |
|
| 29 | + $this->assertTrue($this->isTextPresent("Enquiry sent successfully"), "Success text not found"); |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | public function tearDown() |
@@ -1,74 +1,74 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | class AddCustomFields extends GD_Test |
| 3 | 3 | { |
| 4 | - public function setUp() |
|
| 5 | - { |
|
| 6 | - parent::setUp(); |
|
| 4 | + public function setUp() |
|
| 5 | + { |
|
| 6 | + parent::setUp(); |
|
| 7 | 7 | |
| 8 | - //skip test if already completed. |
|
| 9 | - if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 10 | - $this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......'); |
|
| 11 | - return; |
|
| 12 | - } else { |
|
| 13 | - $this->prepareSession()->currentWindow()->maximize(); |
|
| 14 | - } |
|
| 15 | - } |
|
| 8 | + //skip test if already completed. |
|
| 9 | + if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 10 | + $this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......'); |
|
| 11 | + return; |
|
| 12 | + } else { |
|
| 13 | + $this->prepareSession()->currentWindow()->maximize(); |
|
| 14 | + } |
|
| 15 | + } |
|
| 16 | 16 | |
| 17 | - public function testAddCustomFields() |
|
| 18 | - { |
|
| 19 | - $this->logInfo('Add custom fields......'); |
|
| 20 | - $this->prepareSession()->currentWindow()->maximize(); |
|
| 21 | - //Field 1 |
|
| 22 | - $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=gd_place_fields_settings&subtab=custom_fields&listing_type=gd_place'); |
|
| 23 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 24 | - $this->byId('gt-text')->click(); |
|
| 25 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 26 | - $link = $this->byXPath("//li[@id='licontainer_new10']/div[contains(@class,'titlenew10')]"); |
|
| 27 | - $this->moveto($link); |
|
| 28 | - $this->doubleclick(); |
|
| 29 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 30 | - $this->byXPath("//div[@id='field_frmnew10']//input[@id='admin_title']")->value('Text Field 1'); |
|
| 31 | - $this->byXPath("//div[@id='field_frmnew10']//input[@id='site_title']")->value('Text Field 1'); |
|
| 32 | - $this->byXPath("//div[@id='field_frmnew10']//input[@id='htmlvar_name']")->value('text_field_1'); |
|
| 33 | - $this->byXPath("//div[@id='field_frmnew10']//input[@id='clabels']")->value('Text Field 1'); |
|
| 34 | - $this->select($this->byXPath("//div[@id='field_frmnew10']//select[@id='is_active']"))->selectOptionByLabel('Yes'); |
|
| 35 | - $this->select($this->byXPath("//div[@id='field_frmnew10']//select[@id='show_on_listing']"))->selectOptionByLabel('Yes'); |
|
| 36 | - $this->select($this->byXPath("//div[@id='field_frmnew10']//select[@id='show_on_detail']"))->selectOptionByLabel('Yes'); |
|
| 37 | - $this->byXPath("//div[@id='field_frmnew10']//input[@id='cat_sort']")->click(); |
|
| 38 | - $this->byXPath("//div[@id='field_frmnew10']//input[@id='cat_filter']")->click(); |
|
| 39 | - $this->byXPath("//div[@id='field_frmnew10']//input[@id='save']")->click(); |
|
| 40 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 17 | + public function testAddCustomFields() |
|
| 18 | + { |
|
| 19 | + $this->logInfo('Add custom fields......'); |
|
| 20 | + $this->prepareSession()->currentWindow()->maximize(); |
|
| 21 | + //Field 1 |
|
| 22 | + $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=gd_place_fields_settings&subtab=custom_fields&listing_type=gd_place'); |
|
| 23 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 24 | + $this->byId('gt-text')->click(); |
|
| 25 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 26 | + $link = $this->byXPath("//li[@id='licontainer_new10']/div[contains(@class,'titlenew10')]"); |
|
| 27 | + $this->moveto($link); |
|
| 28 | + $this->doubleclick(); |
|
| 29 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 30 | + $this->byXPath("//div[@id='field_frmnew10']//input[@id='admin_title']")->value('Text Field 1'); |
|
| 31 | + $this->byXPath("//div[@id='field_frmnew10']//input[@id='site_title']")->value('Text Field 1'); |
|
| 32 | + $this->byXPath("//div[@id='field_frmnew10']//input[@id='htmlvar_name']")->value('text_field_1'); |
|
| 33 | + $this->byXPath("//div[@id='field_frmnew10']//input[@id='clabels']")->value('Text Field 1'); |
|
| 34 | + $this->select($this->byXPath("//div[@id='field_frmnew10']//select[@id='is_active']"))->selectOptionByLabel('Yes'); |
|
| 35 | + $this->select($this->byXPath("//div[@id='field_frmnew10']//select[@id='show_on_listing']"))->selectOptionByLabel('Yes'); |
|
| 36 | + $this->select($this->byXPath("//div[@id='field_frmnew10']//select[@id='show_on_detail']"))->selectOptionByLabel('Yes'); |
|
| 37 | + $this->byXPath("//div[@id='field_frmnew10']//input[@id='cat_sort']")->click(); |
|
| 38 | + $this->byXPath("//div[@id='field_frmnew10']//input[@id='cat_filter']")->click(); |
|
| 39 | + $this->byXPath("//div[@id='field_frmnew10']//input[@id='save']")->click(); |
|
| 40 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 41 | 41 | |
| 42 | - //Field 2 |
|
| 43 | - $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=gd_place_fields_settings&subtab=custom_fields&listing_type=gd_place'); |
|
| 44 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 45 | - $this->byId('gt-text')->click(); |
|
| 46 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 47 | - $link = $this->byXPath("//li[@id='licontainer_new11']/div[contains(@class,'titlenew11')]"); |
|
| 48 | - $this->moveto($link); |
|
| 49 | - $this->doubleclick(); |
|
| 50 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 51 | - $this->byXPath("//div[@id='field_frmnew11']//input[@id='admin_title']")->value('Text Field 2'); |
|
| 52 | - $this->byXPath("//div[@id='field_frmnew11']//input[@id='site_title']")->value('Text Field 2'); |
|
| 53 | - $this->byXPath("//div[@id='field_frmnew11']//input[@id='htmlvar_name']")->value('text_field_2'); |
|
| 54 | - $this->byXPath("//div[@id='field_frmnew11']//input[@id='clabels']")->value('Text Field 2'); |
|
| 55 | - $this->select($this->byXPath("//div[@id='field_frmnew11']//select[@id='is_active']"))->selectOptionByLabel('Yes'); |
|
| 56 | - $this->select($this->byXPath("//div[@id='field_frmnew11']//select[@id='show_on_listing']"))->selectOptionByLabel('Yes'); |
|
| 57 | - $this->select($this->byXPath("//div[@id='field_frmnew11']//select[@id='show_on_detail']"))->selectOptionByLabel('Yes'); |
|
| 58 | - $this->byXPath("//div[@id='field_frmnew11']//input[@id='cat_sort']")->click(); |
|
| 59 | - $this->byXPath("//div[@id='field_frmnew11']//input[@id='cat_filter']")->click(); |
|
| 60 | - $this->byXPath("//div[@id='field_frmnew11']//input[@id='save']")->click(); |
|
| 61 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 62 | - } |
|
| 42 | + //Field 2 |
|
| 43 | + $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=gd_place_fields_settings&subtab=custom_fields&listing_type=gd_place'); |
|
| 44 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 45 | + $this->byId('gt-text')->click(); |
|
| 46 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 47 | + $link = $this->byXPath("//li[@id='licontainer_new11']/div[contains(@class,'titlenew11')]"); |
|
| 48 | + $this->moveto($link); |
|
| 49 | + $this->doubleclick(); |
|
| 50 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 51 | + $this->byXPath("//div[@id='field_frmnew11']//input[@id='admin_title']")->value('Text Field 2'); |
|
| 52 | + $this->byXPath("//div[@id='field_frmnew11']//input[@id='site_title']")->value('Text Field 2'); |
|
| 53 | + $this->byXPath("//div[@id='field_frmnew11']//input[@id='htmlvar_name']")->value('text_field_2'); |
|
| 54 | + $this->byXPath("//div[@id='field_frmnew11']//input[@id='clabels']")->value('Text Field 2'); |
|
| 55 | + $this->select($this->byXPath("//div[@id='field_frmnew11']//select[@id='is_active']"))->selectOptionByLabel('Yes'); |
|
| 56 | + $this->select($this->byXPath("//div[@id='field_frmnew11']//select[@id='show_on_listing']"))->selectOptionByLabel('Yes'); |
|
| 57 | + $this->select($this->byXPath("//div[@id='field_frmnew11']//select[@id='show_on_detail']"))->selectOptionByLabel('Yes'); |
|
| 58 | + $this->byXPath("//div[@id='field_frmnew11']//input[@id='cat_sort']")->click(); |
|
| 59 | + $this->byXPath("//div[@id='field_frmnew11']//input[@id='cat_filter']")->click(); |
|
| 60 | + $this->byXPath("//div[@id='field_frmnew11']//input[@id='save']")->click(); |
|
| 61 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 62 | + } |
|
| 63 | 63 | |
| 64 | - public function tearDown() |
|
| 65 | - { |
|
| 66 | - if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 67 | - //write current file number to completed.txt |
|
| 68 | - $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)); |
|
| 69 | - $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!"); |
|
| 70 | - fwrite($completed, $CurrentFileNumber); |
|
| 71 | - } |
|
| 72 | - } |
|
| 64 | + public function tearDown() |
|
| 65 | + { |
|
| 66 | + if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 67 | + //write current file number to completed.txt |
|
| 68 | + $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)); |
|
| 69 | + $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!"); |
|
| 70 | + fwrite($completed, $CurrentFileNumber); |
|
| 71 | + } |
|
| 72 | + } |
|
| 73 | 73 | } |
| 74 | 74 | ?> |
| 75 | 75 | \ No newline at end of file |
@@ -1,48 +1,48 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | class AddReview extends GD_Test |
| 3 | 3 | { |
| 4 | - public function setUp() |
|
| 5 | - { |
|
| 6 | - parent::setUp(); |
|
| 4 | + public function setUp() |
|
| 5 | + { |
|
| 6 | + parent::setUp(); |
|
| 7 | 7 | |
| 8 | - //skip test if already completed. |
|
| 9 | - if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 10 | - $this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......'); |
|
| 11 | - return; |
|
| 12 | - } else { |
|
| 13 | - $this->prepareSession()->currentWindow()->maximize(); |
|
| 14 | - } |
|
| 15 | - } |
|
| 8 | + //skip test if already completed. |
|
| 9 | + if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 10 | + $this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......'); |
|
| 11 | + return; |
|
| 12 | + } else { |
|
| 13 | + $this->prepareSession()->currentWindow()->maximize(); |
|
| 14 | + } |
|
| 15 | + } |
|
| 16 | 16 | |
| 17 | - public function testAddReview() |
|
| 18 | - { |
|
| 19 | - $this->logInfo('Adding a review......'); |
|
| 20 | - $this->maybeUserLogin(self::GDTEST_BASE_URL.'places/united-states/new-york/new-york/attractions/franklin-square/', true); |
|
| 21 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 22 | - $this->prepareSession()->currentWindow()->maximize(); |
|
| 23 | - $this->ExecuteScript('jQuery(".geodir-tab-head").css("overflow", "hidden");'); |
|
| 24 | - try { |
|
| 25 | - $this->byXPath("//a[text()='Reviews']")->click(); |
|
| 26 | - } catch (PHPUnit_Extensions_Selenium2TestCase_WebDriverException $e) { |
|
| 27 | - if (PHPUnit_Extensions_Selenium2TestCase_WebDriverException::ElementNotVisible == $e->getCode()) { |
|
| 28 | - $this->ExecuteScript('jQuery("#geodir-tab-mobile-menu").click();'); |
|
| 29 | - $this->byXPath("//a[text()='Reviews']")->click(); |
|
| 30 | - } |
|
| 31 | - } |
|
| 32 | - $this->ExecuteScript('jQuery("#geodir_overallrating").val("4");'); |
|
| 33 | - $this->byId('comment')->value('Cool xyz'); |
|
| 34 | - $this->byId('submit')->click(); |
|
| 35 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 36 | - } |
|
| 17 | + public function testAddReview() |
|
| 18 | + { |
|
| 19 | + $this->logInfo('Adding a review......'); |
|
| 20 | + $this->maybeUserLogin(self::GDTEST_BASE_URL.'places/united-states/new-york/new-york/attractions/franklin-square/', true); |
|
| 21 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 22 | + $this->prepareSession()->currentWindow()->maximize(); |
|
| 23 | + $this->ExecuteScript('jQuery(".geodir-tab-head").css("overflow", "hidden");'); |
|
| 24 | + try { |
|
| 25 | + $this->byXPath("//a[text()='Reviews']")->click(); |
|
| 26 | + } catch (PHPUnit_Extensions_Selenium2TestCase_WebDriverException $e) { |
|
| 27 | + if (PHPUnit_Extensions_Selenium2TestCase_WebDriverException::ElementNotVisible == $e->getCode()) { |
|
| 28 | + $this->ExecuteScript('jQuery("#geodir-tab-mobile-menu").click();'); |
|
| 29 | + $this->byXPath("//a[text()='Reviews']")->click(); |
|
| 30 | + } |
|
| 31 | + } |
|
| 32 | + $this->ExecuteScript('jQuery("#geodir_overallrating").val("4");'); |
|
| 33 | + $this->byId('comment')->value('Cool xyz'); |
|
| 34 | + $this->byId('submit')->click(); |
|
| 35 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 36 | + } |
|
| 37 | 37 | |
| 38 | - public function tearDown() |
|
| 39 | - { |
|
| 40 | - if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 41 | - //write current file number to completed.txt |
|
| 42 | - $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)); |
|
| 43 | - $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!"); |
|
| 44 | - fwrite($completed, $CurrentFileNumber); |
|
| 45 | - } |
|
| 46 | - } |
|
| 38 | + public function tearDown() |
|
| 39 | + { |
|
| 40 | + if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 41 | + //write current file number to completed.txt |
|
| 42 | + $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)); |
|
| 43 | + $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!"); |
|
| 44 | + fwrite($completed, $CurrentFileNumber); |
|
| 45 | + } |
|
| 46 | + } |
|
| 47 | 47 | } |
| 48 | 48 | ?> |
| 49 | 49 | \ No newline at end of file |
@@ -1,50 +1,50 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | class GDBooster extends GD_Test |
| 3 | 3 | { |
| 4 | - public function setUp() |
|
| 5 | - { |
|
| 6 | - parent::setUp(); |
|
| 7 | - |
|
| 8 | - //skip test if already completed. |
|
| 9 | - if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 10 | - $this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......'); |
|
| 11 | - return; |
|
| 12 | - } else { |
|
| 13 | - $this->prepareSession()->currentWindow()->maximize(); |
|
| 14 | - } |
|
| 15 | - } |
|
| 16 | - |
|
| 17 | - public function testGDBooster() |
|
| 18 | - { |
|
| 19 | - $this->logInfo('Testing GD booster......'); |
|
| 20 | - |
|
| 21 | - //make sure GD Booster plugin active |
|
| 22 | - $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php'); |
|
| 23 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 24 | - |
|
| 25 | - $is_active = $this->byId("gd-booster")->attribute('class'); |
|
| 26 | - if (is_int(strpos($is_active, 'inactive'))) { |
|
| 27 | - //Activate Geodirectory Booster |
|
| 28 | - $this->maybeActivatePlugin("gd-booster", 20000); |
|
| 29 | - //go back to plugin page |
|
| 30 | - $this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php'); |
|
| 31 | - } |
|
| 32 | - |
|
| 33 | - $is_active1 = $this->byId("gd-booster")->attribute('class'); |
|
| 34 | - $this->assertFalse( strpos($is_active1, 'inactive'), "GD Booster plugin not active"); |
|
| 35 | - |
|
| 36 | - |
|
| 37 | - |
|
| 38 | - } |
|
| 39 | - |
|
| 40 | - public function tearDown() |
|
| 41 | - { |
|
| 42 | - if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 43 | - //write current file number to completed.txt |
|
| 44 | - $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)); |
|
| 45 | - $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!"); |
|
| 46 | - fwrite($completed, $CurrentFileNumber); |
|
| 47 | - } |
|
| 48 | - } |
|
| 4 | + public function setUp() |
|
| 5 | + { |
|
| 6 | + parent::setUp(); |
|
| 7 | + |
|
| 8 | + //skip test if already completed. |
|
| 9 | + if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 10 | + $this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......'); |
|
| 11 | + return; |
|
| 12 | + } else { |
|
| 13 | + $this->prepareSession()->currentWindow()->maximize(); |
|
| 14 | + } |
|
| 15 | + } |
|
| 16 | + |
|
| 17 | + public function testGDBooster() |
|
| 18 | + { |
|
| 19 | + $this->logInfo('Testing GD booster......'); |
|
| 20 | + |
|
| 21 | + //make sure GD Booster plugin active |
|
| 22 | + $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php'); |
|
| 23 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 24 | + |
|
| 25 | + $is_active = $this->byId("gd-booster")->attribute('class'); |
|
| 26 | + if (is_int(strpos($is_active, 'inactive'))) { |
|
| 27 | + //Activate Geodirectory Booster |
|
| 28 | + $this->maybeActivatePlugin("gd-booster", 20000); |
|
| 29 | + //go back to plugin page |
|
| 30 | + $this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php'); |
|
| 31 | + } |
|
| 32 | + |
|
| 33 | + $is_active1 = $this->byId("gd-booster")->attribute('class'); |
|
| 34 | + $this->assertFalse( strpos($is_active1, 'inactive'), "GD Booster plugin not active"); |
|
| 35 | + |
|
| 36 | + |
|
| 37 | + |
|
| 38 | + } |
|
| 39 | + |
|
| 40 | + public function tearDown() |
|
| 41 | + { |
|
| 42 | + if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 43 | + //write current file number to completed.txt |
|
| 44 | + $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)); |
|
| 45 | + $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!"); |
|
| 46 | + fwrite($completed, $CurrentFileNumber); |
|
| 47 | + } |
|
| 48 | + } |
|
| 49 | 49 | } |
| 50 | 50 | ?> |
| 51 | 51 | \ No newline at end of file |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | $is_active1 = $this->byId("gd-booster")->attribute('class'); |
| 34 | - $this->assertFalse( strpos($is_active1, 'inactive'), "GD Booster plugin not active"); |
|
| 34 | + $this->assertFalse(strpos($is_active1, 'inactive'), "GD Booster plugin not active"); |
|
| 35 | 35 | |
| 36 | 36 | |
| 37 | 37 | |
@@ -1,39 +1,39 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | class SearchWithKeyword extends GD_Test |
| 3 | 3 | { |
| 4 | - public function setUp() |
|
| 5 | - { |
|
| 6 | - parent::setUp(); |
|
| 4 | + public function setUp() |
|
| 5 | + { |
|
| 6 | + parent::setUp(); |
|
| 7 | 7 | |
| 8 | - //skip test if already completed. |
|
| 9 | - if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 10 | - $this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......'); |
|
| 11 | - return; |
|
| 12 | - } else { |
|
| 13 | - $this->prepareSession()->currentWindow()->maximize(); |
|
| 14 | - } |
|
| 15 | - } |
|
| 8 | + //skip test if already completed. |
|
| 9 | + if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 10 | + $this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......'); |
|
| 11 | + return; |
|
| 12 | + } else { |
|
| 13 | + $this->prepareSession()->currentWindow()->maximize(); |
|
| 14 | + } |
|
| 15 | + } |
|
| 16 | 16 | |
| 17 | - public function testSearchWithKeyword() |
|
| 18 | - { |
|
| 19 | - $this->logInfo('Searching with keyword......'); |
|
| 20 | - $this->url(self::GDTEST_BASE_URL); |
|
| 21 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 17 | + public function testSearchWithKeyword() |
|
| 18 | + { |
|
| 19 | + $this->logInfo('Searching with keyword......'); |
|
| 20 | + $this->url(self::GDTEST_BASE_URL); |
|
| 21 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 22 | 22 | // $this->byClassName('search_text')->value('Test'); |
| 23 | 23 | // $this->byClassName('geodir_submit_search')->click(); |
| 24 | - $this->url(self::GDTEST_BASE_URL.'?geodir_search=1&stype=gd_place&s=test&snear=&sgeo_lat=&sgeo_lon='); |
|
| 25 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 26 | - $this->assertTrue( $this->isTextPresent("Search Places For"), "Not in search results page"); |
|
| 27 | - } |
|
| 24 | + $this->url(self::GDTEST_BASE_URL.'?geodir_search=1&stype=gd_place&s=test&snear=&sgeo_lat=&sgeo_lon='); |
|
| 25 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 26 | + $this->assertTrue( $this->isTextPresent("Search Places For"), "Not in search results page"); |
|
| 27 | + } |
|
| 28 | 28 | |
| 29 | - public function tearDown() |
|
| 30 | - { |
|
| 31 | - if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 32 | - //write current file number to completed.txt |
|
| 33 | - $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)); |
|
| 34 | - $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!"); |
|
| 35 | - fwrite($completed, $CurrentFileNumber); |
|
| 36 | - } |
|
| 37 | - } |
|
| 29 | + public function tearDown() |
|
| 30 | + { |
|
| 31 | + if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 32 | + //write current file number to completed.txt |
|
| 33 | + $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)); |
|
| 34 | + $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!"); |
|
| 35 | + fwrite($completed, $CurrentFileNumber); |
|
| 36 | + } |
|
| 37 | + } |
|
| 38 | 38 | } |
| 39 | 39 | ?> |
| 40 | 40 | \ No newline at end of file |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | // $this->byClassName('geodir_submit_search')->click(); |
| 24 | 24 | $this->url(self::GDTEST_BASE_URL.'?geodir_search=1&stype=gd_place&s=test&snear=&sgeo_lat=&sgeo_lon='); |
| 25 | 25 | $this->waitForPageLoadAndCheckForErrors(); |
| 26 | - $this->assertTrue( $this->isTextPresent("Search Places For"), "Not in search results page"); |
|
| 26 | + $this->assertTrue($this->isTextPresent("Search Places For"), "Not in search results page"); |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | public function tearDown() |
@@ -1,39 +1,39 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | class SearchWithNear extends GD_Test |
| 3 | 3 | { |
| 4 | - public function setUp() |
|
| 5 | - { |
|
| 6 | - parent::setUp(); |
|
| 4 | + public function setUp() |
|
| 5 | + { |
|
| 6 | + parent::setUp(); |
|
| 7 | 7 | |
| 8 | - //skip test if already completed. |
|
| 9 | - if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 10 | - $this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......'); |
|
| 11 | - return; |
|
| 12 | - } else { |
|
| 13 | - $this->prepareSession()->currentWindow()->maximize(); |
|
| 14 | - } |
|
| 15 | - } |
|
| 8 | + //skip test if already completed. |
|
| 9 | + if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 10 | + $this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......'); |
|
| 11 | + return; |
|
| 12 | + } else { |
|
| 13 | + $this->prepareSession()->currentWindow()->maximize(); |
|
| 14 | + } |
|
| 15 | + } |
|
| 16 | 16 | |
| 17 | - public function testSearchWithNear() |
|
| 18 | - { |
|
| 19 | - $this->logInfo('Searching with near......'); |
|
| 20 | - $this->url(self::GDTEST_BASE_URL); |
|
| 21 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 17 | + public function testSearchWithNear() |
|
| 18 | + { |
|
| 19 | + $this->logInfo('Searching with near......'); |
|
| 20 | + $this->url(self::GDTEST_BASE_URL); |
|
| 21 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 22 | 22 | // $this->byClassName('snear')->value('New York'); |
| 23 | 23 | // $this->byClassName('geodir_submit_search')->click(); |
| 24 | - $this->url(self::GDTEST_BASE_URL.'?geodir_search=1&stype=gd_place&s=+&snear=New+York&sgeo_lat=40.7127837&sgeo_lon=-74.00594130000002'); |
|
| 25 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 26 | - $this->assertTrue( $this->isTextPresent("Search Places"), "Not in search results page"); |
|
| 27 | - } |
|
| 24 | + $this->url(self::GDTEST_BASE_URL.'?geodir_search=1&stype=gd_place&s=+&snear=New+York&sgeo_lat=40.7127837&sgeo_lon=-74.00594130000002'); |
|
| 25 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 26 | + $this->assertTrue( $this->isTextPresent("Search Places"), "Not in search results page"); |
|
| 27 | + } |
|
| 28 | 28 | |
| 29 | - public function tearDown() |
|
| 30 | - { |
|
| 31 | - if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 32 | - //write current file number to completed.txt |
|
| 33 | - $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)); |
|
| 34 | - $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!"); |
|
| 35 | - fwrite($completed, $CurrentFileNumber); |
|
| 36 | - } |
|
| 37 | - } |
|
| 29 | + public function tearDown() |
|
| 30 | + { |
|
| 31 | + if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 32 | + //write current file number to completed.txt |
|
| 33 | + $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)); |
|
| 34 | + $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!"); |
|
| 35 | + fwrite($completed, $CurrentFileNumber); |
|
| 36 | + } |
|
| 37 | + } |
|
| 38 | 38 | } |
| 39 | 39 | ?> |
| 40 | 40 | \ No newline at end of file |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | // $this->byClassName('geodir_submit_search')->click(); |
| 24 | 24 | $this->url(self::GDTEST_BASE_URL.'?geodir_search=1&stype=gd_place&s=+&snear=New+York&sgeo_lat=40.7127837&sgeo_lon=-74.00594130000002'); |
| 25 | 25 | $this->waitForPageLoadAndCheckForErrors(); |
| 26 | - $this->assertTrue( $this->isTextPresent("Search Places"), "Not in search results page"); |
|
| 26 | + $this->assertTrue($this->isTextPresent("Search Places"), "Not in search results page"); |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | public function tearDown() |
@@ -1,171 +1,171 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | class SwitchLocations extends GD_Test |
| 3 | 3 | { |
| 4 | - public function setUp() |
|
| 5 | - { |
|
| 6 | - parent::setUp(); |
|
| 7 | - |
|
| 8 | - //skip test if already completed. |
|
| 9 | - if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 10 | - $this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......'); |
|
| 11 | - return; |
|
| 12 | - } else { |
|
| 13 | - $this->prepareSession()->currentWindow()->maximize(); |
|
| 14 | - } |
|
| 15 | - } |
|
| 16 | - |
|
| 17 | - public function testSwitchLocations() |
|
| 18 | - { |
|
| 19 | - $this->logInfo('Switch locations......'); |
|
| 20 | - //make sure multi locations plugin active |
|
| 21 | - $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php'); |
|
| 22 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 23 | - |
|
| 24 | - $is_active = $this->byId("geodirectory-location-manager")->attribute('class'); |
|
| 25 | - if (is_int(strpos($is_active, 'inactive'))) { |
|
| 26 | - //Activate Geodirectory Location Manager |
|
| 27 | - $this->maybeActivatePlugin("geodirectory-location-manager", 20000); |
|
| 28 | - //go back to plugin page |
|
| 29 | - $this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php'); |
|
| 30 | - } |
|
| 31 | - |
|
| 32 | - $is_active1 = $this->byId("geodirectory-location-manager")->attribute('class'); |
|
| 33 | - $this->assertFalse( strpos($is_active1, 'inactive'), "Location Manager plugin not active"); |
|
| 34 | - |
|
| 35 | - |
|
| 36 | - //Make sure Show location switcher in menu checked. |
|
| 37 | - $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_setting'); |
|
| 38 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 39 | - $is_checked = $this->byId('geodir_show_changelocation_nave')->attribute('checked'); |
|
| 40 | - if (!$is_checked) { |
|
| 41 | - $this->byId('geodir_show_changelocation_nave')->click(); |
|
| 42 | - $this->byClassName('button-primary')->click(); |
|
| 43 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 44 | - } |
|
| 45 | - |
|
| 46 | - //Set Navigation Locations |
|
| 47 | - $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=design_settings'); |
|
| 48 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 49 | - $this->byLinkText('Navigation')->click(); |
|
| 50 | - $this->ExecuteScript('jQuery("#geodir_theme_location_nav").show();'); |
|
| 51 | - $this->select($this->byId('geodir_theme_location_nav'))->selectOptionByLabel('The Main Menu'); |
|
| 52 | - $this->byName('save')->click(); |
|
| 53 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 54 | - |
|
| 55 | - //Add new location |
|
| 56 | - //make sure multi locations plugin active |
|
| 57 | - $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php'); |
|
| 58 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 59 | - |
|
| 60 | - $is_active = $this->byId("geodirectory-location-manager")->attribute('class'); |
|
| 61 | - if (is_int(strpos($is_active, 'inactive'))) { |
|
| 62 | - //Activate Geodirectory Location Manager |
|
| 63 | - $this->maybeActivatePlugin("geodirectory-location-manager", 20000); |
|
| 64 | - //go back to plugin page |
|
| 65 | - $this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php'); |
|
| 66 | - } |
|
| 67 | - |
|
| 68 | - $is_active1 = $this->byId("geodirectory-location-manager")->attribute('class'); |
|
| 69 | - $this->assertFalse( strpos($is_active1, 'inactive'), "Location Manager plugin not active"); |
|
| 70 | - |
|
| 71 | - // Add few locations |
|
| 72 | - // Las vegas |
|
| 73 | - $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit'); |
|
| 74 | - $this->prepareSession()->currentWindow()->maximize(); |
|
| 75 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 76 | - $this->byId('gd_city')->value('Las Vegas'); |
|
| 77 | - $this->byId('gd_region')->value('Nevada'); |
|
| 78 | - $this->byId('gd_set_address_button')->click(); |
|
| 79 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 80 | - $this->byId('geodir_location_save')->click(); |
|
| 81 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 82 | - $this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found"); |
|
| 83 | - |
|
| 84 | - //London |
|
| 85 | - $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit'); |
|
| 86 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 87 | - $this->byId('gd_city')->value('London'); |
|
| 88 | - $this->byId('gd_region')->value('Greater London'); |
|
| 89 | - $this->byId('gd_set_address_button')->click(); |
|
| 90 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 91 | - $this->byId('geodir_location_save')->click(); |
|
| 92 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 93 | - $this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found"); |
|
| 94 | - |
|
| 95 | - //Glasgow |
|
| 96 | - $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit'); |
|
| 97 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 98 | - $this->byId('gd_city')->value('Glasgow'); |
|
| 99 | - $this->byId('gd_region')->value('Glasgow City'); |
|
| 100 | - $this->byId('gd_set_address_button')->click(); |
|
| 101 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 102 | - $this->byId('geodir_location_save')->click(); |
|
| 103 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 104 | - $this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found"); |
|
| 105 | - |
|
| 106 | - //Mexico City |
|
| 107 | - $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit'); |
|
| 108 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 109 | - $this->byId('gd_city')->value('Mexico City'); |
|
| 110 | - $this->byId('gd_region')->value('Federal District'); |
|
| 111 | - $this->byId('gd_set_address_button')->click(); |
|
| 112 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 113 | - $this->byId('geodir_location_save')->click(); |
|
| 114 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 115 | - $this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found"); |
|
| 116 | - |
|
| 117 | - //sydney |
|
| 118 | - $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit'); |
|
| 119 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 120 | - $this->byId('gd_city')->value('sydney'); |
|
| 121 | - $this->byId('gd_region')->value('New South Wales'); |
|
| 122 | - $this->byId('gd_set_address_button')->click(); |
|
| 123 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 124 | - $this->byId('geodir_location_save')->click(); |
|
| 125 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 126 | - $this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found"); |
|
| 127 | - |
|
| 128 | - //tokyo |
|
| 129 | - $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit'); |
|
| 130 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 131 | - $this->byId('gd_city')->value('tokyo'); |
|
| 132 | - $this->byId('gd_region')->value('Tokyo'); |
|
| 133 | - $this->byId('gd_set_address_button')->click(); |
|
| 134 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 135 | - $this->byId('geodir_location_save')->click(); |
|
| 136 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 137 | - $this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found"); |
|
| 138 | - |
|
| 139 | - //Chennai |
|
| 140 | - $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit'); |
|
| 141 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 142 | - $this->byId('gd_city')->value('Chennai'); |
|
| 143 | - $this->byId('gd_region')->value('Tamil Nadu'); |
|
| 144 | - $this->byId('gd_set_address_button')->click(); |
|
| 145 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 146 | - $this->byId('geodir_location_save')->click(); |
|
| 147 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 148 | - $this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found"); |
|
| 149 | - |
|
| 150 | - |
|
| 151 | - //front end switch locations |
|
| 152 | - $this->url(self::GDTEST_BASE_URL.'location/united-states/nevada/las-vegas/'); |
|
| 153 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 154 | - $this->assertTrue( $this->isTextPresent("Las Vegas"), "'Las Vegas' text not found"); |
|
| 155 | - |
|
| 156 | - $this->url(self::GDTEST_BASE_URL.'location/united-states/new-york/new-york/'); |
|
| 157 | - $this->waitForPageLoadAndCheckForErrors(); |
|
| 158 | - $this->assertTrue( $this->isTextPresent("New York"), "'New York' text not found"); |
|
| 159 | - } |
|
| 160 | - |
|
| 161 | - public function tearDown() |
|
| 162 | - { |
|
| 163 | - if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 164 | - //write current file number to completed.txt |
|
| 165 | - $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)); |
|
| 166 | - $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!"); |
|
| 167 | - fwrite($completed, $CurrentFileNumber); |
|
| 168 | - } |
|
| 169 | - } |
|
| 4 | + public function setUp() |
|
| 5 | + { |
|
| 6 | + parent::setUp(); |
|
| 7 | + |
|
| 8 | + //skip test if already completed. |
|
| 9 | + if ($this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 10 | + $this->markTestSkipped('Skipping '.pathinfo(__FILE__, PATHINFO_FILENAME).' since its already completed......'); |
|
| 11 | + return; |
|
| 12 | + } else { |
|
| 13 | + $this->prepareSession()->currentWindow()->maximize(); |
|
| 14 | + } |
|
| 15 | + } |
|
| 16 | + |
|
| 17 | + public function testSwitchLocations() |
|
| 18 | + { |
|
| 19 | + $this->logInfo('Switch locations......'); |
|
| 20 | + //make sure multi locations plugin active |
|
| 21 | + $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php'); |
|
| 22 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 23 | + |
|
| 24 | + $is_active = $this->byId("geodirectory-location-manager")->attribute('class'); |
|
| 25 | + if (is_int(strpos($is_active, 'inactive'))) { |
|
| 26 | + //Activate Geodirectory Location Manager |
|
| 27 | + $this->maybeActivatePlugin("geodirectory-location-manager", 20000); |
|
| 28 | + //go back to plugin page |
|
| 29 | + $this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php'); |
|
| 30 | + } |
|
| 31 | + |
|
| 32 | + $is_active1 = $this->byId("geodirectory-location-manager")->attribute('class'); |
|
| 33 | + $this->assertFalse( strpos($is_active1, 'inactive'), "Location Manager plugin not active"); |
|
| 34 | + |
|
| 35 | + |
|
| 36 | + //Make sure Show location switcher in menu checked. |
|
| 37 | + $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_setting'); |
|
| 38 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 39 | + $is_checked = $this->byId('geodir_show_changelocation_nave')->attribute('checked'); |
|
| 40 | + if (!$is_checked) { |
|
| 41 | + $this->byId('geodir_show_changelocation_nave')->click(); |
|
| 42 | + $this->byClassName('button-primary')->click(); |
|
| 43 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 44 | + } |
|
| 45 | + |
|
| 46 | + //Set Navigation Locations |
|
| 47 | + $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=design_settings'); |
|
| 48 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 49 | + $this->byLinkText('Navigation')->click(); |
|
| 50 | + $this->ExecuteScript('jQuery("#geodir_theme_location_nav").show();'); |
|
| 51 | + $this->select($this->byId('geodir_theme_location_nav'))->selectOptionByLabel('The Main Menu'); |
|
| 52 | + $this->byName('save')->click(); |
|
| 53 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 54 | + |
|
| 55 | + //Add new location |
|
| 56 | + //make sure multi locations plugin active |
|
| 57 | + $this->maybeAdminLogin(self::GDTEST_BASE_URL.'wp-admin/plugins.php'); |
|
| 58 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 59 | + |
|
| 60 | + $is_active = $this->byId("geodirectory-location-manager")->attribute('class'); |
|
| 61 | + if (is_int(strpos($is_active, 'inactive'))) { |
|
| 62 | + //Activate Geodirectory Location Manager |
|
| 63 | + $this->maybeActivatePlugin("geodirectory-location-manager", 20000); |
|
| 64 | + //go back to plugin page |
|
| 65 | + $this->url(self::GDTEST_BASE_URL.'wp-admin/plugins.php'); |
|
| 66 | + } |
|
| 67 | + |
|
| 68 | + $is_active1 = $this->byId("geodirectory-location-manager")->attribute('class'); |
|
| 69 | + $this->assertFalse( strpos($is_active1, 'inactive'), "Location Manager plugin not active"); |
|
| 70 | + |
|
| 71 | + // Add few locations |
|
| 72 | + // Las vegas |
|
| 73 | + $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit'); |
|
| 74 | + $this->prepareSession()->currentWindow()->maximize(); |
|
| 75 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 76 | + $this->byId('gd_city')->value('Las Vegas'); |
|
| 77 | + $this->byId('gd_region')->value('Nevada'); |
|
| 78 | + $this->byId('gd_set_address_button')->click(); |
|
| 79 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 80 | + $this->byId('geodir_location_save')->click(); |
|
| 81 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 82 | + $this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found"); |
|
| 83 | + |
|
| 84 | + //London |
|
| 85 | + $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit'); |
|
| 86 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 87 | + $this->byId('gd_city')->value('London'); |
|
| 88 | + $this->byId('gd_region')->value('Greater London'); |
|
| 89 | + $this->byId('gd_set_address_button')->click(); |
|
| 90 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 91 | + $this->byId('geodir_location_save')->click(); |
|
| 92 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 93 | + $this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found"); |
|
| 94 | + |
|
| 95 | + //Glasgow |
|
| 96 | + $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit'); |
|
| 97 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 98 | + $this->byId('gd_city')->value('Glasgow'); |
|
| 99 | + $this->byId('gd_region')->value('Glasgow City'); |
|
| 100 | + $this->byId('gd_set_address_button')->click(); |
|
| 101 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 102 | + $this->byId('geodir_location_save')->click(); |
|
| 103 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 104 | + $this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found"); |
|
| 105 | + |
|
| 106 | + //Mexico City |
|
| 107 | + $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit'); |
|
| 108 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 109 | + $this->byId('gd_city')->value('Mexico City'); |
|
| 110 | + $this->byId('gd_region')->value('Federal District'); |
|
| 111 | + $this->byId('gd_set_address_button')->click(); |
|
| 112 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 113 | + $this->byId('geodir_location_save')->click(); |
|
| 114 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 115 | + $this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found"); |
|
| 116 | + |
|
| 117 | + //sydney |
|
| 118 | + $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit'); |
|
| 119 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 120 | + $this->byId('gd_city')->value('sydney'); |
|
| 121 | + $this->byId('gd_region')->value('New South Wales'); |
|
| 122 | + $this->byId('gd_set_address_button')->click(); |
|
| 123 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 124 | + $this->byId('geodir_location_save')->click(); |
|
| 125 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 126 | + $this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found"); |
|
| 127 | + |
|
| 128 | + //tokyo |
|
| 129 | + $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit'); |
|
| 130 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 131 | + $this->byId('gd_city')->value('tokyo'); |
|
| 132 | + $this->byId('gd_region')->value('Tokyo'); |
|
| 133 | + $this->byId('gd_set_address_button')->click(); |
|
| 134 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 135 | + $this->byId('geodir_location_save')->click(); |
|
| 136 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 137 | + $this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found"); |
|
| 138 | + |
|
| 139 | + //Chennai |
|
| 140 | + $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit'); |
|
| 141 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 142 | + $this->byId('gd_city')->value('Chennai'); |
|
| 143 | + $this->byId('gd_region')->value('Tamil Nadu'); |
|
| 144 | + $this->byId('gd_set_address_button')->click(); |
|
| 145 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 146 | + $this->byId('geodir_location_save')->click(); |
|
| 147 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 148 | + $this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found"); |
|
| 149 | + |
|
| 150 | + |
|
| 151 | + //front end switch locations |
|
| 152 | + $this->url(self::GDTEST_BASE_URL.'location/united-states/nevada/las-vegas/'); |
|
| 153 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 154 | + $this->assertTrue( $this->isTextPresent("Las Vegas"), "'Las Vegas' text not found"); |
|
| 155 | + |
|
| 156 | + $this->url(self::GDTEST_BASE_URL.'location/united-states/new-york/new-york/'); |
|
| 157 | + $this->waitForPageLoadAndCheckForErrors(); |
|
| 158 | + $this->assertTrue( $this->isTextPresent("New York"), "'New York' text not found"); |
|
| 159 | + } |
|
| 160 | + |
|
| 161 | + public function tearDown() |
|
| 162 | + { |
|
| 163 | + if (!$this->skipTest($this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)), $this->getCompletedFileNumber())) { |
|
| 164 | + //write current file number to completed.txt |
|
| 165 | + $CurrentFileNumber = $this->getCurrentFileNumber(pathinfo(__FILE__, PATHINFO_FILENAME)); |
|
| 166 | + $completed = fopen("tests/selenium/completed.txt", "w") or die("Unable to open file!"); |
|
| 167 | + fwrite($completed, $CurrentFileNumber); |
|
| 168 | + } |
|
| 169 | + } |
|
| 170 | 170 | } |
| 171 | 171 | ?> |
| 172 | 172 | \ No newline at end of file |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | $is_active1 = $this->byId("geodirectory-location-manager")->attribute('class'); |
| 33 | - $this->assertFalse( strpos($is_active1, 'inactive'), "Location Manager plugin not active"); |
|
| 33 | + $this->assertFalse(strpos($is_active1, 'inactive'), "Location Manager plugin not active"); |
|
| 34 | 34 | |
| 35 | 35 | |
| 36 | 36 | //Make sure Show location switcher in menu checked. |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | $is_active1 = $this->byId("geodirectory-location-manager")->attribute('class'); |
| 69 | - $this->assertFalse( strpos($is_active1, 'inactive'), "Location Manager plugin not active"); |
|
| 69 | + $this->assertFalse(strpos($is_active1, 'inactive'), "Location Manager plugin not active"); |
|
| 70 | 70 | |
| 71 | 71 | // Add few locations |
| 72 | 72 | // Las vegas |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | $this->waitForPageLoadAndCheckForErrors(); |
| 80 | 80 | $this->byId('geodir_location_save')->click(); |
| 81 | 81 | $this->waitForPageLoadAndCheckForErrors(); |
| 82 | - $this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found"); |
|
| 82 | + $this->assertTrue($this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found"); |
|
| 83 | 83 | |
| 84 | 84 | //London |
| 85 | 85 | $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit'); |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | $this->waitForPageLoadAndCheckForErrors(); |
| 91 | 91 | $this->byId('geodir_location_save')->click(); |
| 92 | 92 | $this->waitForPageLoadAndCheckForErrors(); |
| 93 | - $this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found"); |
|
| 93 | + $this->assertTrue($this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found"); |
|
| 94 | 94 | |
| 95 | 95 | //Glasgow |
| 96 | 96 | $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit'); |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | $this->waitForPageLoadAndCheckForErrors(); |
| 102 | 102 | $this->byId('geodir_location_save')->click(); |
| 103 | 103 | $this->waitForPageLoadAndCheckForErrors(); |
| 104 | - $this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found"); |
|
| 104 | + $this->assertTrue($this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found"); |
|
| 105 | 105 | |
| 106 | 106 | //Mexico City |
| 107 | 107 | $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit'); |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | $this->waitForPageLoadAndCheckForErrors(); |
| 113 | 113 | $this->byId('geodir_location_save')->click(); |
| 114 | 114 | $this->waitForPageLoadAndCheckForErrors(); |
| 115 | - $this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found"); |
|
| 115 | + $this->assertTrue($this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found"); |
|
| 116 | 116 | |
| 117 | 117 | //sydney |
| 118 | 118 | $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit'); |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | $this->waitForPageLoadAndCheckForErrors(); |
| 124 | 124 | $this->byId('geodir_location_save')->click(); |
| 125 | 125 | $this->waitForPageLoadAndCheckForErrors(); |
| 126 | - $this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found"); |
|
| 126 | + $this->assertTrue($this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found"); |
|
| 127 | 127 | |
| 128 | 128 | //tokyo |
| 129 | 129 | $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit'); |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | $this->waitForPageLoadAndCheckForErrors(); |
| 135 | 135 | $this->byId('geodir_location_save')->click(); |
| 136 | 136 | $this->waitForPageLoadAndCheckForErrors(); |
| 137 | - $this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found"); |
|
| 137 | + $this->assertTrue($this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found"); |
|
| 138 | 138 | |
| 139 | 139 | //Chennai |
| 140 | 140 | $this->url(self::GDTEST_BASE_URL.'wp-admin/admin.php?page=geodirectory&tab=managelocation_fields&subtab=geodir_location_addedit'); |
@@ -145,17 +145,17 @@ discard block |
||
| 145 | 145 | $this->waitForPageLoadAndCheckForErrors(); |
| 146 | 146 | $this->byId('geodir_location_save')->click(); |
| 147 | 147 | $this->waitForPageLoadAndCheckForErrors(); |
| 148 | - $this->assertTrue( $this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found"); |
|
| 148 | + $this->assertTrue($this->isTextPresent("Location saved successfully."), "'Location saved successfully' text not found"); |
|
| 149 | 149 | |
| 150 | 150 | |
| 151 | 151 | //front end switch locations |
| 152 | 152 | $this->url(self::GDTEST_BASE_URL.'location/united-states/nevada/las-vegas/'); |
| 153 | 153 | $this->waitForPageLoadAndCheckForErrors(); |
| 154 | - $this->assertTrue( $this->isTextPresent("Las Vegas"), "'Las Vegas' text not found"); |
|
| 154 | + $this->assertTrue($this->isTextPresent("Las Vegas"), "'Las Vegas' text not found"); |
|
| 155 | 155 | |
| 156 | 156 | $this->url(self::GDTEST_BASE_URL.'location/united-states/new-york/new-york/'); |
| 157 | 157 | $this->waitForPageLoadAndCheckForErrors(); |
| 158 | - $this->assertTrue( $this->isTextPresent("New York"), "'New York' text not found"); |
|
| 158 | + $this->assertTrue($this->isTextPresent("New York"), "'New York' text not found"); |
|
| 159 | 159 | } |
| 160 | 160 | |
| 161 | 161 | public function tearDown() |