Fix adyen tests (#2545)
* update adyen plugin before tests * add payments tag to PR template
This commit is contained in:
parent
32cc9c9bdb
commit
1c70ad3a4b
3 changed files with 22 additions and 11 deletions
1
.github/PULL_REQUEST_TEMPLATE.md
vendored
1
.github/PULL_REQUEST_TEMPLATE.md
vendored
|
@ -53,5 +53,6 @@ To run all tests, just select the stable checkbox. To speed up tests, increase t
|
||||||
20. [ ] translations
|
20. [ ] translations
|
||||||
21. [ ] navigation
|
21. [ ] navigation
|
||||||
22. [ ] variants
|
22. [ ] variants
|
||||||
|
23. [ ] payments
|
||||||
|
|
||||||
CONTAINERS=1
|
CONTAINERS=1
|
|
@ -9,6 +9,7 @@ import {
|
||||||
createCheckout,
|
createCheckout,
|
||||||
} from "../../../support/api/requests/Checkout";
|
} from "../../../support/api/requests/Checkout";
|
||||||
import { getOrder } from "../../../support/api/requests/Order";
|
import { getOrder } from "../../../support/api/requests/Order";
|
||||||
|
import { updatePlugin } from "../../../support/api/requests/Plugins";
|
||||||
import { getDefaultChannel } from "../../../support/api/utils/channelsUtils";
|
import { getDefaultChannel } from "../../../support/api/utils/channelsUtils";
|
||||||
import {
|
import {
|
||||||
addAdyenPayment,
|
addAdyenPayment,
|
||||||
|
@ -66,15 +67,19 @@ describe("Adyen payments", () => {
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.then(
|
.then(
|
||||||
({
|
({ warehouse: warehouseResp, shippingMethod: shippingMethodResp }) => {
|
||||||
warehouse: warehouseResp,
|
|
||||||
shippingZone: shippingZoneResp,
|
|
||||||
shippingMethod: shippingMethodResp,
|
|
||||||
}) => {
|
|
||||||
warehouse = warehouseResp;
|
warehouse = warehouseResp;
|
||||||
shippingMethod = shippingMethodResp;
|
shippingMethod = shippingMethodResp;
|
||||||
},
|
},
|
||||||
);
|
)
|
||||||
|
.then(() => {
|
||||||
|
updatePlugin(
|
||||||
|
"mirumee.payments.adyen",
|
||||||
|
"adyen-auto-capture",
|
||||||
|
true,
|
||||||
|
defaultChannel.id,
|
||||||
|
);
|
||||||
|
});
|
||||||
createTypeAttributeAndCategoryForProduct({ name })
|
createTypeAttributeAndCategoryForProduct({ name })
|
||||||
.then(({ productType, attribute, category }) => {
|
.then(({ productType, attribute, category }) => {
|
||||||
createProductInChannel({
|
createProductInChannel({
|
||||||
|
|
|
@ -1,10 +1,15 @@
|
||||||
export function updatePlugin(id, name, value) {
|
export function updatePlugin(id, name, value, channel) {
|
||||||
|
const channelLine = channel ? `channelId: "${channel}"` : "";
|
||||||
|
|
||||||
const mutation = `mutation{
|
const mutation = `mutation{
|
||||||
pluginUpdate(id:"${id}", input:{
|
pluginUpdate(
|
||||||
configuration:{
|
id:"${id}",
|
||||||
name:"${name}"
|
${channelLine},
|
||||||
|
input:{
|
||||||
|
configuration:[{
|
||||||
|
name:"${name}",
|
||||||
value:"${value}"
|
value:"${value}"
|
||||||
}
|
}]
|
||||||
}){
|
}){
|
||||||
errors{
|
errors{
|
||||||
field
|
field
|
||||||
|
|
Loading…
Reference in a new issue