Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-18633

Speed up granting permissions to users in webdriver tests

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 7.10
    • Fix Version/s: 7.10-HF03, 8.1
    • Component/s: Tests
    • Tags:
    • Team:
      AT
    • Sprint:
      nxAT Sprint 8.1.3

      Description

      The webdriver method granting permissions to users freezes for around 6 seconds when adding a permission to a user (in ITSearchTabTest for instance).

      This is linked to the "wait for permission added" logic in PermissionsSubPage#hasPermissionForUser

      List<WebElement> spans = element.findElements(new ByChained(By.tagName("div"), By.tagName("span")));
      

      This takes around 4 seconds, the ByChained find seems costly and matches much more elements than what the test actually needs to check.

      Additionnal 2 seconds are linked to a missing break when iterating over these elements.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: