Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
behat_message Class Reference
Inheritance diagram for behat_message:
behat_base behat_session_interface

Public Member Functions

 getSession ($name=null)
 Returns the Mink session. More...
 
 i_go_back_in_message_drawer ($parentelement)
 Navigate back in the messages ui drawer. More...
 
 i_open_contact_menu ()
 Open the contact menu. More...
 
 i_open_messaging ()
 Open the messaging UI. More...
 
 i_open_messaging_information ()
 Open the messaging UI. More...
 
 i_open_messaging_settings_preferences ()
 Open the settings preferences. More...
 
 i_open_the_conversations_list (string $tab)
 Open the messaging conversation list. More...
 
 i_search_for_string_in_messaging ($string)
 Search for a string using the messaging search. More...
 
 i_select_conversation_in_messaging ($conversationname)
 Select a user in the messaging UI. More...
 
 i_select_conversation_in_the_conversations_list (string $convname, string $listname)
 Select a user in a specific messaging UI conversations list. More...
 
 i_select_user_in_messaging ($userfullname)
 Select a user in the messaging UI. More...
 
 i_send_message_in_the_message_area ($messagecontent)
 Select messages from a user in the messaging ui. More...
 
 i_send_message_to_user ($messagecontent, $userfullname)
 Sends a message to the specified user from the logged user. More...
 
 i_view_contact_in_messages ($userfullname)
 View the contact information of a user in the messages ui. More...
 

Static Public Member Functions

static get_named_replacements ()
 Return a list of the Mink named replacements for the component. More...
 
static get_partial_named_selectors ()
 Return the list of partial named selectors. More...
 

Public Attributes

const EXTENDED_TIMEOUT = 10
 And extended timeout for specific cases. More...
 
const PAGE_READY_JS
 The JS code to check that the page is ready. More...
 
const REDUCED_TIMEOUT = 2
 Small timeout. More...
 
const TIMEOUT = 6
 The timeout for each Behat step (load page, wait for an element to load...). More...
 

Member Function Documentation

◆ get_named_replacements()

static behat_message::get_named_replacements ( )
static

Return a list of the Mink named replacements for the component.

Named replacements allow you to define parts of an xpath that can be reused multiple times, or in multiple xpaths.

This method should return a list of behat_component_named_replacement and the docs on that class explain how it works.

Return values
behat_component_named_replacement[]

◆ get_partial_named_selectors()

static behat_message::get_partial_named_selectors ( )
static

Return the list of partial named selectors.

Return values
array

◆ getSession()

behat_session_interface::getSession (   $name = null)
inherited

Returns the Mink session.

Parameters
string | null$namename of the session OR active session will be used
Return values
Behat::Mink::Session

Implemented in behat_form_field.

◆ i_go_back_in_message_drawer()

behat_message::i_go_back_in_message_drawer (   $parentelement)

Navigate back in the messages ui drawer.

@Given /^I go back in "(?P<parent_element_string>(?:[^"]|::")*)" message drawer$/

Parameters
string$parentelement

◆ i_open_contact_menu()

behat_message::i_open_contact_menu ( )

Open the contact menu.

@Given /^I open contact menu$/

◆ i_open_messaging()

behat_message::i_open_messaging ( )

Open the messaging UI.

@Given /^I open messaging$/

◆ i_open_messaging_information()

behat_message::i_open_messaging_information ( )

Open the messaging UI.

@Given /^I open messaging information$/

◆ i_open_messaging_settings_preferences()

behat_message::i_open_messaging_settings_preferences ( )

Open the settings preferences.

@Given /^I open messaging settings preferences$/

◆ i_open_the_conversations_list()

behat_message::i_open_the_conversations_list ( string  $tab)

Open the messaging conversation list.

@Given /^I open the "(?P<tab_string>(?:[^"]|::")*)" conversations list/

Parameters
string$tab

◆ i_search_for_string_in_messaging()

behat_message::i_search_for_string_in_messaging (   $string)

Search for a string using the messaging search.

@Given /^I search for "(?P<string>(?:[^"]|::")*)" in messaging$/

Parameters
string$stringthe search string.

◆ i_select_conversation_in_messaging()

behat_message::i_select_conversation_in_messaging (   $conversationname)

Select a user in the messaging UI.

@Given /^I select "(?P<conversation_name_string>(?:[^"]|::")*)" conversation in messaging$/

Parameters
string$conversationname

◆ i_select_conversation_in_the_conversations_list()

behat_message::i_select_conversation_in_the_conversations_list ( string  $convname,
string  $listname 
)

Select a user in a specific messaging UI conversations list.

@Given /^I select "(?P<conv_name_string>(?:[^"]|::")*)" conversation in the "(?P<list_name_string>(?:[^"]|")*)" conversations list$/

Parameters
string$convname
string$listname

◆ i_select_user_in_messaging()

behat_message::i_select_user_in_messaging (   $userfullname)

Select a user in the messaging UI.

@Given /^I select "(?P<user_full_name_string>(?:[^"]|::")*)" user in messaging$/

Parameters
string$userfullname

◆ i_send_message_in_the_message_area()

behat_message::i_send_message_in_the_message_area (   $messagecontent)

Select messages from a user in the messaging ui.

@Given /^I send "(?P<message_contents_string>(?:[^"]|::")*)" message in the message area$/

Parameters
string$messagecontent

◆ i_send_message_to_user()

behat_message::i_send_message_to_user (   $messagecontent,
  $userfullname 
)

Sends a message to the specified user from the logged user.

The user full name should contain the first and last names.

@Given /^I send "(?P<message_contents_string>(?:[^"]|::")*)" message to "(?P<user_full_name_string>(?:[^"]|")*)" user$/

Parameters
string$messagecontent
string$userfullname

◆ i_view_contact_in_messages()

behat_message::i_view_contact_in_messages (   $userfullname)

View the contact information of a user in the messages ui.

@Given /^I view the "(?P<user_full_name_string>(?:[^"]|::")*)" contact in the message area$/

Parameters
string$userfullname

Member Data Documentation

◆ EXTENDED_TIMEOUT

const behat_session_interface::EXTENDED_TIMEOUT = 10
inherited

And extended timeout for specific cases.

Deprecated:
since Moodle 3.7 MDL-64979 - please use get_extended_timeout() instead
Todo:
MDL-64982 This will be deleted in Moodle 3.11
See also
behat_base::get_extended_timeout()

◆ PAGE_READY_JS

const behat_session_interface::PAGE_READY_JS
inherited
Initial value:
= "document.readyState === 'complete' && " .
"(typeof M !== 'object' || typeof M.util !== 'object' || " .
"typeof M.util.pending_js === 'undefined' || M.util.pending_js.length === 0)"

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.

◆ REDUCED_TIMEOUT

const behat_session_interface::REDUCED_TIMEOUT = 2
inherited

Small timeout.

A reduced timeout for cases where self::TIMEOUT is too much and a simple $this->getSession()->getPage()->find() could not be enough.

Deprecated:
since Moodle 3.7 MDL-64979 - please use get_reduced_timeout() instead
Todo:
MDL-64982 This will be deleted in Moodle 3.11
See also
behat_base::get_reduced_timeout()

◆ TIMEOUT

const behat_session_interface::TIMEOUT = 6
inherited

The timeout for each Behat step (load page, wait for an element to load...).

Deprecated:
since Moodle 3.7 MDL-64979 - please use get_timeout() instead
Todo:
MDL-64982 This will be deleted in Moodle 3.11
See also
behat_base::get_timeout()

The documentation for this class was generated from the following file: