generated from Sylius/PluginSkeleton
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OP-237 - write behat tests, mock api responses, create examples of re…
…nderers
- Loading branch information
1 parent
bbd2147
commit 254ffc9
Showing
46 changed files
with
1,585 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
@sulu_cache | ||
Feature: Caching sulu page request | ||
In order to see again some page | ||
As a Visitor | ||
I want to be able to see the page without sending request to sulu | ||
|
||
Background: | ||
Given the store operates on a single channel in "United States" | ||
And Sulu has defined page "blog_page_with_blocks_and_links" in locale "en_US" | ||
And Cache for sulu not exists | ||
|
||
|
||
@ui | ||
Scenario: See the featured pages on homepage | ||
When I visit this channel's homepage | ||
And "United States" has enabled sulu localized requests | ||
Then Sulu cache should not exists | ||
And I visit a sulu page "blog_page_with_blocks_and_links" in locale en_US | ||
And Sulu cache should exists for "United States" with locale en_US | ||
|
||
@ui | ||
Scenario: Manually clear cache when localized urls are disabled | ||
When I visit a sulu page "blog_page_with_blocks_and_links" in locale en_US | ||
Then Sulu cache should exists | ||
And I am logged in as an administrator | ||
And I browse channels | ||
And I should see button "Purge sulu cache" in "United States" | ||
And I click "Clear Cache" button in "United States" | ||
And I should see success "Successfully purged" flash message | ||
And Sulu cache should exists for "United States" with locale en_US | ||
|
||
@ui | ||
Scenario: Manually clear cache when localized urls are enabled | ||
When "United States" has enabled sulu localized requests | ||
And I visit a sulu page "blog_page_with_blocks_and_links" in locale en_US | ||
Then Sulu cache should exists | ||
And I am logged in as an administrator | ||
And I browse channels | ||
And I should see expanded button "Purge sulu cache" in "United States" | ||
And I click expanded "en_US" button in "United States" | ||
And I should see success "Successfully purged" flash message | ||
And Sulu cache should exists for "United States" with locale en_US | ||
|
||
@ui | ||
Scenario: Manually clear cache when localized urls are disabled and cache not exists | ||
When I am logged in as an administrator | ||
And I browse channels | ||
Then I should see button "Purge sulu cache" in "United States" | ||
And I click "Purge sulu cache" button in "United States" | ||
And I should see error "Dir with sulu cache not found" flash message |
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 @@ | ||
@render_sulu_page | ||
Feature: Render sulu page | ||
In order to see a sulu page | ||
As a Visitor | ||
I want to be able to see rendered sulu page | ||
|
||
Background: | ||
Given the store operates on a single channel in "United States" | ||
And Sulu has defined page "blog_page_with_properties" in locale "en_US" | ||
And Sulu has defined page "blog_page_with_blocks_and_links" in locale "en_US" | ||
And Page "blog_page_with_blocks_and_links" has block "quote" | ||
And Page "blog_page_with_blocks_and_links" has block "text" | ||
And Page "blog_page_with_blocks_and_links" has block "image" | ||
|
||
@ui | ||
Scenario: Rendering a sulu page with properties | ||
When I visit a sulu page "blog_page_with_properties" in locale en_US | ||
Then I should see a "title" with value "E-commerce trends" | ||
And I should see a "content" with value "CONTENT" | ||
|
||
@ui | ||
Scenario: Rendering a sulu page with properties and blocks | ||
When I visit a sulu page "blog_page_with_blocks_and_links" in locale en_US | ||
Then I should see a "title" with value "E-commerce trends" | ||
And I should see a block "content" with value "2021 was followed by the time of the 2020 pandemic. During these two years, a lot has changed..." | ||
And I should see a block image with url "https://en.wikipedia.org/wiki/Cat#/media/File:Sheba1.JPG" | ||
And I should see a block "quote" with value "Lorem ipsum dolor sit amet, con" |
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,20 @@ | ||
@sulu_page | ||
Feature: Show featured pages on homepage | ||
In order to see featured pages on homepage | ||
As a Visitor | ||
I want to be able to see featured pages on homepage | ||
|
||
Background: | ||
Given the store operates on a single channel in "United States" | ||
And Sulu has defined featured pages list featured_pages in locale en_US | ||
And One of the featured page is page "Blog Page 1" | ||
And One of the featured page is page "Blog Page 2" | ||
And One of the featured page is page "Blog Page 3" | ||
|
||
@ui | ||
Scenario: See the featured pages on homepage | ||
When I visit this channel's homepage | ||
Then I should see 3 featured pages. | ||
And I should see featured page "Blog Page 1" | ||
And I should see featured page "Blog Page 2" | ||
And I should see featured page "Blog Page 3" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<doctrine-mapping | ||
xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping | ||
http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd" | ||
> | ||
<entity name="Tests\BitBag\SyliusSuluPlugin\Application\src\Entity\Channel\Channel" table="sylius_channel"> | ||
<field name="suluUseLocalizedUrls" column="sulu_use_localized_url" type="boolean"/> | ||
</entity> | ||
</doctrine-mapping> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
sylius_admin: | ||
resource: "@SyliusAdminBundle/Resources/config/routing.yml" | ||
prefix: /admin | ||
|
||
bitbag_purge_sulu_cache_for_channel: | ||
path: /invalidate-sulu-cache/{id}/{locale} | ||
methods: [GET] | ||
prefix: /admin | ||
defaults: | ||
locale: '' | ||
_controller: bitbag.sylius_sulu_plugin.controller.action.purge_sulu_cache_action | ||
_sylius: | ||
section: admin | ||
redirect: referer | ||
permission: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Tests\BitBag\SyliusSuluPlugin\Application\src\Entity\Channel; | ||
|
||
use BitBag\SyliusSuluPlugin\Entity\SuluChannelConfigurationTrait; | ||
use Sylius\Component\Core\Model\Channel as BaseChannel; | ||
|
||
class Channel extends BaseChannel | ||
{ | ||
use SuluChannelConfigurationTrait; | ||
} |
Oops, something went wrong.