owncloud / user_ldap

📒
GNU Affero General Public License v3.0
17 stars 17 forks source link

`webUIProvisioning/groups.feature:31` test failed #742

Closed saw-jan closed 2 years ago

saw-jan commented 2 years ago

Builds: https://drone.owncloud.com/owncloud/user_ldap/4002/53/14, https://drone.owncloud.com/owncloud/user_ldap/4002/54/14, https://drone.owncloud.com/owncloud/user_ldap/4002/57/14, https://drone.owncloud.com/owncloud/user_ldap/4002/58/14, https://drone.owncloud.com/owncloud/user_ldap/4002/67/14

Background:                                                                             # /var/www/owncloud/testrunner/apps/user_ldap/tests/acceptance/features/webUIProvisioning/groups.feature:7
  And these users have been created with default attributes and without skeleton files: # FeatureContext::theseUsersHaveBeenCreatedWithDefaultAttributesAndWithoutSkeletonFiles()
    | username |
    | Alice    |
    | Brian    |
    | Carol    |
  And group "grp1" has been created                                                     # FeatureContext::groupHasBeenCreated()
  And the administrator has invoked occ command "group:list"                            # OccContext::theAdministratorHasInvokedOccCommand()
  And user "Brian" has been added to group "grp1"                                       # FeatureContext::userHasBeenAddedToGroup()
  And user "Carol" has been added to group "grp1"                                       # FeatureContext::userHasBeenAddedToGroup()
  And user admin has logged in using the webUI                                          # WebUILoginContext::theUserHasLoggedInUsingTheWebUI()
  And the administrator has browsed to the users page                                   # WebUIUsersContext::theUserBrowsesToTheUsersPage()

Scenario: Add group with same name as existing ldap group                                                         # /var/www/owncloud/testrunner/apps/user_ldap/tests/acceptance/features/webUIProvisioning/groups.feature:31
INFORMATION: timed out waiting for outstanding ajax calls
  When the administrator adds group "grp1" using the webUI                                                        # WebUIUsersContext::theAdminAddsGroupUsingTheWebUI()
    │ INFORMATION: timed out waiting for outstanding ajax calls
  Then the group name "grp1" should be listed on the webUI                                                        # WebUIUsersContext::theGroupNameShouldBeListed()
  And a notification should be displayed on the webUI with the text "Error creating group: Group already exists." # WebUIGeneralContext::aNotificationShouldBeDisplayedOnTheWebUIWithTheText()
    WebUIGeneralContext::aNotificationShouldBeDisplayedOnTheWebUIWithTheText A notification was expected to be displayed on the webUI with the text 'Error creating group: Group already exists.', but got '' instead
    Failed asserting that two strings are equal.
    --- Expected
    +++ Actual
    @@ @@
    -'Error creating group: Group already exists.'
    +''
SCENARIO RESULT: (fail)
phil-davis commented 2 years ago

This will be related to core PR https://github.com/owncloud/core/pull/40163 There is different code in core daily-master-qa tarball last night.

phil-davis commented 2 years ago

This looks like a real core code problem. If a group already exists, then the core API seems to return the message text in the response, but not inside a "data" structure. If the group name is invalid (for example, has whitespace at the start or end) then the message text comes inside a "data" structure.

They should be consistent! I will have a look. I think it needs to be fixed in core, and there needs to be an extra test scenario in core to cover this.

phil-davis commented 2 years ago

See core issue https://github.com/owncloud/core/issues/40164 - fixing that will fix this issue. Core PR https://github.com/owncloud/core/pull/40165 will fix that issue and this issue.