saleor-dashboard/cypress/utils/attributes/checkAttributeData.js
Karolina Rakoczy f1b313ea69
Saleor 3873 tests for navigation (#1234)
* add test for creating menu

* tests for navigation

* fix imports
2021-07-15 15:31:05 +03: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);
}