mirror of
https://github.com/salesagility/SuiteCRM.git
synced 2025-02-06 23:10:03 +00:00
![Connor Shea](/assets/img/avatar_default.png)
This adds a bunch of waitForElementVisible, waitForText, etc. where necessary and will theoretically make the test suite more consistent between machines of different speeds. The wait time in the travis codeception env causes problems if you run the test suite on a slower machine because it causes tests that assume they have x number of seconds to wait for an expectation (like `I->see`, or `I->click`), when that amount of time can vary depending on the machine. Instead of increasing the wait value for slower machines, I'd prefer to keep it consistent across machines so we can run CI anywhere without needing to configure as much. This commit moves the waiting from the codeception env to being in the tests explicitly. Could also speed up the test suite.
37 lines
826 B
PHP
37 lines
826 B
PHP
<?php
|
|
|
|
namespace Step\Acceptance;
|
|
|
|
use \AcceptanceTester as Tester;
|
|
|
|
class DetailView extends Tester
|
|
{
|
|
|
|
/**
|
|
* Click on the action menu and select a menu item
|
|
* @param string $link
|
|
* <?php
|
|
* $detailView = new \Page\DetailView($i);
|
|
* $detailView->clickActionMenuItem('Edit');
|
|
*
|
|
*/
|
|
public function clickActionMenuItem($link)
|
|
{
|
|
$I = $this;
|
|
|
|
$I->waitForElementVisible('#tab-actions');
|
|
$I->click('ACTIONS', '#tab-actions');
|
|
$I->waitForElementVisible('#tab-actions > .dropdown-menu');
|
|
|
|
$I->click($link, '#tab-actions > .dropdown-menu');
|
|
}
|
|
|
|
/**
|
|
* Wait for for the detail view to become visible
|
|
*/
|
|
public function waitForDetailViewVisible()
|
|
{
|
|
$I = $this;
|
|
$I->waitForElementVisible('.detail-view');
|
|
}
|
|
}
|