Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-6388

Convert NodeDeepEqualsAssertBuilder into a Matcher and implement missing parts

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Neutral Neutral
    • None
    • None
    • None
    • None

      Current situation

      NodeDeepEqualsAssertBuilder was introduced in MGNLUI-6253 to allow asserting node structures - this allows building tests using imported yamls - much easier to read/write parameterized tests in a before/after fashion.

      Desired situation

      • implement TODOs
        • Fetch locales from nodes so the user does not need to input used Locales in YAML.
          • Such YAMLs shouldn't ever be so long that it would be a performance issue. In case a test would need such a long YAML, they could provide the locales as a fallback as it is done now and the locales lookup would happen only if they are not provided.
      • Implement order insensitive equals assertion (there's the UnsupportedOperationException thrown)
      • you can try reusing this code or get inspiration from it
        • info/magnolia/module/workflow/setup/WorkflowCompatibilityVersionHandlerTest.java#454{{}}
          {{}}
        • info.magnolia.importexport.command.JcrImportExportCommandTest#hasSameStructure
      • Replace usages of the two methods mentioned above with this implementation
      • It would be nice if we could use assertThat fluently with a matcher instead of having a custom Util assertion builder. Try to convert it into a matcher without compromising the configurability of the assertion.
      • move to core

        Acceptance criteria

              Unassigned Unassigned
              sdemocko Šimon Demočko
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:

                  Task DoD