mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 09:02:12 +00:00
Review fixes
This commit is contained in:
parent
31b3aa1640
commit
27e527118f
2 changed files with 11 additions and 5 deletions
|
|
@ -7,9 +7,8 @@ Feature: Deleting a taxon
|
||||||
Background:
|
Background:
|
||||||
Given I am logged in as an administrator
|
Given I am logged in as an administrator
|
||||||
|
|
||||||
@ui
|
@ui @javascript
|
||||||
Scenario: Deleted taxon should disappear from the registry
|
Scenario: Deleted taxon should disappear from the registry
|
||||||
Given the store classifies its products as "T-Shirts"
|
Given the store classifies its products as "T-Shirts"
|
||||||
When I delete taxon named "T-Shirts"
|
When I delete taxon named "T-Shirts"
|
||||||
Then I should be notified that it has been successfully deleted
|
Then the taxon named "T-Shirts" should no longer exist in the registry
|
||||||
And the taxon named "T-Shirts" should no longer exist in the registry
|
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ class CreatePage extends BaseCreatePage implements CreatePageInterface
|
||||||
$matchedLeafsCounter = 0;
|
$matchedLeafsCounter = 0;
|
||||||
$leafs = $this->getLeafs();
|
$leafs = $this->getLeafs();
|
||||||
foreach ($leafs as $leaf) {
|
foreach ($leafs as $leaf) {
|
||||||
if ($leaf->getText() === $name) {
|
if (strpos($leaf->getText(), $name) !== false) {
|
||||||
$matchedLeafsCounter++;
|
$matchedLeafsCounter++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -65,7 +65,14 @@ class CreatePage extends BaseCreatePage implements CreatePageInterface
|
||||||
$leafs = $this->getLeafs();
|
$leafs = $this->getLeafs();
|
||||||
foreach ($leafs as $leaf) {
|
foreach ($leafs as $leaf) {
|
||||||
if ($leaf->getText() === $name) {
|
if ($leaf->getText() === $name) {
|
||||||
$leaf->getParent()->find('css', '.ui.red.button')->press();
|
$leaf = $leaf->getParent();
|
||||||
|
$menuButton = $leaf->find('css', '.wrench');
|
||||||
|
$menuButton->click();
|
||||||
|
$deleteButton = $leaf->find('css', '.sylius-delete-resource');
|
||||||
|
$deleteButton->click();
|
||||||
|
$deleteButton->waitFor(5, function () use ($name) {
|
||||||
|
return $this->getFirstLeafName() !== $name;
|
||||||
|
});
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue