Skip to content

Commit 7705326

Browse files
Code cleanup and naming improvments
1 parent b8fce92 commit 7705326

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

src/lib/Behat/BrowserContext/UserNotificationContext.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function noNotificationAppearsWithDetails(TableNode $notificationDetails)
8585
/**
8686
* @When I open notification menu with description :description
8787
*/
88-
public function iOpenNotificationMenuNotification(string $description): void
88+
public function iOpenNotificationMenu(string $description): void
8989
{
9090
$this->userNotificationPopup->openNotificationMenu($description);
9191
}
@@ -152,9 +152,9 @@ public function thereIsNoNotificationOnList(string $notificationTitle): void
152152
}
153153

154154
/**
155-
* @When I marked as unread notification with title :notificationTitle
155+
* @When I mark notification as unread with title :notificationTitle
156156
*/
157-
public function iMarkedNotificationAsUnread(string $notificationTitle): void
157+
public function iMarkNotificationAsUnread(string $notificationTitle): void
158158
{
159159
$this->notificationsPage->markAsUnread($notificationTitle);
160160
}
@@ -176,7 +176,7 @@ public function iGoToContent(string $notificationTitle): void
176176
}
177177

178178
/**
179-
* @When I deleted notification with title :notificationTitle
179+
* @When I delete notification with title :notificationTitle
180180
*/
181181
public function iDeleteNotification(string $notificationTitle): void
182182
{

src/lib/Behat/Page/NotificationsPage.php

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ final class NotificationsPage extends Page
2121
{
2222
private TableInterface $table;
2323

24-
/** @var \Ibexa\AdminUi\Behat\Component\Dialog */
25-
private $dialog;
24+
private Dialog $dialog;
2625

2726
public function __construct(
2827
Session $session,
@@ -71,13 +70,11 @@ public function deleteNotification(string $notificationTitle): void
7170
$this->dialog->confirm();
7271
}
7372

74-
public function getStatusForNotification(string $notificationStatus): string
73+
public function getStatusForNotification(string $notificationTitle): string
7574
{
76-
return $this->getHTMLPage()
77-
->findAll($this->getLocator('tableRow'))
78-
->getByCriterion(new ChildElementTextCriterion($this->getLocator('rowName'), $notificationStatus))
79-
->find($this->getLocator('rowStatus'))
80-
->getText();
75+
return $this->getHTMLPage()->findAll($this->getLocator('tableRow'))
76+
->getByCriterion(new ChildElementTextCriterion($this->getLocator('rowName'), $notificationTitle))
77+
->find($this->getLocator('rowStatus'))->getText();
8178
}
8279

8380
public function verifyIsLoaded(): void

0 commit comments

Comments
 (0)