Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMilek committed Oct 13, 2024
1 parent 6c065c1 commit 622c734
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 20 deletions.
33 changes: 28 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ on:

jobs:
tests:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04

name: "Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}, wkhtmltopdf: ${{ matrix.wkhtmltopdf }}, State Machine Adapter ${{ matrix.state_machine_adapter }}"

strategy:
fail-fast: false
matrix:
php: ["8.3"]
symfony: ["^6.4"]
symfony: ["^6.4", "^7.1"]
sylius: ["2.0.x-dev"]
node: ["20.x"]
mysql: ["8.4"]
wkhtmltopdf: ["0.12.6"]
wkhtmltopdf: ["0.12.6-1"]
state_machine_adapter: [ "winzou_state_machine", "symfony_workflow" ]

include:
Expand All @@ -45,6 +45,23 @@ jobs:
wkhtmltopdf: false
state_machine_adapter: "winzou_state_machine"

-
php: "8.3"
symfony: "^7.1"
sylius: "2.0.x-dev"
node: "20.x"
mysql: "8.4"
wkhtmltopdf: false
state_machine_adapter: "symfony_workflow"
-
php: "8.3"
symfony: "^7.1"
sylius: "2.0.x-dev"
node: "20.x"
mysql: "8.4"
wkhtmltopdf: false
state_machine_adapter: "winzou_state_machine"

env:
APP_ENV: test
DATABASE_URL: "mysql://root:[email protected]/sylius?serverVersion=${{ matrix.mysql }}"
Expand Down Expand Up @@ -93,7 +110,8 @@ jobs:
name: Install wkthtmltopdf
if: matrix.wkhtmltopdf != false && steps.cache-wkhtmltopdf.outputs.cache-hit != 'true'
run: |
sudo apt-get install -y xfonts-base xfonts-75dpi
sudo apt-get update
sudo apt-get install -y libssl1.1 xfonts-base xfonts-75dpi
wget https://github.com/wkhtmltopdf/packaging/releases/download/${{ matrix.wkhtmltopdf }}/wkhtmltox_${{ matrix.wkhtmltopdf }}.focal_amd64.deb
sudo dpkg -i wkhtmltox_${{ matrix.wkhtmltopdf }}.focal_amd64.deb
Expand Down Expand Up @@ -191,7 +209,12 @@ jobs:

-
name: Run Behat
run: vendor/bin/behat --colors --strict -vvv --no-interaction -f progress || vendor/bin/behat --colors --strict -vvv --no-interaction -f progress --rerun
run: |
if [ "${{ matrix.wkhtmltopdf }}" != "false" ]; then
vendor/bin/behat --colors --strict -vvv --no-interaction -f progress --tags="~@pdf_edisabled" || vendor/bin/behat --colors --strict -vvv --no-interaction -f progress --rerun;
else
vendor/bin/behat --colors --strict -vvv --no-interaction -f progress --tags="~@pdf_enabled" || vendor/bin/behat --colors --strict -vvv --no-interaction -f progress --rerun;
fi
-
name: Upload Behat logs
Expand Down
4 changes: 0 additions & 4 deletions behat.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,3 @@ default:
FriendsOfBehat\SuiteSettingsExtension:
paths:
- features

FriendsOfBehat\ExcludeSpecificationsExtension:
features:
- features/managing_invoices/pdf_generation_disabled
7 changes: 3 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
"require-dev": {
"behat/behat": "^3.6.1",
"behat/mink-selenium2-driver": "~1.6.0",
"friends-of-behat/exclude-specifications-extension": "^0.3",
"friends-of-behat/mink": "^1.8",
"friends-of-behat/mink-browserkit-driver": "^1.4",
"friends-of-behat/mink-debug-extension": "^2.0",
Expand All @@ -35,8 +34,8 @@
"friends-of-behat/suite-settings-extension": "^1.0",
"friends-of-behat/symfony-extension": "^2.1",
"friends-of-behat/variadic-extension": "^1.3",
"matthiasnoback/symfony-config-test": "^4.2",
"matthiasnoback/symfony-dependency-injection-test": "^4.2",
"matthiasnoback/symfony-config-test": "^5.1",
"matthiasnoback/symfony-dependency-injection-test": "^5.0",
"phpspec/phpspec": "^7.2",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^1.8",
Expand All @@ -45,7 +44,7 @@
"phpstan/phpstan-webmozart-assert": "^1.2",
"phpunit/phpunit": "^9.5",
"polishsymfonycommunity/symfony-mocker-container": "^1.0",
"sylius-labs/coding-standard": "~4.0.0",
"sylius-labs/coding-standard": "^4.2",
"symfony/browser-kit": "^6.4 || ^7.1",
"symfony/debug-bundle": "^6.4 || ^7.1",
"symfony/dotenv": "^6.4 || ^7.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Feature: Being unable to download an invoice on a single order view
And the customer chose "Free" shipping method to "United States" with "Cash on Delivery" payment
And I am logged in as an administrator

@ui
@ui @pdf_disabled
Scenario: Being unable to download an invoice on a single order view
When I view the summary of the order "#00000022"
Then I should not be able to download the first invoice
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Feature: Being unable to download an invoice on a single order view
And for the billing address of "Mazikeen Lilim" in the "Pacific Coast Hwy", "90806" "Los Angeles", "United States"
And I chose "Free" shipping method with "Cash on Delivery" payment

@ui
@ui @pdf_disabled
Scenario: Being unable to download an invoice on a single order view
When I view the summary of the order "#00000666"
Then I should not be able to download the first invoice
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Feature: Being unable to download an invoice from its details page
And for the billing address of "Mazikeen Lilim" in the "Pacific Coast Hwy", "90806" "Los Angeles", "United States"
And the customer chose "UPS" shipping method with "Cash on Delivery" payment

@ui
@ui @pdf_disabled
Scenario: Being unable to download an invoice from its details page
Given I view the summary of the invoice for order "#00000666"
Then I should not be able to download the invoice
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Feature: Downloading invoices on a single order view
And the customer chose "Free" shipping method to "United States" with "Cash on Delivery" payment
And I am logged in as an administrator

@ui
@ui @pdf_enabled
Scenario: Downloading an invoice on order view
When I view the summary of the order "#00000022"
And I download the first invoice
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Feature: Downloading invoices on a single order view
And for the billing address of "Mazikeen Lilim" in the "Pacific Coast Hwy", "90806" "Los Angeles", "United States"
And I chose "Free" shipping method with "Cash on Delivery" payment

@ui
@ui @pdf_enabled
Scenario: Downloading an invoice on order view
When I view the summary of the order "#00000666"
And I download the first invoice
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Feature: Downloading an invoice from its details page
And for the billing address of "Mazikeen Lilim" in the "Pacific Coast Hwy", "90806" "Los Angeles", "United States"
And the customer chose "UPS" shipping method with "Cash on Delivery" payment

@ui
@ui @pdf_enabled
Scenario: Downloading an invoice
Given I view the summary of the invoice for order "#00000666"
When I download the invoice
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Feature: Saving invoices on server during generation
And the store allows paying with "Cash on Delivery"
And channel "United States" has shop billing data set as "Ragnarok", "1100110011", "Pacific Coast Hwy", "90806" "Los Angeles", "United States"

@application
@application @pdf_enabled
Scenario: Having invoice saved on the server after the order is placed
Given there is a customer "[email protected]" that placed an order "#00000666"
When the customer bought 2 "Angel T-Shirt" products
Expand Down

0 comments on commit 622c734

Please sign in to comment.