Skip to content

Commit 922d628

Browse files
committed
retour MR
1 parent 3fb5c8a commit 922d628

File tree

5 files changed

+2
-28
lines changed

5 files changed

+2
-28
lines changed

composer.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sources/AppBundle/Controller/Admin/Accounting/Quotation/EditQuotationAction.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
namespace AppBundle\Controller\Admin\Accounting\Quotation;
66

77
use AppBundle\Accounting\Form\QuotationType;
8-
use AppBundle\Accounting\Model\Invoicing;
98
use AppBundle\Accounting\Model\Repository\InvoicingDetailRepository;
109
use AppBundle\Accounting\Model\Repository\InvoicingRepository;
1110
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
@@ -34,7 +33,6 @@ public function __invoke(Request $request): Response
3433
$idsToRemove = $this->invoicingDetailRepository->getRowsIdsPerInvoicingId($quotation->getId());
3534
$existingIds = [];
3635
$this->invoicingRepository->startTransaction();
37-
$this->cleanLegacyData($quotation);
3836
$this->invoicingRepository->save($quotation);
3937
foreach ($quotation->getDetails() as $detail) {
4038
if ($detail->getId() !== null) {
@@ -63,21 +61,4 @@ public function __invoke(Request $request): Response
6361
'submitLabel' => 'Modifier',
6462
]);
6563
}
66-
67-
/**
68-
* Pour simplifier la modification d'un devis créé avant ma refonte sous symfony, on supprime les lignes vides
69-
*/
70-
private function cleanLegacyData(Invoicing $quotation): void
71-
{
72-
$cleanedDetails = [];
73-
foreach ($quotation->getDetails() as $detail) {
74-
if (empty($detail->getDesignation()) && empty($detail->getQuantity()) && empty($detail->getUnitPrice()) && empty($detail->getReference())) {
75-
$this->invoicingDetailRepository->delete($detail);
76-
} else {
77-
$cleanedDetails[] = $detail;
78-
}
79-
}
80-
$quotation->setDetails($cleanedDetails);
81-
82-
}
8364
}

tests/behat/bootstrap/TimeContext.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
use Afup\Tests\Support\TimeMocker;
88
use Behat\Hook\BeforeScenario;
9-
use Behat\Mink\Driver\PantherDriver;
109
use Behat\Step\Given;
1110
use Behat\Step\Then;
1211
use DateTimeImmutable;
@@ -24,10 +23,6 @@ private function initTimeContext(): void
2423
#[BeforeScenario]
2524
public function clearTestClock(): void
2625
{
27-
if ($this->minkContext->getSession()->getDriver() instanceof PantherDriver) {
28-
// setRequestHeader is not supported by PantherDriver
29-
return;
30-
}
3126
$this->timeMocker->clearCurrentDateMock();
3227
}
3328

tests/behat/bootstrap/WaitContext.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@ public function clickLinkOfTooltipAndWaitToSee(string $tooltip, string $text, ?s
8282
$session = $this->minkContext->getSession();
8383

8484
if ($session->getDriver() instanceof \Behat\Mink\Driver\PantherDriver) {
85-
$href = $link->getAttribute('href');
86-
$session->executeScript(sprintf('window.location.href = %s;', json_encode($href)));
85+
$link->click();
8786

8887
$timeoutMs = $timeout !== null ? (int) $timeout : self::DEFAULT_TIMEOUT_MS;
8988
$this->waitForCondition(

tests/behat/features/Admin/Tresorerie/DevisFactures.feature

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ Feature: Administration - Trésorerie - Devis/Facture
5353
And I fill in "quotation[details][1][quantity]" with "1"
5454
And I fill in "quotation[details][1][unitPrice]" with "12000"
5555
When I press "Ajouter" and wait until I see "L'écriture a été ajoutée"
56-
Then I should see "L'écriture a été ajoutée"
5756
And I should see "ESN dev en folie"
5857
And I should see "Paris"
5958
And I should see "CLIENT-AFGD5S"

0 commit comments

Comments
 (0)