Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5601 from pamil/context/locale-selector
Make locales switchable by user & dependent on current channel
- Loading branch information
Showing
84 changed files
with
1,645 additions
and
872 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
features/locale/handling_different_locales_on_multiple_channels.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
@locales | ||
Feature: Handling different locales on multiple channels | ||
In order to see right prices | ||
As a Customer | ||
I want to browse channels with a valid locale only | ||
|
||
Background: | ||
Given the store operates on a channel named "Web" | ||
And that channel allows to shop using "English (United States)", "Polish (Poland)" and "Norwegian (Norway)" locales | ||
And it uses the "English (United States)" locale by default | ||
And the store operates on another channel named "Mobile" | ||
And that channel allows to shop using "Polish (Poland)" and "Norwegian (Norway)" locales | ||
And it uses the "Polish (Poland)" locale by default | ||
|
||
@ui | ||
Scenario: Showing locales only from the current channel | ||
When I browse the "Mobile" channel | ||
Then I should shop using the "Polish (Poland)" locale | ||
And I should be able to shop using the "Norwegian (Norway)" locale | ||
And I should not be able to shop using the "English (United States)" locale | ||
|
||
@ui | ||
Scenario: Browsing channels using their default locales | ||
When I browse the "Web" channel | ||
And I start browsing the "Mobile" channel | ||
Then I should shop using the "Polish (Poland)" locale | ||
|
||
@ui | ||
Scenario: Switching a locale applies only to the current channel | ||
When I browse the "Web" channel | ||
And I switch to the "Norwegian (Norway)" locale | ||
And I start browsing the "Mobile" channel | ||
Then I should still shop using the "Polish (Poland)" locale |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
@locales | ||
Feature: Handling disabled locales | ||
In order to see right prices | ||
As a Customer | ||
I want to browse channels with a valid locale only | ||
|
||
Background: | ||
Given the store operates on a channel named "Web" | ||
And that channel allows to shop using "English (United States)", "Polish (Poland)" and "Norwegian (Norway)" locales | ||
And it uses the "English (United States)" locale by default | ||
|
||
@ui | ||
Scenario: Not showing the disabled locale | ||
Given the locale "Norwegian (Norway)" is disabled | ||
When I browse that channel | ||
Then I should not be able to shop using the "Norwegian (Norway)" locale | ||
|
||
@ui | ||
Scenario: Failing to browse channel with disabled default locale | ||
Given the locale "English (United States)" is disabled as well | ||
When I try to browse that channel | ||
Then I should not be able to shop | ||
|
||
@ui | ||
Scenario: Falling back to the default locale if selected one is not available | ||
Given I am browsing that channel | ||
And I switch to the "Polish (Poland)" locale | ||
When the locale "Polish (Poland)" gets disabled | ||
Then I should shop using the "English (United States)" locale | ||
And I should not be able to shop using the "Polish (Poland)" locale | ||
|
||
@ui | ||
Scenario: Browsing a channel with the default locale disabled while using the other one | ||
Given I am browsing that channel | ||
And I switch to the "Polish (Poland)" locale | ||
When the locale "English (United States)" gets disabled | ||
Then I should still shop using the "Polish (Poland)" locale | ||
And I should not be able to shop using the "English (United States)" locale |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
@locales | ||
Feature: Switching the current locale | ||
In order to see prices in my preferred locale | ||
As a Customer | ||
I want to be able to switch locales | ||
|
||
Background: | ||
Given the store operates on a channel named "Web" | ||
And that channel allows to shop using "English (United States)" and "Polish (Poland)" locales | ||
And it uses the "English (United States)" locale by default | ||
|
||
@ui | ||
Scenario: Showing the current locale | ||
When I browse that channel | ||
Then I should shop using the "English (United States)" locale | ||
|
||
@ui | ||
Scenario: Showing available locales | ||
When I browse that channel | ||
Then I should be able to shop using the "Polish (Poland)" locale | ||
|
||
@ui | ||
Scenario: Switching the current locale | ||
When I browse that channel | ||
And I switch to the "Polish (Poland)" locale | ||
Then I should shop using the "Polish (Poland)" locale | ||
And I should be able to shop using the "English (United States)" locale |
Oops, something went wrong.