-
Notifications
You must be signed in to change notification settings - Fork 70
Refonte Trésorie > Devis - Ajout / Edition #2016
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
resolves #2002 |
686683e to
15cc2a5
Compare
556dddb to
0034d1f
Compare
| return $this->details; | ||
| } | ||
|
|
||
| public function setDetails(array $details) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| public function setDetails(array $details) | |
| /** | |
| * @param array<InvoicingDetail> $details | |
| */ | |
| public function setDetails(array $details): self |
| /** @var Invoicing $entity */ | ||
| $entity = $collection->first(); | ||
| $entity->setDetails(array_values($entity->getDetails())); | ||
| ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀
| */ | ||
| class InvoicingRepository extends Repository implements MetadataInitializer | ||
| { | ||
| public function getQuotationById(int $periodId): ?Invoicing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pourquoi getQuotation quand on retourne un Invoicing ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah mais c'est un devis, pas une facture. Ce serait plus simple en français ![]()
| $this->unitOfWork->pushSave($detail); | ||
| // $this->invoicingDetailRepository->save($detail); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pourquoi cet appel direct à la unit of work ? Le save du repository ne suffit pas pour la transaction ?
| } | ||
|
|
||
| #[Then('/^(?:|I )click on link with (class|id) "(?P<text>(?:[^"]|\\")*)"$/')] | ||
| public function clickOnLink(string $type, string $text): void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cette phrase ne fonctionne que si le js est activé du coup ?
Du coup faudrait pas check le driver et throw si c'est pas panther ?
|
|
||
| if (null === $node) { | ||
| throw new ExpectationException( | ||
| sprintf('miw with %S "%s" was not found', $type, $selector), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C'est quoi miw ?
| And I fill in "quotation[details][1][quantity]" with "1" | ||
| And I fill in "quotation[details][1][unitPrice]" with "12000" | ||
| When I press "Ajouter" | ||
| And wait 2s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pourquoi y'a besoin d'attendre ici ?
Quand on créé un devis ça fait une redirection tout de suite non ?
Ou c'est à cause de Panther ? Il se passe quoi si ça prend plus de 2 secondes ? Est-ce qu'on va commencer à se retrouver avec des tests un peu flacky ?
| return $this; | ||
| } | ||
|
|
||
| public function isValid(): bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pourquoi ne pas utiliser une contrainte de validation ?
0034d1f to
eef10b5
Compare
J'ai un peu modifié la gestions des lignes de devis sur la page d'ajout/modification d'un devis. On peut maintenant rajouter une ligne au besoin.
Avant :

Après :

La gestion des lignes est faite en javascript, pour pouvoir tester cel, j'ai dû rajouter la possibilité de faire des tests avec un vrai navigatuer. Les tests necessitant du javascript sont pilotés avec Behat via Panther sur le navigateur Chromium.