Commit 76d2d48
authored
Cast total to string before setting value in refund inputs (#485)
| Q | A
| --------------- | -----
| Branch? | 2.0
| Bug fix? | yes
| New feature? | no
| Related tickets | none
Setting a value on an input field requires it to be a string. Without
this fix you can end up with this error:
```log
Behat\Testwork\Call\Exception\FatalThrowableError: Type error: Symfony\Component\Panther\DomCrawler\Field\InputFormField::setTextValue():
Argument #1 ($value) must be of type ?string, float given,
called in vendor/symfony/panther/src/DomCrawler/Field/InputFormField.php
on line 29 in vendor/symfony/panther/src/DomCrawler/Field/FormFieldTrait.php:57
Stack trace:
#0 vendor/symfony/panther/src/DomCrawler/Field/InputFormField.php(29): Symfony\Component\Panther\DomCrawler\Field\InputFormField->setTextValue(10.0)
#1 vendor/robertfausk/mink-panther-driver/src/PantherDriver.php(559): Symfony\Component\Panther\DomCrawler\Field\InputFormField->setValue(10.0)
#2 vendor/friends-of-behat/mink/src/Element/NodeElement.php(105): Behat\Mink\Driver\PantherDriver->setValue('((//html/descen...', 10.0)
#3 vendor/sylius/refund-plugin/tests/Behat/Page/Admin/OrderRefundsPage.php(47): Behat\Mink\Element\NodeElement->setValue(10.0)
#4 vendor/sylius/refund-plugin/tests/Behat/Context/Ui/RefundingContext.php(54):
```1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
0 commit comments