Skip to content

Commit eef10b5

Browse files
committed
PR feedback
1 parent 84cb88c commit eef10b5

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ public function __invoke(Request $request): Response
4242
$existingIds[] = $detail->getId();
4343
}
4444
$detail->setInvoicingId($quotation->getId());
45-
$this->unitOfWork->pushSave($detail);
46-
// $this->invoicingDetailRepository->save($detail);
45+
// $this->unitOfWork->pushSave($detail);
46+
$this->invoicingDetailRepository->save($detail);
4747
}
4848

4949
$idsToRemove = array_diff($idsToRemove, $existingIds);

tests/behat/bootstrap/FeatureContext.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use Behat\Hook\BeforeScenario;
1313
use Behat\Mink\Driver\PantherDriver;
1414
use Behat\Mink\Exception\ExpectationException;
15+
use Behat\Mink\Exception\UnsupportedDriverActionException;
1516
use Behat\MinkExtension\Context\MinkContext;
1617
use Behat\Step\Given;
1718
use Behat\Step\Then;
@@ -718,6 +719,9 @@ public function theCurrentDateIs(string $date): void
718719
#[Then('/^(?:|I )click on link with (class|id) "(?P<text>(?:[^"]|\\")*)"$/')]
719720
public function clickOnLink(string $type, string $text): void
720721
{
722+
if (!$this->minkContext->getSession()->getDriver() instanceof PantherDriver) {
723+
throw new UnsupportedDriverActionException('javascript is not supported by driver %s', $this->minkContext->getSession()->getDriver());
724+
}
721725
$selector = match ($type) {
722726
'class' => 'a.' . $text,
723727
'id' => 'a#' . $text,
@@ -743,7 +747,10 @@ public function openMenu(string $text): void
743747
#[Then('/^wait (?P<value>(?:[0-9])*)(ms|s)$/')]
744748
public function wait(string $text, string $unit): void
745749
{
750+
echo time();
746751
$value = intval($text) * (strtolower($unit) === 'ms' ? 1 : 1000);
752+
dump($value);
747753
\usleep($value);
754+
echo time();
748755
}
749756
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Feature: Administration - Trésorerie - Devis/Facture
1717
And I fill in "quotation[zipcode]" with "21000"
1818
And I fill in "quotation[email]" with "martine@ens-corp.biz"
1919
When I press "Ajouter"
20-
And wait 2s
20+
# And wait 2s
2121
Then I should see "L'écriture a été ajoutée"
2222
And I should see "ESN Corp"
2323
And I should see "0,00"
@@ -52,7 +52,7 @@ Feature: Administration - Trésorerie - Devis/Facture
5252
And I fill in "quotation[details][1][quantity]" with "1"
5353
And I fill in "quotation[details][1][unitPrice]" with "12000"
5454
When I press "Ajouter"
55-
And wait 2s
55+
# And wait 2s
5656
Then I should see "L'écriture a été ajoutée"
5757
And I should see "ESN dev en folie"
5858
And I should see "Paris"
@@ -66,7 +66,7 @@ Feature: Administration - Trésorerie - Devis/Facture
6666
When I follow the button of tooltip "Modifier le devis ESN dev en folie"
6767
And I fill in "quotation[city]" with "Paris Cedex 1"
6868
When I press "Modifier"
69-
And wait 3s
69+
# And wait 3s
7070
Then I should see "L'écriture a été modifiée"
7171
And I should see "ESN dev en folie"
7272
And I should see "Paris Cedex 1"

0 commit comments

Comments
 (0)