@@ 7-35 (lines=29) @@ | ||
4 | ||
5 | use Sylius\Behat\Page\Admin\Crud\CreatePage as BaseCreatePage; |
|
6 | ||
7 | final class CreatePage extends BaseCreatePage implements CreatePageInterface |
|
8 | { |
|
9 | /** |
|
10 | * {@inheritdoc} |
|
11 | */ |
|
12 | public function setName($name) |
|
13 | { |
|
14 | $this->getSession()->getPage()->fillField('Name', $name); |
|
15 | } |
|
16 | ||
17 | /** |
|
18 | * {@inheritdoc} |
|
19 | */ |
|
20 | public function chooseContent($title) |
|
21 | { |
|
22 | $this->getSession()->getPage()->selectFieldOption('Content', $title); |
|
23 | } |
|
24 | ||
25 | /** |
|
26 | * {@inheritdoc} |
|
27 | */ |
|
28 | protected function getDefinedElements() |
|
29 | { |
|
30 | return array_merge(parent::getDefinedElements(), [ |
|
31 | 'content' => '#lakion_sylius_cms_route_content', |
|
32 | 'name' => '#lakion_sylius_cms_route_name', |
|
33 | ]); |
|
34 | } |
|
35 | } |
|
36 |
@@ 7-35 (lines=29) @@ | ||
4 | ||
5 | use Sylius\Behat\Page\Admin\Crud\CreatePage as BaseCreatePage; |
|
6 | ||
7 | class CreatePage extends BaseCreatePage implements CreatePageInterface |
|
8 | { |
|
9 | /** |
|
10 | * {@inheritdoc} |
|
11 | */ |
|
12 | public function setName($name) |
|
13 | { |
|
14 | $this->getSession()->getPage()->fillField('Name', $name); |
|
15 | } |
|
16 | ||
17 | /** |
|
18 | * {@inheritdoc} |
|
19 | */ |
|
20 | public function setBody($body) |
|
21 | { |
|
22 | $this->getSession()->getPage()->fillField('Body', $body); |
|
23 | } |
|
24 | ||
25 | /** |
|
26 | * {@inheritdoc} |
|
27 | */ |
|
28 | protected function getDefinedElements() |
|
29 | { |
|
30 | return array_merge(parent::getDefinedElements(), [ |
|
31 | 'body' => '#lakion_sylius_cms_string_block_body', |
|
32 | 'name' => '#lakion_sylius_cms_string_block_name', |
|
33 | ]); |
|
34 | } |
|
35 | } |
|
36 |