-
Notifications
You must be signed in to change notification settings - Fork 4
Description
For some verifications, we need to move to a different state than the one we ended up in after the execution of the action. For example in WhatsApp, creating a group ends up in the initial state. Verifying the users of a group after creating that group is done from the group chat settings state.
Add an annotation similar to the @action annotation for verification methods. It should also contain a single argument state, which is the state from which the verification should begin.
Like actions, the framework should do the navigation to said state before calling the verification method.
For example:
@verification(chat_settings_state)
def group_exists(self, conversation: str, members: Union[str, List[str]]):
# we are now in the settings of the expected chat/group, start verifying
....
This also allows for independently executing verifications, meaning you can manually call phone.is_message_marked_read('message', conversation='Bob') and it will automatically navigate to the chat before verifying.
The name of the annotation has not been discussed yet, so open for change.