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
313273c739
commit
17c3313990
12 changed files with 31 additions and 35 deletions
|
|
@ -23,9 +23,8 @@
|
|||
<parameter key="sylius.behat.context.ui.admin.managing_product_options.class">Sylius\Behat\Context\Ui\Admin\ManagingProductOptionsContext</parameter>
|
||||
<parameter key="sylius.behat.context.ui.admin.managing_promotions.class">Sylius\Behat\Context\Ui\Admin\ManagingPromotionsContext</parameter>
|
||||
<parameter key="sylius.behat.context.ui.admin.managing_shipping_methods.class">Sylius\Behat\Context\Ui\Admin\ManagingShippingMethodsContext</parameter>
|
||||
<parameter key="sylius.behat.context.ui.admin.managing_taxons.class">Sylius\Behat\Context\Ui\Admin\ManagingTaxonsContext</parameter>
|
||||
<parameter key="sylius.behat.context.ui.admin.managing_tax_category.class">Sylius\Behat\Context\Ui\Admin\ManagingTaxCategoryContext</parameter>
|
||||
<parameter key="sylius.behat.context.ui.admin.managing_tax_categories.class">Sylius\Behat\Context\Ui\Admin\ManagingTaxCategoriesContext</parameter>
|
||||
<parameter key="sylius.behat.context.ui.admin.managing_taxons.class">Sylius\Behat\Context\Ui\Admin\ManagingTaxonsContext</parameter>
|
||||
<parameter key="sylius.behat.context.ui.admin.managing_tax_rate.class">Sylius\Behat\Context\Ui\Admin\ManagingTaxRateContext</parameter>
|
||||
<parameter key="sylius.behat.context.ui.admin.managing_zones.class">Sylius\Behat\Context\Ui\Admin\ManagingZonesContext</parameter>
|
||||
|
||||
|
|
@ -130,18 +129,18 @@
|
|||
<tag name="sylius.behat.context" />
|
||||
</service>
|
||||
|
||||
<service id="sylius.behat.context.ui.admin.managing_taxons" class="%sylius.behat.context.ui.admin.managing_taxons.class%" scope="scenario">
|
||||
<argument type="service" id="sylius.behat.page.admin.taxon.create" />
|
||||
<argument type="service" id="sylius.behat.page.admin.taxon.update" />
|
||||
<service id="sylius.behat.context.ui.admin.managing_tax_categories" class="%sylius.behat.context.ui.admin.managing_tax_categories.class%" scope="scenario">
|
||||
<argument type="service" id="sylius.behat.page.admin.tax_category.index" />
|
||||
<argument type="service" id="sylius.behat.page.admin.tax_category.create" />
|
||||
<argument type="service" id="sylius.behat.page.admin.tax_category.update" />
|
||||
<argument type="service" id="sylius.behat.current_page_resolver" />
|
||||
<argument type="service" id="sylius.behat.notification_checker" />
|
||||
<tag name="sylius.behat.context" />
|
||||
</service>
|
||||
|
||||
<service id="sylius.behat.context.ui.admin.managing_tax_categories" class="%sylius.behat.context.ui.admin.managing_tax_categories.class%" scope="scenario">
|
||||
<argument type="service" id="sylius.behat.page.admin.tax_category.index" />
|
||||
<argument type="service" id="sylius.behat.page.admin.tax_category.create" />
|
||||
<argument type="service" id="sylius.behat.page.admin.tax_category.update" />
|
||||
<service id="sylius.behat.context.ui.admin.managing_taxons" class="%sylius.behat.context.ui.admin.managing_taxons.class%" scope="scenario">
|
||||
<argument type="service" id="sylius.behat.page.admin.taxon.create" />
|
||||
<argument type="service" id="sylius.behat.page.admin.taxon.update" />
|
||||
<argument type="service" id="sylius.behat.current_page_resolver" />
|
||||
<argument type="service" id="sylius.behat.notification_checker" />
|
||||
<tag name="sylius.behat.context" />
|
||||
|
|
|
|||
|
|
@ -5,8 +5,7 @@ Feature: Adding a new taxon
|
|||
I want to add a new taxon to the registry
|
||||
|
||||
Background:
|
||||
Given the store operates on a single channel in "France"
|
||||
And I am logged in as an administrator
|
||||
Given I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
Scenario: Adding a new taxon
|
||||
|
|
@ -30,7 +29,7 @@ Feature: Adding a new taxon
|
|||
|
||||
@ui
|
||||
Scenario: Adding a new taxon with parent taxon
|
||||
Given the store classifies its products as "Category"
|
||||
Given the store has "Category" taxonomy
|
||||
And I want to create a new taxon
|
||||
When I specify its code as "stickers"
|
||||
And I name it "Stickers" in "English (United States)"
|
||||
|
|
|
|||
|
|
@ -5,8 +5,7 @@ Feature: Browsing taxons
|
|||
I want to browse taxons
|
||||
|
||||
Background:
|
||||
Given the store operates on a single channel in "France"
|
||||
And the store classifies its products as "T-Shirts" and "Accessories"
|
||||
Given the store classifies its products as "T-Shirts" and "Accessories"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
|
|
|
|||
|
|
@ -5,12 +5,11 @@ Feature: Deleting a taxon
|
|||
I want to be able to delete a taxon
|
||||
|
||||
Background:
|
||||
Given the store operates on a single channel in "France"
|
||||
And the store classifies its products as "T-Shirts"
|
||||
And I am logged in as an administrator
|
||||
Given I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
Scenario: Deleted taxon should disappear from the registry
|
||||
Given the store classifies its products as "T-Shirts"
|
||||
When I delete taxon named "T-Shirts"
|
||||
Then I should be notified that it has been successfully deleted
|
||||
And the taxon named "T-Shirts" should no longer exist in the registry
|
||||
|
|
|
|||
|
|
@ -5,8 +5,7 @@ Feature: Editing a taxon
|
|||
I want to be able to edit a taxon
|
||||
|
||||
Background:
|
||||
Given the store operates on a single channel in "France"
|
||||
And the store classifies its products as "T-Shirts" and "Accessories"
|
||||
Given the store classifies its products as "T-Shirts" and "Accessories"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ final class TaxonomyContext implements Context
|
|||
}
|
||||
|
||||
/**
|
||||
* @Given the store has :firstTaxonName taxonomy
|
||||
* @Given the store classifies its products as :firstTaxonName
|
||||
* @Given the store classifies its products as :firstTaxonName and :secondTaxonName
|
||||
* @Given the store classifies its products as :firstTaxonName, :secondTaxonName and :thirdTaxonName
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ final class ManagingTaxonsContext implements Context
|
|||
/**
|
||||
* @Then I should be notified that it has been successfully edited
|
||||
*/
|
||||
public function iShouldBeNotifiedAboutSuccessfulEdition()
|
||||
public function iShouldBeNotifiedThatItHasBeenSuccessfullyEdited()
|
||||
{
|
||||
$this->notificationChecker->checkEditionNotification(self::RESOURCE_NAME);
|
||||
}
|
||||
|
|
@ -228,7 +228,7 @@ final class ManagingTaxonsContext implements Context
|
|||
$this->updatePage->open(['id' => $taxon->getId()]);
|
||||
Assert::true(
|
||||
$this->updatePage->hasResourceValues(['code' => $taxon->getCode()]),
|
||||
sprintf('Taxon %s should be in the registry', $taxon->getName())
|
||||
sprintf('Taxon %s should be in the registry.', $taxon->getName())
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -239,18 +239,18 @@ final class ManagingTaxonsContext implements Context
|
|||
{
|
||||
Assert::true(
|
||||
$this->updatePage->hasResourceValues([$element => $value]),
|
||||
sprintf('Taxon with %s should have %s value', $element, $value)
|
||||
sprintf('Taxon with %s should have %s value.', $element, $value)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the code field should be disabled
|
||||
*/
|
||||
public function theCodeFiledShouldBeDisabled()
|
||||
public function theCodeFieldShouldBeDisabled()
|
||||
{
|
||||
Assert::true(
|
||||
$this->updatePage->isCodeDisabled(),
|
||||
'Code field should be disabled but it is not'
|
||||
'Code field should be disabled but it is not.'
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -261,7 +261,7 @@ final class ManagingTaxonsContext implements Context
|
|||
{
|
||||
Assert::true(
|
||||
$this->updatePage->hasResourceValues(['parent' => $taxon->getId()]),
|
||||
sprintf('Current taxon should have %s parent taxon', $taxon->getName())
|
||||
sprintf('Current taxon should have %s parent taxon.', $taxon->getName())
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -311,21 +311,21 @@ final class ManagingTaxonsContext implements Context
|
|||
Assert::eq(
|
||||
0,
|
||||
$this->createPage->countTaxonsByName($name),
|
||||
sprintf('Taxon %s should not exist', $name)
|
||||
sprintf('Taxon %s should not exist.', $name)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^I should see (\d+) taxons on the list$/
|
||||
*/
|
||||
public function iShouldSeeZonesInTheList($number)
|
||||
public function iShouldSeeTaxonsInTheList($number)
|
||||
{
|
||||
$taxonsOnPage = $this->createPage->countTaxons();
|
||||
|
||||
Assert::eq(
|
||||
$number,
|
||||
$taxonsOnPage,
|
||||
sprintf('On list should be %d taxons but get %d', $number, $taxonsOnPage)
|
||||
sprintf('On list should be %d taxons but get %d.', $number, $taxonsOnPage)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -337,7 +337,7 @@ final class ManagingTaxonsContext implements Context
|
|||
Assert::eq(
|
||||
1,
|
||||
$this->createPage->countTaxonsByName($name),
|
||||
sprintf('Taxon %s does not exist', $name)
|
||||
sprintf('Taxon %s does not exist or multiple taxons with this name exist.', $name)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,6 +70,8 @@ class CreatePage extends BaseCreatePage implements CreatePageInterface
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
throw new ElementNotFoundException($this->getDriver(), 'Delete button');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ sylius_admin_taxon_index:
|
|||
_controller: sylius.controller.taxon:indexAction
|
||||
_sylius:
|
||||
template: SyliusAdminBundle:Taxon:index.html.twig
|
||||
section: admin
|
||||
repository:
|
||||
method: findRootNodes
|
||||
host: "localhost"
|
||||
|
|
@ -33,6 +32,9 @@ sylius_admin_taxon_create:
|
|||
_sylius:
|
||||
template: SyliusAdminBundle:Taxon:create.html.twig
|
||||
section: admin
|
||||
redirect:
|
||||
route: sylius_admin_taxon_update
|
||||
parameters: { id: resource.id }
|
||||
vars:
|
||||
templates:
|
||||
form: SyliusAdminBundle:Taxon:_form.html.twig
|
||||
|
|
|
|||
|
|
@ -13,9 +13,6 @@
|
|||
<div class="header">{{ taxon.name }}</div>
|
||||
{{ buttons.delete(path('sylius_admin_taxon_delete', { 'id': taxon.id }), 'sylius.ui.delete'|trans) }}
|
||||
{{ buttons.edit(path('sylius_admin_taxon_update', { 'id': taxon.id })) }}
|
||||
{% if not taxon.description %}
|
||||
<div class="description">{{ taxon.description }}</div>
|
||||
{% endif %}
|
||||
<div class="list">
|
||||
{{ _self.renderLeaf(taxon.children) }}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -59,7 +59,6 @@ sylius:
|
|||
manage_product_option: Manage product option
|
||||
manage_shipping_destinations: Manage shipping destinations
|
||||
manage_taxons: Manage taxons of your products
|
||||
manage_taxation_of_your_products: Manage taxation of your products
|
||||
manage_shipping_methods_for_your_store: Manage shipping methods for your store
|
||||
manage_taxation_of_your_products: Manage taxation of your products
|
||||
new: New
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue