Skip to content
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] Locale unique code validation feature #4610

Merged
merged 3 commits into from
Mar 29, 2016

Conversation

Arminek
Copy link
Contributor

@Arminek Arminek commented Mar 23, 2016

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Related tickets
License MIT

Based on #4594

@@ -5,12 +5,11 @@ Feature: Locale unique code validation
I want to be prevented from adding a locale with an existing code

Background:
Given the store is available in the Norwegian language
Given the store has locale "Norwegian"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was wrong with the previous step? :)

@pjedrzejewski pjedrzejewski added the Admin AdminBundle related issues and PRs. label Mar 24, 2016
*/
public function iShouldNotBeAbleToChoose($name)
{
expect($this->createPage)->toThrow(ElementNotFoundException::class)->during('chooseName', [$name]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We agreed to replace expect and catching exception with Assert and dedicated method on page that checks isSelectOptionAvailable or smth similar.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isOptionAvailable ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

When I choose Norwegian
And I try to add it
Then I should be notified that it is not possible
Given I want to create a new locale
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to create add a new?

@Arminek Arminek force-pushed the validating-locale branch 2 times, most recently from bf395a9 to 24a9a03 Compare March 29, 2016 08:55
@lchrusciel
Copy link
Member

👍

@@ -66,6 +66,7 @@ public function __construct(

/**
* @Given I want to create a new locale
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be removed and the below step should be used everywhere. Task for a separate PR.

@pjedrzejewski pjedrzejewski merged commit fca6c67 into Sylius:master Mar 29, 2016
@pjedrzejewski
Copy link
Member

Thanks Arek!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Admin AdminBundle related issues and PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants