MDL-70196 behat: Add a new step for navigating with the navbar.

- Part of: MDL-69588
A lot of tests work on the basis that you can follow the last item
of the breadcrumb nav bar. This is not the case. This step will first
check to see if the page is already the one requested. If it is then
nothing further needs to happen, otherwise we follow the link in the
navbar.
This commit is contained in:
Adrian Greeve
2021-08-23 17:46:38 +08:00
committed by Mathew May
parent c8422f4576
commit f28535082c
8 changed files with 30 additions and 14 deletions
@@ -87,7 +87,7 @@ class behat_workshopallocation_manual extends behat_base {
* @param TableNode $table should have one column with title 'Reviewer' and another with title 'Participant' (or 'Reviewee')
*/
public function i_allocate_submissions_in_workshop_as($workshopname, TableNode $table) {
$this->execute("behat_general::i_click_on_in_the", [$this->escape($workshopname), 'link', 'page', 'region']);
$this->execute("behat_navigation::go_to_breadcrumb_location", $workshopname);
$this->execute('behat_navigation::i_navigate_to_in_current_page_administration', get_string('allocate', 'workshop'));
$rows = $table->getRows();
$reviewer = $participant = null;