Skip to content

Commit

Permalink
Add test.
Browse files Browse the repository at this point in the history
  • Loading branch information
demiankatz committed Jan 8, 2025
1 parent 370da93 commit 62a8a14
Showing 1 changed file with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,30 @@ public function testCombinedSearchResultsMixedAjax(): void
$this->assertResultsForDefaultQuery($page);
}

/**
* Test that the jump menu can be enabled.
*
* @return void
*/
public function testJumpMenu(): void
{
$config = $this->getCombinedIniOverrides();
$config['Solr:one']['ajax'] = true; // use mixed AJAX mode for more thorough test
$config['Layout']['jump_links'] = true;
$this->changeConfigs(
['combined' => $config],
['combined']
);
$page = $this->performCombinedSearch('id:"testsample1" OR id:"theplus+andtheminus-"');
$expectedContent = 'Jump to Results: Solr One (1) Solr Two (1)';
$getText = "document.getElementsByClassName('combined-jump-links')[0].textContent.replace(/\s+/g, ' ').trim()";
$this->waitStatement("$getText === '$expectedContent'");
$this->assertEquals(
$expectedContent,
$this->findCssAndGetText($page, '.combined-jump-links')
);
}

/**
* Test that DOI results work in various AJAX/non-AJAX modes.
*
Expand Down

0 comments on commit 62a8a14

Please sign in to comment.