mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Test all invoice designs
This commit is contained in:
parent
49da93f318
commit
24997c9382
@ -166,7 +166,7 @@ class CheckData extends Command
|
||||
//$this->logMessage('Result: ' . $result);
|
||||
|
||||
if ($result && $result != $invoice->balance) {
|
||||
$this->logMessage("PHP/JS amounts do not match {$link} - PHP: {$invoice->balance}, JS: {$result}");
|
||||
$this->logMessage("PHP/JS amounts do not match {$link}?silent=true | PHP: {$invoice->balance}, JS: {$result}");
|
||||
$this->isValid = $isValid = false;
|
||||
}
|
||||
}
|
||||
|
@ -110,6 +110,14 @@
|
||||
try {
|
||||
return getPDFString(refreshPDFCB, force);
|
||||
} catch (exception) {
|
||||
@if (Utils::isTravis())
|
||||
var message = exception.message || '';
|
||||
if (message.indexOf('Attempting to change value of a readonly property') >= 0) {
|
||||
// do nothing
|
||||
} else {
|
||||
throw exception;
|
||||
}
|
||||
@else
|
||||
console.warn('Failed to generate PDF: %s', exception.message);
|
||||
var href = location.href;
|
||||
if (href.indexOf('/view/') > 0 && href.indexOf('phantomjs') == -1) {
|
||||
@ -120,6 +128,7 @@
|
||||
}
|
||||
})
|
||||
}
|
||||
@endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -54,10 +54,20 @@ class InvoiceCest
|
||||
$I->see($invoiceNumber);
|
||||
$I->see('199.01');
|
||||
|
||||
for ($i=1; $i<=10; $i++) {
|
||||
$this->updateDesign($I, $i);
|
||||
}
|
||||
|
||||
$I->amOnPage("/clients/{$clientId}#invoices");
|
||||
$I->see('199.01');
|
||||
}
|
||||
|
||||
private function updateDesign($I, $designId)
|
||||
{
|
||||
$I->selectOption('#invoice_design_id', $designId);
|
||||
$I->click('#saveButton');
|
||||
}
|
||||
|
||||
/*
|
||||
public function editInvoice(AcceptanceTester $I)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user