|
@@ 243-251 (lines=9) @@
|
| 240 |
|
$this->assertExactHTMLMatchBySelector('div.contentForEmptySearch', array()); |
| 241 |
|
} |
| 242 |
|
|
| 243 |
|
public function testQueryInSearchBoxForOneFormOnly() { |
| 244 |
|
$searchPageObj = $this->ElasticSearchPage2; |
| 245 |
|
$url = rtrim($searchPageObj->Link(), '/'); |
| 246 |
|
$url .= "?q=Auckland&sfid=" . $searchPageObj->Identifier; |
| 247 |
|
$response = $this->get($url); |
| 248 |
|
$this->assertEquals(200, $response->getStatusCode()); |
| 249 |
|
$this->assertAttributeHasExactValue('#ElasticSearchForm_SearchForm_q', 'q', |
| 250 |
|
'Auckland'); |
| 251 |
|
} |
| 252 |
|
|
| 253 |
|
|
| 254 |
|
/* |
|
@@ 318-327 (lines=10) @@
|
| 315 |
|
} |
| 316 |
|
|
| 317 |
|
|
| 318 |
|
public function testSimilarNotSearchable() { |
| 319 |
|
$searchPageObj = $this->ElasticSearchPage2; |
| 320 |
|
$url = rtrim($searchPageObj->Link(), '/'); |
| 321 |
|
$url .= "/similar/Member/1"; |
| 322 |
|
$response = $this->get($url); |
| 323 |
|
$this->assertEquals(200, $response->getStatusCode()); |
| 324 |
|
|
| 325 |
|
$this->assertSelectorStartsWithOrEquals('div.error', 0, |
| 326 |
|
'Class Member is either not found or not searchable'); |
| 327 |
|
} |
| 328 |
|
|
| 329 |
|
|
| 330 |
|
public function testSimilarNull() { |
|
@@ 330-339 (lines=10) @@
|
| 327 |
|
} |
| 328 |
|
|
| 329 |
|
|
| 330 |
|
public function testSimilarNull() { |
| 331 |
|
$searchPageObj = $this->ElasticSearchPage2; |
| 332 |
|
$url = rtrim($searchPageObj->Link(), '/'); |
| 333 |
|
$url .= "/similar/Member/0"; |
| 334 |
|
$response = $this->get($url); |
| 335 |
|
$this->assertEquals(200, $response->getStatusCode()); |
| 336 |
|
|
| 337 |
|
$this->assertSelectorStartsWithOrEquals('div.error', 0, |
| 338 |
|
'Class Member is either not found or not searchable'); |
| 339 |
|
} |
| 340 |
|
|
| 341 |
|
|
| 342 |
|
public function testSimilarClassDoesNotExist() { |
|
@@ 342-350 (lines=9) @@
|
| 339 |
|
} |
| 340 |
|
|
| 341 |
|
|
| 342 |
|
public function testSimilarClassDoesNotExist() { |
| 343 |
|
$searchPageObj = $this->ElasticSearchPage2; |
| 344 |
|
$url = rtrim($searchPageObj->Link(), '/'); |
| 345 |
|
$url .= "/similar/asdfsadfsfd/4"; |
| 346 |
|
$response = $this->get($url); |
| 347 |
|
$this->assertEquals(200, $response->getStatusCode()); |
| 348 |
|
$this->assertSelectorStartsWithOrEquals('div.error', 0, |
| 349 |
|
'Class asdfsadfsfd is either not found or not searchable'); |
| 350 |
|
} |
| 351 |
|
|
| 352 |
|
|
| 353 |
|
public function testSimilarSearchServerDown() { |