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 = [
|
||||
{ type: "PRODUCT", testCase: "SALEOR_0517" },
|
||||
{ type: "PAGE", testCase: "SALEOR_0518" },
|
||||
{ type: "PRODUCT_VARIANT", testCase: "SALEOR_0539" },
|
||||
];
|
||||
const attributeNumericType = [
|
||||
{
|
||||
|
@ -60,7 +61,7 @@ describe("As an admin I want to create content attribute", () => {
|
|||
attributesTypes.forEach(attributeType => {
|
||||
it(
|
||||
`should be able to create ${attributeType.type} attribute. TC:${attributeType.testCase}`,
|
||||
{ tags: ["@attribute", "@allEnv"] },
|
||||
{ tags: ["@attribute", "@allEnv", "@stable"] },
|
||||
() => {
|
||||
const attributeName = `${startsWith}${faker.datatype.number()}`;
|
||||
createAttributeWithInputType({
|
||||
|
|
|
@ -32,6 +32,7 @@ describe("As an admin I want to create product attribute", () => {
|
|||
const attributeReferenceType = [
|
||||
{ type: "PRODUCT", testCase: "SALEOR_0506" },
|
||||
{ type: "PAGE", testCase: "SALEOR_0507" },
|
||||
{ type: "PRODUCT_VARIANT", testCase: "SALEOR_0539" },
|
||||
];
|
||||
const attributeNumericType = [
|
||||
{
|
||||
|
@ -65,7 +66,7 @@ describe("As an admin I want to create product attribute", () => {
|
|||
attributesTypes.forEach(attributeType => {
|
||||
it(
|
||||
`should be able to create ${attributeType.type} attribute. TC:${attributeType.testCase}`,
|
||||
{ tags: ["@attribute", "@allEnv"] },
|
||||
{ tags: ["@attribute", "@allEnv", "@stable"] },
|
||||
() => {
|
||||
const attributeName = `${startsWith}${faker.datatype.number()}`;
|
||||
|
||||
|
@ -116,7 +117,7 @@ describe("As an admin I want to create product attribute", () => {
|
|||
attributeNumericType.forEach(numericSystemType => {
|
||||
it(
|
||||
`should be able to create numeric ${numericSystemType.unitSystem} attribute. TC:${numericSystemType.testCase}`,
|
||||
{ tags: ["@attribute", "@allEnv"] },
|
||||
{ tags: ["@attribute", "@allEnv", "@stable"] },
|
||||
() => {
|
||||
const attributeType = "NUMERIC";
|
||||
const attributeName = `${startsWith}${faker.datatype.number()}`;
|
||||
|
|
|
@ -6,7 +6,7 @@ export const ATTRIBUTES_DETAILS = {
|
|||
valueRequired: '[name="valueRequired"]',
|
||||
valueNameInput: '[data-test-id="value-name"]',
|
||||
dashboardProperties: {
|
||||
useInFilteringCheckbox: '[name="filterableInDashboard"]'
|
||||
useInFilteringCheckbox: '[name="filterableInDashboard"]',
|
||||
},
|
||||
attributesInputTypes: {
|
||||
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"]',
|
||||
NUMERIC: '[data-test-id="select-field-option-NUMERIC"]',
|
||||
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"]',
|
||||
entityTypeOptions: {
|
||||
PRODUCT: '[data-test-id*="PRODUCT"]',
|
||||
PAGE: '[data-test-id*="PAGE"]'
|
||||
PRODUCT: '[data-test-id="select-field-option-PRODUCT"]',
|
||||
PRODUCT_VARIANT: '[data-test-id="select-field-option-PRODUCT_VARIANT"]',
|
||||
PAGE: '[data-test-id*="PAGE"]',
|
||||
},
|
||||
selectUnitCheckbox: '[name="selectUnit"]',
|
||||
unitSystemSelect: '[data-test-id="unit-system"]',
|
||||
unitSystemsOptions: {
|
||||
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"]',
|
||||
unitsOfOptions: {
|
||||
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"]',
|
||||
unitsOptions: {
|
||||
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"]',
|
||||
uploadFileButton: '[data-test-id="button-upload-file"]',
|
||||
pageTypeAttributeCheckbox: '[value="PAGE_TYPE"]',
|
||||
swatchValueImage: '[data-test-id="swatch-image"]'
|
||||
swatchValueImage: '[data-test-id="swatch-image"]',
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue