Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-21202

Add automated test for "Extension Difference View"

    XMLWordPrintable

Details

    • Unknown

    Description

      The manual test is here: Extension Difference View.

      The test verifies that the extensions compute changes from Extensions Manager are working properly.

      Matrix discussion:

      https://matrix.to/#/!ikPtGZaGWtyblizzlR:matrix.xwiki.com/$1691052917167ePxSk:matrix.xwiki.com?via=matrix.org&via=matrix.xwiki.com&via=helsinki-systems.de

      Vincent Massol: Ilie Andriuta: the code that is called when clicking "Compute Changes" seems to be https://github.com/xwiki/xwiki-platform/blob/4f398665e912d3089ab2ebd278389ff24fba9240/xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-templates/src/main/resources/templates/extension.vm#L1271-L1279 called at https://github.com/xwiki/xwiki-platform/blob/4f398665e912d3089ab2ebd278389ff24fba9240/xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-templates/src/main/resources/templates/extension.vm#L1099

      So we need to find a test that exercises $services.extension.xar.diff($extensionId, $wikiName), or a func test or a page test for it.
      (the question is more for
      Thomas (@tmortagne:matrix.xwiki.com)
      but I'm checking to see if I can find anything)
      the main func tests for Extensions seems to be https://github.com/xwiki/xwiki-platform/blob/18c079fc4495db6b68393579342863595dfd4e6b/xwiki-platform-core/xwiki-platform-extension/xwiki-platform-extension-test/xwiki-platform-extension-test-tests/src/test/java/org/xwiki/test/ui/extension/ExtensionIT.java but I don't see any test for "compute changes"

      Vincent Massol: so all I could find is a simple unit test for $services.extension.xar.diff() at https://github.com/xwiki/xwiki-platform/blob/6668147f1178bde83232fc931b3b517b70ba6567/xwiki-platform-core/xwiki-platform-extension/xwiki-platform-extension-handlers/xwiki-platform-extension-handler-xar/src/test/java/org/xwiki/extension/xar/script/XarExtensionScriptServiceTest.java#L112
      (and it doesn't test much)
      so yes I think you could create an issue for a missing func test

      Attachments

        Activity

          People

            Unassigned Unassigned
            iandriuta Ilie Andriuta
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: