Commit bfb2f83f authored by Robert Lyon's avatar Robert Lyon Committed by Aaron Wells
Browse files

Fixing up behat follow nav menu functions (Bug #1465462)



Now that navigation is structured differently

Change-Id: I8f8ac1e6613a9cf4061652fa61572655377a43a7
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent ac664015
......@@ -44,10 +44,11 @@ class BehatNavigation extends BehatBase {
// Avoid problems with quotes.
$nodetextliteral = $this->escaper->escapeLiteral($menuitemtext);
$exception = new ExpectationException('The menu item "' . $menuitemtext . ' not found or invisible in "', $this->getSession());
$xpath = "//div[@id='main-nav']" .
$xpath = "//nav[@id='main-nav']" .
"/div" .
"/ul[@id='nav']" .
"/li" .
"/span/a[normalize-space(.)=" . $nodetextliteral ."]";
"/a[normalize-space(.)=" . $nodetextliteral ."]";
$node = $this->find('xpath', $xpath, $exception);
return $node;
......@@ -64,11 +65,12 @@ class BehatNavigation extends BehatBase {
// Avoid problems with quotes.
$nodetextliteral = $this->escaper->escapeLiteral($menuitemtext);
$exception = new ExpectationException('The menu item "' . $menuitemtext . ' not found or invisible in "', $this->getSession());
$exception = new ExpectationException('The sub menu item "' . $menuitemtext . ' not found or invisible in "', $this->getSession());
$xpath = "//div[@id='sub-nav']" .
"/div" .
"/ul" .
"/li" .
"/span/a[normalize-space(.)=" . $nodetextliteral ."]";
"/a[normalize-space(.)=" . $nodetextliteral ."]";
$node = $this->find('xpath', $xpath, $exception);
return $node;
......
......@@ -95,7 +95,7 @@
{if $SELECTEDSUBNAV}
<div class="navbar navbar-default minor-nav hidden-xs">
<div id="sub-nav" class="navbar navbar-default minor-nav hidden-xs">
<div class="container">
<ul class="nav navbar-nav">
{strip}
......
Markdown is supported
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