-
Notifications
You must be signed in to change notification settings - Fork 61
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 #250 from BitBagCommerce/feature/op-185-restrict-w…
…ishlist-access-for-logged-users OP-185/Restrict wishlist access for logged users
- Loading branch information
Showing
6 changed files
with
119 additions
and
3 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
features/restricting_access_to_other_user_wishlist.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,22 @@ | ||
@wishlist | ||
Feature: Restricting access to other's user wishlist | ||
In order to restrict access to other users wishlists | ||
As a System | ||
I want to be able to restrict access to other users wishlists | ||
|
||
Background: | ||
Given the store operates on a single channel in "United States" | ||
And there is a customer account "[email protected]" | ||
And there is a customer account "[email protected]" | ||
And user "[email protected]" has a wishlist named "Wishlist1" with token "123456token" | ||
And user "[email protected]" has a wishlist named "Wishlist2" with token "123456token" | ||
|
||
@ui | ||
Scenario: Restricting access to other users wishlist | ||
When I go to "/" | ||
And I log in as "[email protected]" | ||
And I go to "/wishlists" | ||
Then I should have 1 wishlists | ||
When I try to access "[email protected]" wishlist "Wishlist2" | ||
Then I should still be on wishlist index page | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
/* | ||
* This file has been created by developers from BitBag. | ||
* Feel free to contact us once you face any issues or want to start | ||
* You can find more information about us on https://bitbag.io and write us | ||
* an email on [email protected]. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Tests\BitBag\SyliusWishlistPlugin\Behat\Page\Shop\Wishlist; | ||
|
||
use FriendsOfBehat\PageObjectExtension\Page\SymfonyPage; | ||
|
||
final class IndexPage extends SymfonyPage implements IndexPageInterface | ||
{ | ||
public function getRouteName(): string | ||
{ | ||
return 'bitbag_sylius_wishlist_plugin_shop_locale_wishlist_list_wishlists'; | ||
} | ||
} |
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,18 @@ | ||
<?php | ||
|
||
/* | ||
* This file has been created by developers from BitBag. | ||
* Feel free to contact us once you face any issues or want to start | ||
* You can find more information about us on https://bitbag.io and write us | ||
* an email on [email protected]. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Tests\BitBag\SyliusWishlistPlugin\Behat\Page\Shop\Wishlist; | ||
|
||
use FriendsOfBehat\PageObjectExtension\Page\SymfonyPageInterface; | ||
|
||
interface IndexPageInterface extends SymfonyPageInterface | ||
{ | ||
} |
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