owncloud / testing

🔧 app for testing ownCloud
GNU Affero General Public License v3.0
3 stars 4 forks source link

Fix failing notifications test #103

Closed phil-davis closed 5 years ago

phil-davis commented 5 years ago

The last 2 nights e.g. https://drone.owncloud.com/owncloud/testing/543/109

--- Failed scenarios:

    /var/www/owncloud/apps/testing/tests/acceptance/features/apiTestingApp/notifications.feature:31

50 scenarios (49 passed, 1 failed)
358 steps (356 passed, 1 failed, 1 skipped)
9m32.70s (15.06Mb)
  Scenario Outline: Testing app can create notifications for user                                  # /var/www/owncloud/apps/testing/tests/acceptance/features/apiTestingApp/notifications.feature:11
    Given using OCS API version "<ocs-api-version>"                                                # FeatureContext::usingOcsApiVersion()
    When the administrator creates a notification with the following details using the testing API # TestingAppContext::theAdministratorCreatesANotification()
      | key         | value                      |
      | subject     | lorem_subject              |
      | message     | lorem_message              |
      | user        | user0                      |
      | object_type | local_share                |
      | link        | www.lorem-notification.com |
      | object_id   | 47                         |
    Then user "user0" should have 1 notifications                                                  # NotificationsCoreContext::userNumNotifications()
    And the last notification of user "user0" should match these regular expressions               # NotificationsCoreContext::matchNotificationRegularExpression()
      | subject     | /^lorem_subject$/              |
      | message     | /^lorem_message$/              |
      | link        | /^www.lorem-notification.com$/ |
      | object_type | /^local_share$/                |
      | object_id   | /^47$/                         |

    Examples:
      | ocs-api-version |
      | 1               |
      | 2               |
        Failed asserting that actual size 2 matches expected size 1.
phil-davis commented 5 years ago

It seems that something has gone wrong with the cleanup of existing notifications at the end/beginning of scenarios.