CZERTAINLY/CZERTAINLY-FE-Administrator

Implement attribute editor and descriptor viewer component tests

lubomirw opened this issue · 0 comments

Add components tests for attribute editor related components

  • Attribute Editor
  • Attribute Descriptor Viewer
  • Compliance Rule Attribute Viewer

Tests consistency of displayed data formatting and validation

  • content type data formatting
  • using reference or data based on content type
  • callback functionality

Test cases to check

Attribute editor

  • check if attribute editor supports all the descriptor types
  • check edit mode, if default values are getting loaded in inputs (for list, correct value selected)
    • when attribute has callback
    • when attribute is part of group attribute callback content
  • test callback will be triggered only when there is a change in all required inputs that callback needs by simulating selection of user. Check also if callback gets triggered if there is change in relevant inputs (WIP).
  • data attribute inside the group attribute will trigger callback and render data properly
  • Check if relevant input element is rendered based on the content type ( text input, number input, select, etc )
  • Check if the correct number of options are loading in select input
  • Check if attribute editor works correctly if it contains global modal and multiple forms (tabbed component)
    • updating correct state when callback is triggered
    • after close, created new object in global modal is selected in input
  • check if attribute labels and input hints are correct based on input props
  • Check if constraint check display error message defined in attribute constraint definition
  • check functionality of attribute properties & rendering of content
    • check functionality of attribute property read-only makes input disabled,
    • check functionality of attribute property visible false makes it hidden
    • check custom attribute descriptors work correctly with attribute editor. (includes label, hints, type of input)
    • if property is of type code block, file , render input appropriate input components

Attribute Descriptor Viewer

  • check if attribute descriptor viewer supports all the descriptor types

Compliance Rule Attribute Viewer (WIP)

  • check if Compliance Rule Attribute Viewer renders without descriptors
  • check if Compliance Rule Attribute Viewer renders with descriptors