-
Notifications
You must be signed in to change notification settings - Fork 71
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 ?
|
|
||
| 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
eef10b5 to
257149a
Compare
stakovicz
left a comment
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.
Gros boulot ! Bravo !
Il reste aussi des commentaires non résolus.
| { | ||
| echo time(); | ||
| $value = intval($text) * (strtolower($unit) === 'ms' ? 1 : 1000); | ||
| dump($value); |
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 voulu de garder ce dump ?
| $existingIds[] = $detail->getId(); | ||
| } | ||
| $detail->setInvoicingId($quotation->getId()); | ||
| // $this->unitOfWork->pushSave($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.
Peut être nettoyer ce commentaire, non ?
| 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.
C'est toujours nécessaire ?
| When I follow the button of tooltip "Modifier le devis ESN dev en folie" | ||
| Then I click on link with id "remove_row_0" | ||
| When I press "Modifier" | ||
| 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.
Ça va dépendre de la vitesse d’exécution des tests, non ?
On risque de se retrouver avec des tests flakies.
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.