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

Add automated test for "Disable Like feature"

    XMLWordPrintable

Details

    • Unknown

    Description

      The manual test is here: https://test.xwiki.org/xwiki/bin/view/Page%20Likes%20Tests/Disable%20Like%20feature

      The test verifies that the Like feature can be disabled from Administration.

      Matrix discussion:

      Ilie Andriuta: Simon Urli: I was going to create a manual test for disabling the Like feature on 13.1RC1 https://www.xwiki.org/xwiki/bin/view/ReleaseNotes/Data/XWiki/13.1RC1/Change005/ and I wanted to ask if there is an automated test for it already as I didn't find one or maybe I didn't find the right location
      Simon Urli: I checked https://jira.xwiki.org/browse/XWIKI-18291 and no apparently I only created unit tests for that
      Ilie Andriuta: ok, I will create a test case for it then, thanks
      Vincent Massol: wait
      not sure we need one
      we need to decide
      if the unit test is good enough it could be enough
      we don't want func test for everything
      Ilie Andriuta: ok
      Vincent Massol: it would be too much
      we just need to check how much confidence that unit test gives us
      Ilie Andriuta: ok, I'll wait
      Vincent Massol: seems the unit test is testing a new SS API
      https://github.com/xwiki/xwiki-platform/commit/4eecc150520e417f793b8da2006b7f83660d6201#diff-eea7a9504877211b9e961ed01eef73e75b88bc501744519e37526322963d19e5R154
      so that doesn't test if that api is called or not
      from what I see
      the following code is not tested: https://github.com/xwiki/xwiki-platform/commit/4eecc150520e417f793b8da2006b7f83660d6201#diff-acf5ea0964c380b7ed30a2c855dd2a30f6ed5670e350451a1babd415ca53fa73R167
      that one can be tested with a "unit" test, using a PageTest
      there's also https://github.com/xwiki/xwiki-platform/commit/4eecc150520e417f793b8da2006b7f83660d6201#diff-0b51114cb27f7a5c599cf40c59d658eae6ddc5c0836532c3b35e163f40a4854fR292
      could also be tested with a PageTest I think
      so we're indeed missing some automated tests
      BTW Simon Urli I don't like too much this API name https://github.com/xwiki/xwiki-platform/blob/4eecc150520e417f793b8da2006b7f83660d6201/xwiki-platform-core/xwiki-platform-like/xwiki-platform-like-api/src/main/java/org/xwiki/like/LikeConfiguration.java#L39
      what if the UI changes and it's no longer a button in the future?
      it seems the intent of the config is to display the like information
      and not about whether there's a button or not
      right?
      Simon Urli: yep
      Vincent Massol: Suggestion: alwaysDisplayLikes?
      Ilie Andriuta so you can create a manual test and also a jira to have an automated test (you could copy the details above in the jira)
      Ilie Andriuta: ok, thanks

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: