File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 1414use Ibexa \AdminUi \Behat \Component \Table \TableBuilder ;
1515use Ibexa \AdminUi \Behat \Component \Table \TableInterface ;
1616use Ibexa \Behat \Browser \Element \Criterion \ChildElementTextCriterion ;
17- use Ibexa \Behat \Browser \Element \Criterion \ElementAttributeCriterion ;
1817use Ibexa \Behat \Browser \Locator \VisibleCSSLocator ;
1918use Ibexa \Behat \Browser \Page \Page ;
2019use 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
You can’t perform that action at this time.
0 commit comments