LoginContext
class LoginContext implements Context (View source)
LoginContext
Context used to define steps related to login and logout functionality
Traits
Represents a behat context which is aware of a main {SilverStripeContext} context.
Properties
protected | SilverStripeContext | $mainContext | from MainContextAwareTrait |
Methods
Creates a member in a group with the correct permissions.
Creates and login as a member of a group with the correct permissions.
Get or generate a member with the given permission code
Get or generate a group with the given permission code
Get or generate a member with the given permission code and permission group
Details
SilverStripeContext
getMainContext()
Get the main context
$this
setMainContext(SilverStripeContext $mainContext)
No description
detectMainContext(BeforeScenarioScope $scope)
Helper method to detect the main context
stepIAmLoggedIn()
No description
iAmLoggedInWithPermissions(string $permCode)
Creates a member in a group with the correct permissions.
Example: Given I am logged in with "ADMIN" permissions
iAmLoggedInAsMemberOfGroup(string $groupName)
Creates and login as a member of a group with the correct permissions.
Example: Given I am logged in as a member of "ADMIN" group
stepIAmNotLoggedIn()
No description
stepILogInWith(string $email, string $password)
No description
stepILogInWithWithoutSkippingMfa(string $email, string $password)
No description
stepIShouldSeeALogInForm()
No description
stepIShouldSeeALogOutForm()
No description
stepIWillSeeALogInMessage(string $type)
No description
stepPasswordForEmailShouldBe(string $id, string $password)
No description
protected Member
generateMemberWithPermission(string $email, string $password, string $permCode)
Get or generate a member with the given permission code
protected Member
generateGroupWithPermission(string $permCode)
Get or generate a group with the given permission code
protected Member
generateMember(string $email, string $password, object $group, string $identifier)
Get or generate a member with the given permission code and permission group