Skip to content

Commit

Permalink
Add nice-looking fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
senghe committed Sep 26, 2024
1 parent f23d6a2 commit 84399b3
Show file tree
Hide file tree
Showing 40 changed files with 1,188 additions and 831 deletions.
Binary file removed tests/Application/Resources/fixtures/SyliusOffer.pdf
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/Application/Resources/fixtures/blog_banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed tests/Application/Resources/fixtures/sale.jpeg
Binary file not shown.
Binary file removed tests/Application/Resources/fixtures/sale_banner.jpg
Binary file not shown.
Binary file not shown.
Binary file removed tests/Application/Resources/fixtures/size_table.jpeg
Binary file not shown.
Diff not rendered.
48 changes: 45 additions & 3 deletions tests/Application/assets/shop/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

.homepage-sale {
img {
width: 60% !important;
width: 80% !important;
margin: auto !important;
border-radius: 20px;
}
Expand All @@ -26,7 +26,7 @@
border-radius: 4px;
font-size: 16pt;

a {
&a {
padding: 40px !important;
display: block;
transition: color 200ms ease-in;
Expand All @@ -36,7 +36,7 @@
}

li:hover {
a {
&a {
color: #22b99a;
transition: color 200ms ease-in;
}
Expand All @@ -49,3 +49,45 @@
}
}
}

.cms-page-content {
.teaser {
.ui.image {
width: 100%;

img {
width: 100%
}
}
}

h2 {
font-size: 22pt;
margin-bottom: 22px;
}

h3 {
margin-top: 16px;
font-size: 18pt;
margin-bottom: 16px;
}

.cms_content_element__textarea {
p {
font-size: 13pt;
ul {
font-size: 13pt;
li {
margin-bottom: 6px;
}
}
}

ul {
font-size: 13pt;
li {
margin-bottom: 6px;
}
}
}
}
7 changes: 7 additions & 0 deletions tests/Application/config/packages/_sylius.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,10 @@ sylius_api:
sylius_shop:
product_grid:
include_all_descendants: true

sylius_cms:
templates:
blocks:
- "src/Resources/views/Block/CustomLayout.html.twig"
pages:
- "src/Resources/views/Page/CustomLayout.html.twig"
27 changes: 27 additions & 0 deletions tests/Application/config/packages/fixtures/1_collection.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
parameters:
fixtures_dir: "%kernel.project_dir%/Resources/fixtures"

sylius_fixtures:
suites:
default:
listeners:
orm_purger: ~
logger: ~
fixtures:
collection:
options:
custom:
blog:
name: "Blog"
type: "page"
page_codes:
- "lorem_ipsum"
homepage:
name: "Homepage"
type: "page"
black_friday:
name: "Black Friday"
type: "block"
products_details:
name: "Product details"
type: "block"
183 changes: 183 additions & 0 deletions tests/Application/config/packages/fixtures/1_media.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
parameters:
fixtures_dir: "%kernel.project_dir%/Resources/fixtures"

sylius_fixtures:
suites:
default:
listeners:
orm_purger: ~
logger: ~
fixtures:
media:
options:
custom:
black_friday_banner:
name: "T-Shirts banner"
channels:
- "FASHION_WEB"
type: image
path: "%fixtures_dir%/black_friday_banner.png"
original_name: "black_friday_banner.png"
translations:
en_US:
alt: "T-Shirts banner"
homepage_banner_1:
name: "Homepage banner 1"
channels:
- "FASHION_WEB"
type: image
path: "%fixtures_dir%/homepage_banner_1.png"
original_name: "homepage_banner_1.png"
translations:
en_US:
alt: "Homepage banner 1"
homepage_banner_2:
name: "Homepage banner 2"
channels:
- "FASHION_WEB"
type: image
path: "%fixtures_dir%/homepage_banner_2.png"
original_name: "homepage_banner_2.png"
translations:
en_US:
alt: "Homepage_banner_2"
homepage_banner_3:
name: "Homepage banner 3"
channels:
- "FASHION_WEB"
type: image
path: "%fixtures_dir%/homepage_banner_3.png"
original_name: "homepage_banner_3.png"
translations:
en_US:
alt: "Homepage banner 3"
blog_banner:
name: "Blog banner"
channels:
- "FASHION_WEB"
type: image
path: "%fixtures_dir%/blog_banner.png"
original_name: "blog_banner.png"
translations:
en_US:
alt: "Blog banner"
blog_post_1_header_banner:
name: "Blog post 1 banner"
channels:
- "FASHION_WEB"
type: image
path: "%fixtures_dir%/blog_post_1_header_banner.png"
original_name: "blog_post_1_header_banner.png"
translations:
en_US:
alt: "Blog post 1 banner"
blog_post_2_header_banner:
name: "Blog post 2 banner"
channels:
- "FASHION_WEB"
type: image
path: "%fixtures_dir%/blog_post_2_header_banner.png"
original_name: "blog_post_2_header_banner.png"
translations:
en_US:
alt: "Blog post 2 banner"
blog_post_3_header_banner:
name: "Blog post 3 banner"
channels:
- "FASHION_WEB"
type: image
path: "%fixtures_dir%/blog_post_3_header_banner.png"
original_name: "blog_post_3_header_banner.png"
translations:
en_US:
alt: "Blog post 3 banner"
blog_post_1_teaser_image:
name: "Blog post 1 teaser"
channels:
- "FASHION_WEB"
type: image
path: "%fixtures_dir%/blog_post_1_teaser_image.png"
original_name: "blog_post_1_teaser_image.png"
translations:
en_US:
alt: "Blog post 1 teaser"
blog_post_2_teaser_image:
name: "Blog post 2 teaser"
channels:
- "FASHION_WEB"
type: image
path: "%fixtures_dir%/blog_post_2_teaser_image.png"
original_name: "blog_post_2_teaser_image.png"
translations:
en_US:
alt: "Blog post 2 teaser"
blog_post_3_teaser_image:
name: "Blog post 3 teaser"
channels:
- "FASHION_WEB"
type: image
path: "%fixtures_dir%/blog_post_3_teaser_image.png"
original_name: "blog_post_3_teaser_image.png"
translations:
en_US:
alt: "Blog post 3 teaser"
blog_post_1_content_image_1:
name: "Blog post 1 content image 1"
channels:
- "FASHION_WEB"
type: image
path: "%fixtures_dir%/blog_post_1_content_image_1.png"
original_name: "blog_post_1_content_image_1.png"
translations:
en_US:
alt: "Blog post 1 content image 1"
blog_post_1_content_image_2:
name: "Blog post 1 content image 2"
channels:
- "FASHION_WEB"
type: image
path: "%fixtures_dir%/blog_post_1_content_image_2.png"
original_name: "blog_post_1_content_image_2.png"
translations:
en_US:
alt: "Blog post 1 content image 2"
blog_post_2_content_image_1:
name: "Blog post 2 content image 1"
channels:
- "FASHION_WEB"
type: image
path: "%fixtures_dir%/blog_post_2_content_image_1.png"
original_name: "blog_post_2_content_image_1.png"
translations:
en_US:
alt: "Blog post 2 content image 1"
blog_post_2_content_image_2:
name: "Blog post 2 content image 2"
channels:
- "FASHION_WEB"
type: image
path: "%fixtures_dir%/blog_post_2_content_image_2.png"
original_name: "blog_post_2_content_image_2.png"
translations:
en_US:
alt: "Blog post 2 content image 2"
blog_post_3_content_image_1:
name: "Blog post 3 content image 1"
channels:
- "FASHION_WEB"
type: image
path: "%fixtures_dir%/blog_post_3_content_image_1.png"
original_name: "blog_post_3_content_image_1.png"
translations:
en_US:
alt: "Blog post 3 content image 1"
blog_post_3_content_image_2:
name: "Blog post 3 content image 2"
channels:
- "FASHION_WEB"
type: image
path: "%fixtures_dir%/blog_post_3_content_image_2.png"
original_name: "blog_post_3_content_image_2.png"
translations:
en_US:
alt: "Blog post 3 content image 2"
26 changes: 26 additions & 0 deletions tests/Application/config/packages/fixtures/1_template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
parameters:
fixtures_dir: "%kernel.project_dir%/Resources/fixtures"

sylius_fixtures:
suites:
default:
listeners:
orm_purger: ~
logger: ~
fixtures:
template:
options:
custom:
homepage:
name: "Page template"
type: "page"
content_elements:
- type: "textarea"
- type: "multiple_media"
about:
name: "Block template"
type: "block"
content_elements:
- type: "heading"
- type: "textarea"
- type: "single_media"
Loading

0 comments on commit 84399b3

Please sign in to comment.