Skip to content

Commit

Permalink
OP-321: Behat tests update
Browse files Browse the repository at this point in the history
  • Loading branch information
jkindly committed Jun 26, 2024
1 parent 36de438 commit 51d132e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/Behat/Page/Admin/Block/CreatePageInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public function fillCode(string $code): void;

public function fillName(string $name): void;

public function fillNameIfItIsEmpty(string $name): void;

public function fillLink(string $link): void;

public function fillContent(string $content): void;
Expand Down
7 changes: 7 additions & 0 deletions tests/Behat/Page/Admin/Block/UpdatePage.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ public function fillName(string $name): void
$this->getDocument()->fillField('Name', $name);
}

public function fillNameIfItIsEmpty(string $name): void
{
if (empty($this->getDocument()->findField('Name')->getValue())) {
$this->fillName($name);
}
}

public function fillLink(string $link): void
{
$this->getDocument()->fillField('Link', $link);
Expand Down
2 changes: 2 additions & 0 deletions tests/Behat/Page/Admin/Block/UpdatePageInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ interface UpdatePageInterface extends BaseUpdatePageInterface, ChecksCodeImmutab
{
public function fillName(string $name): void;

public function fillNameIfItIsEmpty(string $name): void;

public function fillLink(string $link): void;

public function fillContent(string $content): void;
Expand Down

0 comments on commit 51d132e

Please sign in to comment.