Adjust acceptance tests to notifications based on toastify (#15938)

Adjust acceptance tests to notifications based on toastify
This commit is contained in:
John Molakvoæ 2019-06-13 14:04:50 +02:00 committed by GitHub
commit b3bfae8cfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ class NotificationContext implements Context, ActorAwareInterface {
* @return Locator * @return Locator
*/ */
public static function notificationMessage($message) { 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())-> descendantOf(self::notificationContainer())->
describedAs("$message notification"); describedAs("$message notification");
} }
@ -40,7 +40,7 @@ class NotificationContext implements Context, ActorAwareInterface {
* @return Locator * @return Locator
*/ */
private static function notificationContainer() { private static function notificationContainer() {
return Locator::forThe()->id("notification-container")-> return Locator::forThe()->id("content")->
describedAs("Notification container"); describedAs("Notification container");
} }