Fixes for creating attribute tests (#2321)
This commit is contained in:
parent
61fe80bb7a
commit
f9392ce0ce
3 changed files with 14 additions and 11 deletions
|
@ -25,6 +25,7 @@ describe("As an admin I want to create content attribute", () => {
|
||||||
const attributeReferenceType = [
|
const attributeReferenceType = [
|
||||||
{ type: "PRODUCT", testCase: "SALEOR_0517" },
|
{ type: "PRODUCT", testCase: "SALEOR_0517" },
|
||||||
{ type: "PAGE", testCase: "SALEOR_0518" },
|
{ type: "PAGE", testCase: "SALEOR_0518" },
|
||||||
|
{ type: "PRODUCT_VARIANT", testCase: "SALEOR_0539" },
|
||||||
];
|
];
|
||||||
const attributeNumericType = [
|
const attributeNumericType = [
|
||||||
{
|
{
|
||||||
|
@ -60,7 +61,7 @@ describe("As an admin I want to create content attribute", () => {
|
||||||
attributesTypes.forEach(attributeType => {
|
attributesTypes.forEach(attributeType => {
|
||||||
it(
|
it(
|
||||||
`should be able to create ${attributeType.type} attribute. TC:${attributeType.testCase}`,
|
`should be able to create ${attributeType.type} attribute. TC:${attributeType.testCase}`,
|
||||||
{ tags: ["@attribute", "@allEnv"] },
|
{ tags: ["@attribute", "@allEnv", "@stable"] },
|
||||||
() => {
|
() => {
|
||||||
const attributeName = `${startsWith}${faker.datatype.number()}`;
|
const attributeName = `${startsWith}${faker.datatype.number()}`;
|
||||||
createAttributeWithInputType({
|
createAttributeWithInputType({
|
||||||
|
|
|
@ -32,6 +32,7 @@ describe("As an admin I want to create product attribute", () => {
|
||||||
const attributeReferenceType = [
|
const attributeReferenceType = [
|
||||||
{ type: "PRODUCT", testCase: "SALEOR_0506" },
|
{ type: "PRODUCT", testCase: "SALEOR_0506" },
|
||||||
{ type: "PAGE", testCase: "SALEOR_0507" },
|
{ type: "PAGE", testCase: "SALEOR_0507" },
|
||||||
|
{ type: "PRODUCT_VARIANT", testCase: "SALEOR_0539" },
|
||||||
];
|
];
|
||||||
const attributeNumericType = [
|
const attributeNumericType = [
|
||||||
{
|
{
|
||||||
|
@ -65,7 +66,7 @@ describe("As an admin I want to create product attribute", () => {
|
||||||
attributesTypes.forEach(attributeType => {
|
attributesTypes.forEach(attributeType => {
|
||||||
it(
|
it(
|
||||||
`should be able to create ${attributeType.type} attribute. TC:${attributeType.testCase}`,
|
`should be able to create ${attributeType.type} attribute. TC:${attributeType.testCase}`,
|
||||||
{ tags: ["@attribute", "@allEnv"] },
|
{ tags: ["@attribute", "@allEnv", "@stable"] },
|
||||||
() => {
|
() => {
|
||||||
const attributeName = `${startsWith}${faker.datatype.number()}`;
|
const attributeName = `${startsWith}${faker.datatype.number()}`;
|
||||||
|
|
||||||
|
@ -116,7 +117,7 @@ describe("As an admin I want to create product attribute", () => {
|
||||||
attributeNumericType.forEach(numericSystemType => {
|
attributeNumericType.forEach(numericSystemType => {
|
||||||
it(
|
it(
|
||||||
`should be able to create numeric ${numericSystemType.unitSystem} attribute. TC:${numericSystemType.testCase}`,
|
`should be able to create numeric ${numericSystemType.unitSystem} attribute. TC:${numericSystemType.testCase}`,
|
||||||
{ tags: ["@attribute", "@allEnv"] },
|
{ tags: ["@attribute", "@allEnv", "@stable"] },
|
||||||
() => {
|
() => {
|
||||||
const attributeType = "NUMERIC";
|
const attributeType = "NUMERIC";
|
||||||
const attributeName = `${startsWith}${faker.datatype.number()}`;
|
const attributeName = `${startsWith}${faker.datatype.number()}`;
|
||||||
|
|
|
@ -6,7 +6,7 @@ export const ATTRIBUTES_DETAILS = {
|
||||||
valueRequired: '[name="valueRequired"]',
|
valueRequired: '[name="valueRequired"]',
|
||||||
valueNameInput: '[data-test-id="value-name"]',
|
valueNameInput: '[data-test-id="value-name"]',
|
||||||
dashboardProperties: {
|
dashboardProperties: {
|
||||||
useInFilteringCheckbox: '[name="filterableInDashboard"]'
|
useInFilteringCheckbox: '[name="filterableInDashboard"]',
|
||||||
},
|
},
|
||||||
attributesInputTypes: {
|
attributesInputTypes: {
|
||||||
DROPDOWN: '[data-test-id="select-field-option-DROPDOWN"]',
|
DROPDOWN: '[data-test-id="select-field-option-DROPDOWN"]',
|
||||||
|
@ -18,31 +18,32 @@ export const ATTRIBUTES_DETAILS = {
|
||||||
RICH_TEXT: '[data-test-id="select-field-option-RICH_TEXT"]',
|
RICH_TEXT: '[data-test-id="select-field-option-RICH_TEXT"]',
|
||||||
NUMERIC: '[data-test-id="select-field-option-NUMERIC"]',
|
NUMERIC: '[data-test-id="select-field-option-NUMERIC"]',
|
||||||
BOOLEAN: '[data-test-id="select-field-option-BOOLEAN"]',
|
BOOLEAN: '[data-test-id="select-field-option-BOOLEAN"]',
|
||||||
SWATCH: '[data-test-id="select-field-option-SWATCH"]'
|
SWATCH: '[data-test-id="select-field-option-SWATCH"]',
|
||||||
},
|
},
|
||||||
entityTypeSelect: '[id="mui-component-select-entityType"]',
|
entityTypeSelect: '[id="mui-component-select-entityType"]',
|
||||||
entityTypeOptions: {
|
entityTypeOptions: {
|
||||||
PRODUCT: '[data-test-id*="PRODUCT"]',
|
PRODUCT: '[data-test-id="select-field-option-PRODUCT"]',
|
||||||
PAGE: '[data-test-id*="PAGE"]'
|
PRODUCT_VARIANT: '[data-test-id="select-field-option-PRODUCT_VARIANT"]',
|
||||||
|
PAGE: '[data-test-id*="PAGE"]',
|
||||||
},
|
},
|
||||||
selectUnitCheckbox: '[name="selectUnit"]',
|
selectUnitCheckbox: '[name="selectUnit"]',
|
||||||
unitSystemSelect: '[data-test-id="unit-system"]',
|
unitSystemSelect: '[data-test-id="unit-system"]',
|
||||||
unitSystemsOptions: {
|
unitSystemsOptions: {
|
||||||
IMPERIAL: '[data-test-id="select-field-option-imperial"]',
|
IMPERIAL: '[data-test-id="select-field-option-imperial"]',
|
||||||
METRIC: '[data-test-id="select-field-option-metric"]'
|
METRIC: '[data-test-id="select-field-option-metric"]',
|
||||||
},
|
},
|
||||||
unitOfSelect: '[data-test-id="unit-of"]',
|
unitOfSelect: '[data-test-id="unit-of"]',
|
||||||
unitsOfOptions: {
|
unitsOfOptions: {
|
||||||
VOLUME: '[data-test-id="select-field-option-volume"]',
|
VOLUME: '[data-test-id="select-field-option-volume"]',
|
||||||
DISTANCE: '[data-test-id="select-field-option-distance"]'
|
DISTANCE: '[data-test-id="select-field-option-distance"]',
|
||||||
},
|
},
|
||||||
unitSelect: '[data-test-id="unit"]',
|
unitSelect: '[data-test-id="unit"]',
|
||||||
unitsOptions: {
|
unitsOptions: {
|
||||||
CUBIC_CENTIMETER: '[data-test-id="select-field-option-CUBIC_CENTIMETER"]',
|
CUBIC_CENTIMETER: '[data-test-id="select-field-option-CUBIC_CENTIMETER"]',
|
||||||
FT: '[data-test-id="select-field-option-FT"]'
|
FT: '[data-test-id="select-field-option-FT"]',
|
||||||
},
|
},
|
||||||
imageCheckbox: '[value= "image"]',
|
imageCheckbox: '[value= "image"]',
|
||||||
uploadFileButton: '[data-test-id="button-upload-file"]',
|
uploadFileButton: '[data-test-id="button-upload-file"]',
|
||||||
pageTypeAttributeCheckbox: '[value="PAGE_TYPE"]',
|
pageTypeAttributeCheckbox: '[value="PAGE_TYPE"]',
|
||||||
swatchValueImage: '[data-test-id="swatch-image"]'
|
swatchValueImage: '[data-test-id="swatch-image"]',
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue