Skip to content

Commit ddcf929

Browse files
Fix after CR
1 parent de24e5e commit ddcf929

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/lib/Behat/Page/NotificationsViewAllPage.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use Ibexa\AdminUi\Behat\Component\Table\TableBuilder;
1515
use Ibexa\AdminUi\Behat\Component\Table\TableInterface;
1616
use Ibexa\Behat\Browser\Element\Criterion\ChildElementTextCriterion;
17-
use Ibexa\Behat\Browser\Element\Criterion\ElementAttributeCriterion;
1817
use Ibexa\Behat\Browser\Locator\VisibleCSSLocator;
1918
use Ibexa\Behat\Browser\Page\Page;
2019
use Ibexa\Behat\Browser\Routing\Router;
@@ -79,8 +78,15 @@ public function assertEmptyStateVisible(): void
7978

8079
public function verifyNotificationsCount(int $expectedCount): void
8180
{
82-
$this->getHTMLPage()->setTimeout(10)->findAll($this->getLocator('notificationsTotalCount'))
83-
->getByCriterion(new ElementAttributeCriterion('data-notifications-total', (string)$expectedCount))->assert()->isVisible();
81+
$actualCount = $this->getHTMLPage()->setTimeout(5)->find($this->getLocator('notificationsTotalCount'))->getAttribute('data-notifications-total');
82+
83+
if ($actualCount !== (string)$expectedCount) {
84+
throw new \Exception(sprintf(
85+
'Expected notification count %d, but got %s.',
86+
$expectedCount,
87+
$actualCount
88+
));
89+
}
8490
}
8591

8692
public function verifyIsLoaded(): void

0 commit comments

Comments
 (0)