. /** * The Interface for a behat root context. * * @package core * @category test * @copyright 2020 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ /** * The Interface for a behat root context. * * This interface should be implemented by the behat_base context, and behat form fields, and it should be paired with * the behat_session_trait. * * It should not be necessary to implement this interface, and the behat_session_trait trait in normal circumstances. * * @package core * @category test * @copyright 2020 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ interface behat_session_interface { /** * The JS code to check that the page is ready. * * The document must be complete and either M.util.pending_js must be empty, or it must not be defined at all. */ const PAGE_READY_JS = "document.readyState === 'complete' && " . "(typeof M !== 'object' || typeof M.util !== 'object' || " . "typeof M.util.pending_js === 'undefined' || M.util.pending_js.length === 0)"; /** * Returns the Mink session. * * @param string|null $name name of the session OR active session will be used * @return \Behat\Mink\Session */ public function getSession($name = null); }