From e7a7b79f3e81885b2556f1c303aedcee67948ef5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anna=20Szcz=C4=99ch?= <30683248+szczecha@users.noreply.github.com> Date: Fri, 7 Oct 2022 11:07:34 +0200 Subject: [PATCH] values set only a for few inputType (#2355) --- cypress/support/api/requests/Attribute.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cypress/support/api/requests/Attribute.js b/cypress/support/api/requests/Attribute.js index 187aa6832..b5b35e2f3 100644 --- a/cypress/support/api/requests/Attribute.js +++ b/cypress/support/api/requests/Attribute.js @@ -3,9 +3,16 @@ export function createAttribute({ attributeValues = ["value"], type = "PRODUCT_TYPE", inputType = "DROPDOWN", - filterableInDashboard = false + filterableInDashboard = false, + values = [], }) { - const values = attributeValues.map(element => `{name:"${element}"}`); + if ( + inputType === "MULTISELECT" || + inputType === "DROPDOWN" || + inputType === "SWATCH" + ) { + values = attributeValues.map(element => `{name:"${element}"}`); + } const mutation = `mutation{ attributeCreate(input:{ name:"${name}"