saleor-dashboard/cypress/utils/attributes.js/checkAttributeData.js
Karolina Rakoczy 4faafd2489
Saleor 3626 tests for attributes (#1198)
* tests for attributes

* add tests for content attribute
2021-07-09 11:43:45 +02:00

19 lines
520 B
JavaScript

const { softExpect } = chai;
export function expectCorrectDataInAttribute(
attribute,
{
attributeName,
attributeType,
entityType = null,
unit = null,
valueRequired = true
}
) {
softExpect(attribute.name).to.eq(attributeName);
softExpect(attribute.slug).to.eq(attributeName);
softExpect(attribute.inputType).to.eq(attributeType);
softExpect(attribute.entityType).to.eq(entityType);
softExpect(attribute.unit).to.eq(unit);
softExpect(attribute.valueRequired).to.eq(valueRequired);
}