mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Working on tests
This commit is contained in:
parent
902cb2a5dc
commit
8bc6b026be
@ -55,7 +55,7 @@ class CheckBalanceCest
|
|||||||
// update the invoice
|
// update the invoice
|
||||||
$I->amOnPage('/invoices/' . $invoiceId);
|
$I->amOnPage('/invoices/' . $invoiceId);
|
||||||
$I->fillField(['name' => 'invoice_items[0][qty]'], 2);
|
$I->fillField(['name' => 'invoice_items[0][qty]'], 2);
|
||||||
$I->click('Save');
|
$I->click('Save Invoice');
|
||||||
$I->wait(1);
|
$I->wait(1);
|
||||||
$I->amOnPage("/clients/{$clientId}");
|
$I->amOnPage("/clients/{$clientId}");
|
||||||
$I->see('Balance $' . ($productPrice * 2));
|
$I->see('Balance $' . ($productPrice * 2));
|
||||||
|
@ -18,14 +18,25 @@ class TaskCest
|
|||||||
|
|
||||||
public function createTimerTask(AcceptanceTester $I)
|
public function createTimerTask(AcceptanceTester $I)
|
||||||
{
|
{
|
||||||
$description = $this->faker->text(100);
|
$clientName = $this->faker->name;
|
||||||
|
$clientEmail = $this->faker->safeEmail;
|
||||||
$project = $this->faker->text(20);
|
$project = $this->faker->text(20);
|
||||||
|
$description = $this->faker->text(100);
|
||||||
|
|
||||||
$I->wantTo('create a timed task');
|
$I->wantTo('create a timed task');
|
||||||
|
|
||||||
|
// create client
|
||||||
|
$I->amOnPage('/clients/create');
|
||||||
|
$I->fillField(['name' => 'name'], $clientName);
|
||||||
|
$I->fillField(['name' => 'contacts[0][email]'], $clientEmail);
|
||||||
|
$I->click('Save');
|
||||||
|
$I->see($clientEmail);
|
||||||
|
$clientId = $I->grabFromDatabase('clients', 'id', ['name' => $clientName]);
|
||||||
|
|
||||||
$I->amOnPage('/tasks/create');
|
$I->amOnPage('/tasks/create');
|
||||||
$I->seeCurrentUrlEquals('/tasks/create');
|
$I->seeCurrentUrlEquals('/tasks/create');
|
||||||
|
|
||||||
$I->selectDropdown($I, 'Wilford Borer', '.client-select .dropdown-toggle');
|
$I->selectDropdown($I, $clientName, '.client-select .dropdown-toggle');
|
||||||
$I->selectDropdownCreate($I, 'project', $project);
|
$I->selectDropdownCreate($I, 'project', $project);
|
||||||
$I->fillField('#description', $description);
|
$I->fillField('#description', $description);
|
||||||
|
|
||||||
@ -34,7 +45,10 @@ class TaskCest
|
|||||||
$I->click('Stop');
|
$I->click('Stop');
|
||||||
$I->click('Save');
|
$I->click('Save');
|
||||||
|
|
||||||
$I->seeInDatabase('tasks', ['description' => $description]);
|
$I->seeInDatabase('tasks', [
|
||||||
|
'description' => $description,
|
||||||
|
'client_id' => $clientId,
|
||||||
|
]);
|
||||||
$I->seeInDatabase('projects', ['name' => $project]);
|
$I->seeInDatabase('projects', ['name' => $project]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ class TaxRatesCest
|
|||||||
|
|
||||||
// check total is right before saving
|
// check total is right before saving
|
||||||
$I->see("\${$total}");
|
$I->see("\${$total}");
|
||||||
$I->click('Save');
|
$I->click('Save Draft');
|
||||||
$I->wait(3);
|
$I->wait(3);
|
||||||
$I->see($clientEmail);
|
$I->see($clientEmail);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user