MDL-64819 output: Activity menu icons

Remove duplicate alt text from activity menu icons and the links to add new sections.
This commit is contained in:
Damyon Wiese 2019-02-11 09:34:18 +08:00 committed by Sara Arjona
parent f9e436a2b6
commit cce54c4732
6 changed files with 39 additions and 51 deletions

View file

@ -306,7 +306,7 @@ class behat_course extends behat_base {
// Click on highlight topic link.
$this->execute('behat_general::i_click_on_in_the',
array(get_string('markthistopic'), "link", $this->escape($xpath), "xpath_element")
array(get_string('highlight'), "link", $this->escape($xpath), "xpath_element")
);
}
@ -328,7 +328,7 @@ class behat_course extends behat_base {
// Click on un-highlight topic link.
$this->execute('behat_general::i_click_on_in_the',
array(get_string('markedthistopic'), "link", $this->escape($xpath), "xpath_element")
array(get_string('highlightoff'), "link", $this->escape($xpath), "xpath_element")
);
}
@ -446,7 +446,7 @@ class behat_course extends behat_base {
$xpath = $this->section_exists($sectionnumber);
// The important checking, we can not check the img.
$this->execute('behat_general::should_exist_in_the', ['This topic is highlighted as the current topic', 'icon', $xpath, 'xpath_element']);
$this->execute('behat_general::should_exist_in_the', ['Remove highlight', 'link', $xpath, 'xpath_element']);
}
/**
@ -1186,9 +1186,9 @@ class behat_course extends behat_base {
// Checking the show button alt text and show icon.
$showtext = get_string('showfromothers', $courseformat);
$linkxpath = $xpath . "/descendant::a[@title=" . behat_context_helper::escape($showtext) . "]";
$linkxpath = $xpath . "//a[*[contains(text(), " . behat_context_helper::escape($showtext) . ")]]";
$exception = new ElementNotFoundException($this->getSession(), 'Show section link ');
$exception = new ElementNotFoundException($this->getSession(), 'Show section link');
// Returing the link so both Non-JS and JS browsers can interact with it.
return $this->find('xpath', $linkxpath, $exception);