Kernel::Test::Role::ProvidesTestData::AdminLogin

NAME

Kernel::Test::Role::ProvidesTestData::AdminLogin – Role for Tests with valid Admin Login

DESCRIPTION

Kernel::Test::Role::ProvidesTestData::AdminLogin – performs an Admin Login and exposes the resulting Admin Session Cookie over the AdminCookie Attribute.

It requires a successful Agent Login to perform an Admin Login with the AgentLogin User.

To perform the System Login it requires a Test::Mojo Object as MojoApp Attribute. So, it always needs to be applied in combination with a Role that provides this Attribute.

When the System Login fails the Test Sequence will be aborted.

ATTRIBUTES

requires 'MojoApp'

Requires an attribute MojoApp or method which must yield a Test::Mojo object such as the Kernel::Test::Role::IsTestCase::Endpoint Role.

has 'AdminCookie'

Provides the Admin Authentication Cookie set with the Login.

METHODS

around 'SkipTest'

Perfoms the Login and aborts the Test when the Login has failed

Scroll to Top