/** * Test for User tab navigation */ public function testUserTab() { $login = new Login($this); $login->setUsername(PHPUNIT_TESTSUITE_EXTENSION_SELENIUM_LOGIN)->setPassword(PHPUNIT_TESTSUITE_EXTENSION_SELENIUM_PASS)->submit()->openNavigation()->tab('System')->menu('Users Management')->menu('Users')->open()->assertElementPresent("//table[@class='grid table-hover table table-bordered table-condensed']/tbody"); $login->openNavigation()->tab('System')->menu('Users Management')->menu('Roles')->open()->assertElementPresent("//table[@class='grid table-hover table table-bordered table-condensed']/tbody"); $login->openNavigation()->tab('System')->menu('Users Management')->menu('Groups')->open()->assertElementPresent("//table[@class='grid table-hover table table-bordered table-condensed']/tbody"); }
/** * Tests that checks advanced search * * @dataProvider columnTitle */ public function testAdvancedSearch($query, $userField) { $login = new Login($this); $login->setUsername(PHPUNIT_TESTSUITE_EXTENSION_SELENIUM_LOGIN)->setPassword(PHPUNIT_TESTSUITE_EXTENSION_SELENIUM_PASS)->submit()->openUsers(); $users = new Users($this); $userData = $users->getRandomEntity(); $login->openNavigation(array('url' => '/search/advanced-search-page')); //Fill advanced search input field $login->byId('query')->value($query . $userData[$userField]); $login->byId('sendButton')->click(); $login->waitPageToLoad(); $login->waitForAjax(); //Check that result is not null $result = strtolower($userData['USERNAME']); $login->assertElementPresent("//div[@class='container-fluid']" . "//div[@class='search_stats alert alert-info']//h3[contains(., '{$result}')]", 'Search results does not found'); }