-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Admin][Province] Managing country with provinces #4689
[Admin][Province] Managing country with provinces #4689
Conversation
|
||
@ui @javascript | ||
Scenario: Adding province to existing country | ||
Given I want to edit this country |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given I want to edit the country "United Kingdom"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why cannot I use this country
in this step?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because regarding the scope of the scenario we do not know which country it is. Even though there is only one defined in the shop by that I am forcing the reader to go back and read the background.
IMHO using the country's name is a whole lot more readable and we are really taking care of it in the new Behats. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not agree, IMO this is readable to the same extent as using country's name. This feature is using in every scenarios only one country and writing this country
is more natural for me than using in every step country's name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please have a look at for instance the already merged editing_tax_category.feature
, editing_tax_rate.feature
or editing_locale.feature
. All of the use the convention I've suggested.
@pjedrzejewski @michalmarcinkowski ?
You can tag the scenarios that are not yet implemented with a |
I want to be able to edit a country and its provinces | ||
|
||
Background: | ||
Given I am logged in as an administrator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This steps should be swapped. I am logged in as an administrator
should be always written as a last one.
5281de3
to
727e2d8
Compare
@@ -0,0 +1,26 @@ | |||
@addressing | |||
Feature: Editing country with provinces |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is misleading to name it Editing country with provinces
. IMHO it should something like Managing provinces of a country
? Or if you are convinced, that it should be a part of editing it should be placed under editing_country.feature
82090dd
to
65c3b1f
Compare
@@ -60,6 +60,8 @@ before_script: | |||
- app/console assets:install --env=test_cached --no-debug | |||
- app/console assetic:dump --env=test_cached --no-debug | |||
|
|||
- npm install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be executed in install
section (just as Composer install).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also node_modules
should be able to be added to cached directories.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes from #4499 on which this PR based on
65c3b1f
to
4bc9fa6
Compare
<argument type="service" id="sylius.factory.country" container="symfony" /> | ||
<argument type="service" id="sylius.repository.country" container="symfony" /> | ||
<argument type="service" id="sylius.converter.country_name" container="symfony" /> | ||
<argument type="service" id="sylius.behat.shared_storage" container="symfony" /> | ||
<argument type="service" id="sylius.factory.province" container="symfony" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest to put factories together
ae54a99
to
f836b9b
Compare
$this->countryIndexPage->isResourceOnPage(['code' => $country->getCode()]), | ||
sprintf('Country %s should exist but it does not', $country->getCode()) | ||
$this->countryUpdatePage->isOpen(['id' => $country->getId()]), | ||
sprintf('Country %s does not appear in the store.', $country->getCode()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was wrong with previous implementation? We agreed to check existence on index page.
ce63581
to
f426ded
Compare
…in existing country
f426ded
to
8beb0e3
Compare
Thanks Grzesiu! 👍 |
Based on #4499