mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 17:10:53 +00:00
Adjust existing tests to changes
This commit is contained in:
parent
9c462870eb
commit
80be385cfe
6 changed files with 84 additions and 46 deletions
|
|
@ -37,7 +37,7 @@ final class ManagingPaymentMethodsContext implements Context
|
|||
/**
|
||||
* @When I want to modify the :paymentMethod payment method
|
||||
*/
|
||||
public function iWantToModifyAPaymentMethod(PaymentMethodInterface $paymentMethod)
|
||||
public function iWantToModifyAPaymentMethod(PaymentMethodInterface $paymentMethod): void
|
||||
{
|
||||
$this->updatePage->open(['id' => $paymentMethod->getId()]);
|
||||
}
|
||||
|
|
@ -247,7 +247,7 @@ final class ManagingPaymentMethodsContext implements Context
|
|||
/**
|
||||
* @When I switch the way payment methods are sorted by :field
|
||||
* @When I start sorting payment methods by :field
|
||||
* @When I switch the way payment methods are sorted descending by :field
|
||||
* @When I switch the way payment methods are sorted to descending by :field
|
||||
* @Given the payment methods are already sorted by :field
|
||||
*/
|
||||
public function iSortPaymentMethodsBy($field)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,13 @@
|
|||
"method": {
|
||||
"@id": "\/api\/v2\/admin\/payment-methods\/CASH_ON_DELIVERY",
|
||||
"@type": "PaymentMethod",
|
||||
"name": "Cash on delivery"
|
||||
"translations": {
|
||||
"en_US": {
|
||||
"@id": "\/api\/v2\/admin\/payment-method-translations\/@integer@",
|
||||
"@type": "PaymentMethodTranslation",
|
||||
"name": "Cash on delivery"
|
||||
}
|
||||
}
|
||||
},
|
||||
"currencyCode": "USD",
|
||||
"amount": 6500,
|
||||
|
|
|
|||
|
|
@ -7,7 +7,13 @@
|
|||
"method": {
|
||||
"@id": "\/api\/v2\/shop\/payment-methods\/CASH_ON_DELIVERY",
|
||||
"@type": "PaymentMethod",
|
||||
"name": "Cash on delivery"
|
||||
"translations": {
|
||||
"en_US": {
|
||||
"@id": "\/api\/v2\/shop\/payment-method-translations\/@integer@",
|
||||
"@type": "PaymentMethodTranslation",
|
||||
"name": "Cash on delivery"
|
||||
}
|
||||
}
|
||||
},
|
||||
"currencyCode": "USD",
|
||||
"amount": 6500,
|
||||
|
|
|
|||
|
|
@ -22,30 +22,40 @@
|
|||
"name": "Bank transfer",
|
||||
"description": @string@,
|
||||
"instructions": null
|
||||
},
|
||||
{
|
||||
"@id": "\/api\/v2\/shop\/payment-methods\/PAYPAL",
|
||||
"@type": "PaymentMethod",
|
||||
"id": @integer@,
|
||||
"code": "PAYPAL",
|
||||
"position": 3,
|
||||
"name": "PayPal",
|
||||
"description": @string@,
|
||||
"instructions": null
|
||||
}
|
||||
],
|
||||
"hydra:totalItems": 2,
|
||||
"hydra:view": {
|
||||
"@id": @string@,
|
||||
"@type": "hydra:PartialCollectionView"
|
||||
},
|
||||
"hydra:search": {
|
||||
"hydra:totalItems": 3,
|
||||
"hydra:view": {
|
||||
"@id": "\/api\/v2\/shop\/payment-methods?paymentId=@string@&tokenValue=@string@",
|
||||
"@type": "hydra:PartialCollectionView"
|
||||
},
|
||||
"hydra:search": {
|
||||
"@type": "hydra:IriTemplate",
|
||||
"hydra:template": "/api/v2/shop/payment-methods{?paymentId,tokenValue}",
|
||||
"hydra:template": "\/api\/v2\/shop\/payment-methods{?paymentId,tokenValue}",
|
||||
"hydra:variableRepresentation": "BasicRepresentation",
|
||||
"hydra:mapping": [
|
||||
{
|
||||
"@type": "IriTemplateMapping",
|
||||
"variable": "paymentId",
|
||||
"property": null,
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"@type": "IriTemplateMapping",
|
||||
"variable": "tokenValue",
|
||||
"property": null,
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
}
|
||||
{
|
||||
"@type": "IriTemplateMapping",
|
||||
"variable": "paymentId",
|
||||
"property": null,
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"@type": "IriTemplateMapping",
|
||||
"variable": "tokenValue",
|
||||
"property": null,
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,26 +22,36 @@
|
|||
"name": "Bank transfer",
|
||||
"description": @string@,
|
||||
"instructions": null
|
||||
},
|
||||
{
|
||||
"@id": "\/api\/v2\/shop\/payment-methods\/PAYPAL",
|
||||
"@type": "PaymentMethod",
|
||||
"id": @integer@,
|
||||
"code": "PAYPAL",
|
||||
"position": 3,
|
||||
"name": "PayPal",
|
||||
"description": @string@,
|
||||
"instructions": null
|
||||
}
|
||||
],
|
||||
"hydra:totalItems": 2,
|
||||
"hydra:search": {
|
||||
"@type": "hydra:IriTemplate",
|
||||
"hydra:template": "/api/v2/shop/payment-methods{?paymentId,tokenValue}",
|
||||
"hydra:variableRepresentation": "BasicRepresentation",
|
||||
"hydra:mapping": [
|
||||
{
|
||||
"@type": "IriTemplateMapping",
|
||||
"variable": "paymentId",
|
||||
"property": null,
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"@type": "IriTemplateMapping",
|
||||
"variable": "tokenValue",
|
||||
"property": null,
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
}
|
||||
"hydra:totalItems": 3,
|
||||
"hydra:search": {
|
||||
"@type": "hydra:IriTemplate",
|
||||
"hydra:template": "\/api\/v2\/shop\/payment-methods{?paymentId,tokenValue}",
|
||||
"hydra:variableRepresentation": "BasicRepresentation",
|
||||
"hydra:mapping": [
|
||||
{
|
||||
"@type": "IriTemplateMapping",
|
||||
"variable": "paymentId",
|
||||
"property": null,
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"@type": "IriTemplateMapping",
|
||||
"variable": "tokenValue",
|
||||
"property": null,
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,13 @@
|
|||
"method": {
|
||||
"@id": "\/api\/v2\/shop\/payment-methods\/CASH_ON_DELIVERY",
|
||||
"@type": "PaymentMethod",
|
||||
"name": "Cash on delivery"
|
||||
"translations": {
|
||||
"en_US": {
|
||||
"@id": "\/api\/v2\/shop\/payment-method-translations\/@integer@",
|
||||
"@type": "PaymentMethodTranslation",
|
||||
"name": "Cash on delivery"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue