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>
This commit is contained in:
parent
7382655a2c
commit
df8406dbae
1 changed files with 2 additions and 2 deletions
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue