MDL-49412 behat: I am on site homepage behat step
authorAnkit Agarwal <ankit@moodle.com>
Mon, 30 Mar 2015 06:55:50 +0000 (12:25 +0530)
committerAdrian Greeve <adrian@moodle.com>
Fri, 10 Apr 2015 09:18:22 +0000 (17:18 +0800)
Part of MDL-45774.

lib/tests/behat/behat_general.php

index b12eb48..e467d45 100644 (file)
@@ -78,6 +78,15 @@ class behat_general extends behat_base {
         $this->getSession()->visit($this->locate_path('/'));
     }
 
+    /**
+     * Opens Moodle site homepage.
+     *
+     * @Given /^I am on site homepage$/
+     */
+    public function i_am_on_site_homepage() {
+        $this->getSession()->visit($this->locate_path('/?redirect=0'));
+    }
+
     /**
      * Reloads the current page.
      *