Repository navigation
Move notifications context API steps used by core into core - #31665
Conversation
|
1st commit removes the need for core API acceptance tests to load 2nd commit does the same for the core webUI acceptance tests related to notifications. 3rd commit gets rid of some unneeded notifications app enabling in the drone yml code. 4th commit tags the features that need the notifications app with: So anything that cares can easily run (or not) scenarios that use/need the notifications app. In future we can tag other stuff like: And you can always avoid running any scenario that needs an extra app installed, by doing Purposely generating "dummy" notifications for testing is just the responsibility of the notifications app test code, and so that stays where it is now. |
Codecov Report
@@ Coverage Diff @@
## master #31665 +/- ##
=========================================
Coverage 62.89% 62.89%
Complexity 18418 18418
=========================================
Files 1154 1154
Lines 69157 69157
Branches 1260 1260
=========================================
Hits 43499 43499
Misses 25289 25289
Partials 369 369
Continue to review full report at Codecov.
|
140e908 to
94dc31b
Compare
d17223b to
77c3402
Compare
77c3402 to
d1b18fd
Compare
|
This should let us, in
@patrickjahns @DeepDiver1975 @PVince81 - anyone like to approve and this can be merged to get in the overnight build? |
|
Note: backport needs to be added to Accept user share stable10 #31613 |
| require_once 'bootstrap.php'; | ||
|
|
||
| /** | ||
| * Defines application features from the specific context. |
There was a problem hiding this comment.
what does this essentially mean?
There was a problem hiding this comment.
Cut and paste from ``NotificationsContext``` in notifications app. I guess someone wrote this so as to have text in the docblock to pass a code style checker :)
| * @author Joas Schilling <[email protected]> | ||
| * @author Thomas Müller <[email protected]> | ||
| * | ||
| * @copyright Copyright (c) 2016, ownCloud, Inc. |
There was a problem hiding this comment.
missing you as author?
There was a problem hiding this comment.
The code is cut from ``NotificationsContext``` in notifications app. These were the authors there. I have no idea who wrote which functions... so am preserving what was in the header.
| } | ||
|
|
||
| /** | ||
| * @When /^the user reacts with "(Accept|Decline)" to all notifications on the webUI$/ |
There was a problem hiding this comment.
isn't that more related to accepting/rejecting shares?
meaning - while it is done in the notification ui part - the accepting/rejecting is a function of the sharing app?
There was a problem hiding this comment.
This whole file is copied as-is from notifications app (all the functions were needed by core).
I agree, the words could have "sharing" somewhere - e.g.
the user reacts with "(Accept|Decline)" to all sharing notifications on the webUI
and the step itself could live in a Sharing Context (but it needs both sharing and notifications together to be functional).
Anyway, this refactoring was about moving existing code. We can review the content of existing code any time we like.
|
Backported commits to #31613 and that is now merged to |
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
NotificationsCoreContextthat has the relevant step code for examining notifications through its API.WebUINotificationsContextinto core - all the code there was relevant to testing behavior from core or from other apps.WebUINotificationsContextdo its thing.behat.ymlandbootstrap.phpso they do not try to look inside the notifications app for acceptance test code.Related Issue
Motivation and Context
Acceptance test code (scenario steps...) that is needed/used by core acceptance test scenarios needs to be in core. In this case, move relevant scenario steps (and related page objects that define the webUI elements) out of the notifications app and into core, so they can be used by core or any other app, without that app having to find a way to get hold of
NotificationsContext... from somewhere inside the notifications app.After this change, other apps can just enable or disable the notifications app and then can use any of the acceptance test steps in core to examine the behavior of their app when it produces notifications.
How Has This Been Tested?
Types of changes
Checklist: