Skip to content

Commit 257149a

Browse files
committed
PR feedback
1 parent 06bf3da commit 257149a

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ services:
5656
APP_ENV: "test"
5757
HOST_PWD: ${PWD}
5858
SYMFONY_IDE: "%env(IDE_USED)%://open?url=file://%%f&line=%%l&/var/www/html/>%env(HOST_PWD)%/"
59+
PANTHER_NO_SANDBOX: 1
60+
PANTHER_CHROME_ARGUMENTS: '--disable-dev-shm-usage --disable-features=IsolateOrigins,site-per-process,TrackingProtection3pcd'
5961
env_file:
6062
.env
6163
volumes:

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
@@ -11,6 +11,7 @@
1111
use Behat\Hook\BeforeScenario;
1212
use Behat\Mink\Driver\PantherDriver;
1313
use Behat\Mink\Exception\ExpectationException;
14+
use Behat\Mink\Exception\UnsupportedDriverActionException;
1415
use Behat\MinkExtension\Context\MinkContext;
1516
use Behat\Step\Then;
1617
use Behat\Step\When;
@@ -219,6 +220,9 @@ public function theCurrentDateIs(string $date): void
219220
#[Then('/^(?:|I )click on link with (class|id) "(?P<text>(?:[^"]|\\")*)"$/')]
220221
public function clickOnLink(string $type, string $text): void
221222
{
223+
if (!$this->minkContext->getSession()->getDriver() instanceof PantherDriver) {
224+
throw new UnsupportedDriverActionException('javascript is not supported by driver %s', $this->minkContext->getSession()->getDriver());
225+
}
222226
$selector = match ($type) {
223227
'class' => 'a.' . $text,
224228
'id' => 'a#' . $text,
@@ -244,7 +248,10 @@ public function openMenu(string $text): void
244248
#[Then('/^wait (?P<value>(?:[0-9])*)(ms|s)$/')]
245249
public function wait(string $text, string $unit): void
246250
{
251+
echo time();
247252
$value = intval($text) * (strtolower($unit) === 'ms' ? 1 : 1000);
253+
dump($value);
248254
\usleep($value);
255+
echo time();
249256
}
250257
}

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)