Skip to content

Conversation

@vgreb
Copy link
Collaborator

@vgreb vgreb commented Dec 9, 2025

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 :
devis-avant

Après :
devis-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.

@vgreb vgreb self-assigned this Dec 9, 2025
@vgreb
Copy link
Collaborator Author

vgreb commented Dec 9, 2025

resolves #2002

@vgreb vgreb force-pushed the refacto/accounting-quotation-add-edit branch 6 times, most recently from 686683e to 15cc2a5 Compare December 16, 2025 20:40
@vgreb vgreb force-pushed the refacto/accounting-quotation-add-edit branch 8 times, most recently from 556dddb to 0034d1f Compare December 20, 2025 21:30
@vgreb vgreb marked this pull request as ready for review December 20, 2025 22:03
@vgreb vgreb requested review from Mopolo and stakovicz December 20, 2025 22:03
return $this->details;
}

public function setDetails(array $details)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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()));
;
Copy link
Contributor

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
Copy link
Contributor

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 ?

Copy link
Contributor

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 :trollface:

Comment on lines 45 to 46
$this->unitOfWork->pushSave($detail);
// $this->invoicingDetailRepository->save($detail);
Copy link
Contributor

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
Copy link
Contributor

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),
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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 ?

@vgreb vgreb force-pushed the refacto/accounting-quotation-add-edit branch from 0034d1f to eef10b5 Compare December 23, 2025 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants