Skip to content

Commit b6e562f

Browse files
tomaszszopinskialbozek
authored andcommitted
[Behat] Adjusted notification assertion
1 parent 565fc08 commit b6e562f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/lib/Behat/Component/UserNotificationPopup.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ public function clickNotification(string $expectedType, string $expectedDescript
2424
continue;
2525
}
2626

27-
$description = $notification->find($this->getLocator('notificationDescription'))->getText();
27+
$notificationTitle = $this->getHTMLPage()->setTimeout(3)->find($this->getLocator('notificationDescriptionTitle'))->getText();
28+
$notificationText = $this->getHTMLPage()->setTimeout(3)->find($this->getLocator('notificationDescriptionText'))->getText();
29+
30+
$description = sprintf('%s %s', $notificationTitle, $notificationText);
31+
2832
if ($description !== $expectedDescription) {
2933
continue;
3034
}
@@ -50,8 +54,9 @@ protected function specifyLocators(): array
5054
return [
5155
new VisibleCSSLocator('notificationsPopupTitle', '.ibexa-side-panel__header'),
5256
new VisibleCSSLocator('notificationItem', '.ibexa-notifications-modal__item'),
53-
new VisibleCSSLocator('notificationType', '.ibexa-notifications-modal__type'),
54-
new VisibleCSSLocator('notificationDescription', '.ibexa-notifications-modal__description'),
57+
new VisibleCSSLocator('notificationType', '.ibexa-notifications-modal__type-content > strong > span'),
58+
new VisibleCSSLocator('notificationDescriptionTitle', '.ibexa-notifications-modal__type-content > p.description__title'),
59+
new VisibleCSSLocator('notificationDescriptionText', '.ibexa-notifications-modal__type-content > p.description__text'),
5560
];
5661
}
5762
}

0 commit comments

Comments
 (0)