Skip to content
Snippets Groups Projects
Commit 0e95bbe2 authored by Demian Katz's avatar Demian Katz
Browse files

Add test for visualization feature.

parent 8b6c7b82
No related merge requests found
<?php
/**
* Mink test class for visualization view.
*
* PHP version 5
*
* Copyright (C) Villanova University 2017.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* @category VuFind
* @package Tests
* @author Demian Katz <demian.katz@villanova.edu>
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
* @link https://vufind.org Main Page
*/
namespace VuFindTest\Mink;
use Behat\Mink\Element\Element;
/**
* Mink test class for visualization view.
*
* @category VuFind
* @package Tests
* @author Demian Katz <demian.katz@villanova.edu>
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
* @link https://vufind.org Main Page
*/
class VisualizationTest extends \VuFindTest\Unit\MinkTestCase
{
/**
* Test that combined results work in mixed AJAX/non-AJAX mode.
*
* @return void
*/
public function testVisualization()
{
$this->changeConfigs(
[
'searches' => [
'General' => [
'default_top_recommend' => ['VisualFacets'],
],
'Views' => ['list' => 'List', 'visual' => 'Visual'],
]
]
);
$session = $this->getMinkSession();
$session->visit(
$this->getVuFindUrl()
. '/Search/Results?filter[]=building%3A"journals.mrc"&view=visual'
);
$page = $session->getPage();
$this->snooze();
$text = $this->findCss($page, '#visualResults')->getText();
// Confirm that some content has been dynamically loaded into the
// visualization area:
$this->assertContains('A - General Works', $text);
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment