saleor-dashboard/cypress/support/api/utils/attributes/checkAttributeData.js

20 lines
520 B
JavaScript
Raw Normal View History

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);
}