Admin Navigator Basics
Admin Menu Navigator
The AdminMenu
navigator is virtually identical to the BaseMenu
navigator. In fact, the only difference is in the constructor where it defines the Admin\ThemeConfiguration
object as a dependency instead of ThemeConfiguration
.
Retrieving an instance of AdminMenu
can be done by requesting it from the getNavigator()
method, passing in AdminMenu
as a parameter.
class AdminMenuNavigatorTest extends AbstractMagentoTestCase
{
public function testAdminMenuNavigation()
{
$this->getAction('Admin\Login\Login')->login(); // Remember to set the test username and password via an identity
$this->getNavigator('Admin\AdminMenuNavigator')->navigateTo('Sales/Orders');
$this->assertPageHasText('Select Visible');
}
}