summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2019-06-12 14:32:15 +0200
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2019-06-12 14:32:15 +0200
commitdf8406dbae7e5d5bae77af969b0e2d25102dfbe6 (patch)
treed081d03ec9fe5bcaba62259786fb689d62d1f789 /tests
parent7382655a2c5a613cc923e9abd8142119d9de8d5c (diff)
downloadnextcloud-server-df8406dbae7e5d5bae77af969b0e2d25102dfbe6.tar.gz
nextcloud-server-df8406dbae7e5d5bae77af969b0e2d25102dfbe6.zip
Adjust acceptance tests to notifications based on toastify
The old notifications were added as ".row" elements to the "#notification-container" element; the new notifications based on toastify are added as ".toastify .on .toast..." elements to the "#content" element. Besides that, they also include a span element with an X to close the notification, so now only the first child text node should be compared to the expected message. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/acceptance/features/bootstrap/NotificationContext.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/acceptance/features/bootstrap/NotificationContext.php b/tests/acceptance/features/bootstrap/NotificationContext.php
index ac9838562e1..717de4302da 100644
--- a/tests/acceptance/features/bootstrap/NotificationContext.php
+++ b/tests/acceptance/features/bootstrap/NotificationContext.php
@@ -31,7 +31,7 @@ class NotificationContext implements Context, ActorAwareInterface {
* @return Locator
*/
public static function notificationMessage($message) {
- return Locator::forThe()->xpath("//*[@class = 'row' and normalize-space() = '$message']")->
+ return Locator::forThe()->xpath("//*[contains(concat(' ', normalize-space(@class), ' '), ' toastify ') and normalize-space(text()) = '$message']")->
descendantOf(self::notificationContainer())->
describedAs("$message notification");
}
@@ -40,7 +40,7 @@ class NotificationContext implements Context, ActorAwareInterface {
* @return Locator
*/
private static function notificationContainer() {
- return Locator::forThe()->id("notification-container")->
+ return Locator::forThe()->id("content")->
describedAs("Notification container");
}