Commit graph

40046 commits

Author SHA1 Message Date
Jan Góralski
fa0c2b13dc
[CI] Split Chromedriver tests into parallel jobs (#18603)
Running all scenarios at once makes the build less stable, so splitting
them into smaller parts should help us pinpoint which scenarios are
flaky. It also means any required reruns will be faster.

The only drawback is that we currently build the same test app in
multiple jobs, but the next step is to see if we can build it once and
pass it as an artifact to the jobs that need it.

Overall, the build should be faster for anyone running the workflow. The
queue might sometimes be a bit longer, but each job will finish sooner,
so the total time should still go down.



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Tests**
* Renamed job labels from "End-to-end tests" to "Tests" across DB
variants for clarity.
* Added a JavaScript test suite with grouped test flows and a browser
automation (Panther) variant.
* Simplified and unified non‑UI/UI test flows, introduced rerun-enabled
Behat execution and configurable per-step delay for test stability.
  * CI status notifications now include Frontend status.

* **Chores**
* Updated CI workflows, matrices and log/manifest preparation steps to
support the new JS tests and flow changes.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-12-09 15:09:05 +01:00
Rafikooo
c86f28704a
[CI] Extract Javascript tests to separate workflow with chromedriver groups 2025-12-09 11:38:42 +01:00
Jan Góralski
2efe0ffdca
[CI] Remove pull_request trigger from full CI workflows (#18626)
Cleans up PR check lists by preventing full CI workflows from appearing
as skipped jobs.

Previously, full CI workflows were triggered on every PR but jobs were
skipped unless the branch started with `full-ci/`. This caused skipped
jobs to appear in the PR checks list, making it cluttered.

Now full CI is only triggered by:
- Push to `full-ci/**` branches
- Daily schedule
- Manual workflow_dispatch

Ref: https://github.com/Sylius/Sylius/pull/18607
2025-12-09 10:42:13 +01:00
Rafikooo
c5ae006736
[CI] Remove pull_request trigger from full CI workflows
Removes the pull_request trigger from full CI workflows to prevent
skipped jobs from appearing in PR checks. Full CI is now triggered only
by push to full-ci/** branches, schedule, and workflow_dispatch.

Ref: https://github.com/Sylius/Sylius/pull/18607
2025-12-09 10:04:39 +01:00
Rafał Jaskulski
7aeb673644
Remove additional spacings in admin sidebar menu (#18622)
| Q               | A
|-----------------|-----
| Branch?         | 2.1
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | 
| License         | MIT

Before:
<img width="1860" height="1233" alt="image"
src="https://github.com/user-attachments/assets/42100cb3-c6f5-4779-bbba-394ab818ba94"
/>

After:
<img width="1860" height="1233" alt="image"
src="https://github.com/user-attachments/assets/932f141c-51a9-4ab5-8871-a15f339999a9"
/>



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Style**
* Refined vertical spacing and sizing of navigation menu items in the
navbar for improved visual consistency.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-12-08 13:10:28 +01:00
Bartłomiej Sęk
7b2d5a77e7 Remove additional spacings in admin sidebar menu 2025-12-08 08:35:39 +01:00
Jan Góralski
2d9c67b430
[Docs] Bust GitHub camo cache for README image (#18619)
Bump cache buster query param to force GitHub camo to refetch the
updated README image.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
  * Updated README image asset reference.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-12-04 10:30:38 +01:00
Rafikooo
2835f58794
[Docs] Bust GitHub camo cache for README image 2025-12-04 10:24:33 +01:00
Jan Góralski
0e705a5bc6
[Admin] Fix shipping address form hooks priorities (#18617)
Fixes duplicate priority values in
`sylius_admin.order.update.content.form.shipping_address` hook -
`street_address` and `city` both had priority 200. Adjusted all
priorities to match `billing_address` hook.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
* Added upgrade guide detailing shipping address hook priority changes
and migration guidance for users with custom configurations.

* **Chores**
* Adjusted shipping address field priorities in the admin order update
form to align with billing address structure.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-12-03 09:44:22 +01:00
Rafikooo
ca105ea736
[Admin] Fix shipping address form hooks priorities 2025-12-02 20:57:00 +01:00
Jan Góralski
342c6759a8
[Behat] Temporarily disable hanging cart inventory UI test (#18616)
| Q               | A
|-----------------|-----
| Branch?         | 2.1
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | -
| License         | MIT

Disables the UI portion of the cart inventory test that causes CI to
hang during stock validation on cart update. The API test remains
active.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Tests**
* Updated test configuration tags and added notes for ongoing CI
maintenance related to inventory validation processes.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-12-02 14:47:58 +01:00
Rafikooo
510fd6a7af
[Behat] Temporarily disable hanging cart inventory UI test 2025-12-02 14:17:15 +01:00
Jan Góralski
bbd09fe1b3
[Admin] Fix StatisticsComponent to use ClockInterface for date calculations (#18612)
StatisticsComponent was using native `DateTime` for calculating date
ranges, ignoring the mocked clock in Behat tests. This caused the
`statistics.feature:16` scenario to fail depending on the actual system
date.

Changes:
- Add `ClockInterface` dependency to `StatisticsComponent` (nullable for
BC, with deprecation)
- Update `OrderContext` methods to set `checkoutCompletedAt` using
mocked clock
- Add upgrade note for the new constructor argument

Fixes:
<img width="1173" height="75" alt="image"
src="https://github.com/user-attachments/assets/b3a57e24-b0e9-4bdd-a834-596d06f94798"
/>

The test started failing on December 1st because the
`StatisticsComponent` doesn't have the clock service injected, so it
uses real DateTime instead of the mocked clock from tests.

In December, first day of next month resolves to January, so:
- startDate = January 1, 2024
- endDate = January 1, 2025

This excludes the test data from January 1, 2025 and February 1, 2025,
showing only 2 customers instead of 5.



```gherkin
    @no-api @ui
    Scenario: Seeing statistics for last 12 months and default channel when expectations are not specified
        Given it is "last day of January last year" now
        And 2 new customers have fulfilled 2 orders placed for total of "$1,000.00"
        And it is "first day of January this year" now
        And 3 new customers have fulfilled 4 orders placed for total of "$2,000.21"
        And it is "first day of February this year" now
        And 2 more new customers have paid 2 orders placed for total of "$5,000.37"
        When I view statistics
        Then I should see 5 new customers
        And I should see 6 paid orders
        And there should be total sales of "$7,000.58"
        And the average order value should be "$1,166.76"
```
2025-12-02 10:29:27 +01:00
Rafikooo
a5d8cbe4c3
[Admin] Fix StatisticsComponent to use ClockInterface for date calculations
StatisticsComponent was using native DateTime for calculating date ranges,
ignoring the mocked clock in Behat tests. This caused flaky tests depending
on the actual system date.

- Add ClockInterface dependency to StatisticsComponent
- Update OrderContext to set checkoutCompletedAt with mocked clock
- Add deprecation notice for missing clock argument
2025-12-02 08:14:34 +01:00
Karol
7155d4a01b
[CI][Robo] Fix packages workflow for PHP 8.4 (#18613)
Fixes two issues breaking the packages CI workflow on PHP 8.4/8.5:

- **Robo**: The `robo.phar` from GitHub releases (v4.0.4) uses implicit
nullable parameters causing deprecation errors. Switch to
`vendor/bin/robo` from project dependencies (v5.1.1) via `composer
install`.

Ref:
https://github.com/Sylius/Sylius/actions/runs/19828133347/job/56807101604

<img width="1678" height="859" alt="image"
src="https://github.com/user-attachments/assets/5ece7bae-c70c-44d3-adf5-4c3ad6f92cd6"
/>

- **API Platform**: Remove deprecated `enable_swagger_ui`,
`enable_re_doc`, `enable_swagger` options from ApiBundle test app config
(no longer exist in API Platform 4.x).

Ref:

<img width="1683" height="933" alt="image"
src="https://github.com/user-attachments/assets/52cf70fa-e053-4129-8f4e-6d7b2f70c740"
/>
2025-12-02 08:11:43 +01:00
Rafikooo
d16289ef29
[CI] Fix Robo PHP 8.4 compatibility in packages workflow 2025-12-01 17:44:43 +01:00
Rafał Jaskulski
cef60e12cb
[Admin][Taxon] Add visual distinction for disabled taxon (#18611)
| Q               | A
|-----------------|-----
| Branch?         | 2.1
| Bug fix?        | yes
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | n/a
| License         | MIT

This PR adds visual indication for disabled taxons in the admin panel
taxonomy tree.
<img width="800" height="381" alt="image"
src="https://github.com/user-attachments/assets/9cd5a3d1-e642-49fc-9d41-ff17859685c4"
/>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Improvements**
* Disabled taxons are now visually distinguished in the admin taxonomy
tree interface. Items marked as disabled display with distinct styling,
making it easier to identify inactive taxonomy items when managing your
structure.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-12-01 12:52:08 +01:00
Karol
2f8b96beb0
[Unit] Add PHPUnit-Like Array Difference Visualization (#16863)
| Q               | A
|-----------------|-----
| Branch?         | 2.0 <!-- see the comment below -->
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations? | no <!-- don't forget to update the UPGRADE-*.md file
-->
| License         | MIT

Here's an example of a failing test:

Before:
<img width="1323" alt="image"
src="https://github.com/user-attachments/assets/e501e05c-5beb-4d46-bb3c-d36a82b4f2a6">
<img width="1315" alt="image"
src="https://github.com/user-attachments/assets/cf990b15-e55b-411b-8255-5656356bb473">
<img width="1328" alt="image"
src="https://github.com/user-attachments/assets/448ccdbd-e98d-43ed-a1a5-a32e4476d7c4">

After: (it also provides a direct way to jump right into the expected
response file):
<img width="967" alt="image"
src="https://github.com/user-attachments/assets/9d0e55a9-65c3-4282-9f93-09508652cd11">



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- Tests
- Standardized validation assertions across API suites, simplifying
calls and using the latest response implicitly.
- Introduced exact vs. contains-style violation checks for clearer
failures.
- Added robust JSON response comparison with dynamic value normalization
and helpful diffs.
- Corrected expected validation paths in shipping method rule scenarios
for accuracy.
- Harmonized negative-case tests in admin and shop flows (addresses,
catalog promotions, channels, product options/variants/reviews,
checkout, orders).
- Minor scenario adjustments in order-related tests to reflect current
behavior without altering outcomes.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-12-01 12:45:46 +01:00
Wojdylak
590910f173
[Admin][Taxon] Add visual distinction for disabled taxon 2025-12-01 12:21:08 +01:00
Karol
a0f27840ac
[Behat] Migrate shop promotion scenarios to chromedriver (#18602)
Migrates shop promotion tests from `Panther` to `ChromeDriver`. The goal
is to fully migrate to a single driver.
2025-12-01 08:18:18 +01:00
Karol
6223dee344
[Behat] Migrate cart scenarios to chromedriver (#18609)
Replaces the `@javascript` tag with `@mink:chromedriver` in shop cart
Behat feature files to use the explicit Chromedriver driver
configuration.

Affects 13 feature files in `features/shop/cart/`.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Tests**
* Updated test execution configuration across multiple test files for
improved test reliability and consistency.

* **Chores**
  * Migrated test infrastructure to optimize testing environment.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-12-01 08:17:57 +01:00
Karol
0a19201a8f
Fix some deprecations (#18604)
| Q               | A
|-----------------|-----
| Branch?         | 2.1
| Bug fix?        | yes
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | -
| License         | MIT

Removes deprecated `ReflectionProperty::setAccessible()` calls and
updates PHPUnit configuration schema. In PHP 8.5, `setAccessible()` is
deprecated as reflection automatically has access to private members
since PHP 8.1.

Changes:
- Remove `setAccessible(true)` from production code and tests
- Update `StateMachine/phpunit.xml.dist` to PHPUnit 11 schema
- Fix test mock missing `getId()` return value
2025-12-01 08:17:03 +01:00
Karol
71301ebe7b
[CI] Allow triggering full CI via branch name prefix (#18607)
Adds support for triggering full CI workflows by pushing to branches
with the `full-ci/` prefix.

Changes:
- Full CI workflows (`ci__full_1_14.yaml`, `ci__full_2_1.yaml`,
`ci__full_2_2.yaml`) now trigger on pushes to `full-ci/**` branches
- Jobs are conditionally executed only when triggered by a `full-ci/`
branch or non-PR events
- Minimal CI workflow also triggers on `full-ci/**` branches to prevent
redundant runs

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
* Updated CI/CD pipeline triggers across multiple workflow
configurations to expand when automated checks run.
* Modified static checks to selectively run based on branch patterns and
event types, optimizing CI/CD efficiency.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-12-01 08:15:40 +01:00
Karol
e3daa97d40
[Behat] Show debug errors only when scenario fails (#18605)
| Q               | A
|-----------------|-----
| Branch?         | 2.1
| Bug fix?        | no
| New feature?    | yes
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | -
| License         | MIT

`DebugContext` now only outputs API response errors when a scenario
actually fails, not on every passing test. Previously, error blocks like
validation messages were printed to console even when tests passed
successfully, creating noise in CI output.

Before: 
<img width="1320" height="638" alt="image"
src="https://github.com/user-attachments/assets/d0f3943c-173f-4ae9-b73f-a663e09d30c4"
/>

After:
<img width="1323" height="629" alt="image"
src="https://github.com/user-attachments/assets/49630ad0-83f0-4ff8-91a9-c785aeb7bd0e"
/>
2025-12-01 08:13:18 +01:00
Karol
803f27ff62
Remove 2.0 branch references from CI workflows (#18608)
| Q               | A
|-----------------|-----
| Branch?         | 2.1
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | -
| License         | MIT

With the `2.0` branch reaching end of support, this removes references
to it from CI workflows and updates the PR template guidance
accordingly.

- Remove Node.js version detection for `2.0` branch in e2e workflows
- Update PHPSpec condition to only run on `1.14`
- Update refactor workflow matrix to target `2.1` and `2.2` instead of
`2.0` and `2.1`
- Update PR template to reflect new branch targets

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
* Updated development and release guidance in project templates to
reflect current branch targeting strategies.
* Simplified CI/CD workflow configurations by streamlining build
environment handling across multiple test pipelines.
* Updated test execution conditions to optimize continuous integration
processes.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-12-01 08:07:01 +01:00
Rafikooo
8046f08c15
Replace @javascript tag with @mink:chromedriver in cart features 2025-11-30 15:07:51 +01:00
Rafikooo
9f52c7b002
[CI] Remove 2.0 branch references from workflows 2025-11-30 14:41:21 +01:00
Rafikooo
4806161328
[Behat] Show debug errors only when scenario fails 2025-11-29 05:28:02 +01:00
Rafikooo
93e08e0ce1
[Tests] Fix PHP 8.5 deprecations 2025-11-29 05:04:54 +01:00
Rafikooo
ce5f77b7da
[CI] Allow triggering full CI via branch name prefix 2025-11-29 04:36:12 +01:00
Rafikooo
c4e372c49f
[Unit] Adjust shop tests 2025-11-29 03:59:14 +01:00
Rafikooo
627ca8d361
[Unit] Adjust admin tests 2025-11-29 03:59:14 +01:00
Rafikooo
404796b102
[Unit] Add PHPUnit-like array difference visualization 2025-11-29 03:59:14 +01:00
Rafikooo
9da6d2a024
[Behat] Migrate shop promotion tests to chromedriver 2025-11-28 17:39:57 +01:00
Karol
ed16d2e369
Fix packages CI workflow and CoreBundle tests (#18587)
Fixes broken packages CI workflow.

Changes:
- Fix `ci_packages.yaml`: use shell variable instead of `xargs` pipe to
preserve JSON quotes
- Move `ShippingMethodRepositoryTest` from CoreBundle to root
`tests/Functional/Repository/` where it can run with full Sylius schema

The workflow regression was introduced in #18512 where `-0` flag was
removed from `xargs`. Without proper quoting, `xargs` strips JSON
quotes, causing `json_decode()` to return `null`.

Ref:
https://github.com/Sylius/Sylius/actions/runs/19752465908/job/56597855870
2025-11-28 16:15:13 +01:00
Rafikooo
bbfaa1282e
Move ShippingMethod test to the main tests directory 2025-11-28 15:22:54 +01:00
Rafikooo
06a4442e75
[CI] Fix packages CI workflow 2025-11-28 15:20:04 +01:00
Karol
c16622add1
Introduce Symfony 7.4 compatibility (#18592)
Let's test both Symfony ~7.3.0 and ~7.4.0 on the full build and switch
to ~7.4.0 in the minimal 🚀 💃


Symfony 7.4 introduced breaking changes that cause PHPStan failures:

- `Type` constraint constructor now uses named arguments instead of
array options
- `NodeBuilder` now uses generics which phpstan-symfony doesn't handle
correctly yet
2025-11-28 14:20:33 +01:00
Rafikooo
e09b95e16e
[CI] Test both Symfony ~7.3.0 and ~7.4.0 2025-11-28 13:21:51 +01:00
Rafikooo
c3407f2223
[Core] Fix Symfony 7.4 PHPStan compatibility 2025-11-28 13:05:49 +01:00
Michał Pysiak
2b5d5d3791
[Shop] Remove test attribute from order summary table (#18596)
Removes the `sylius_test_html_attribute('order-table')` from the order
summary table template.

This attribute is not used in any Behat scenarios and adds unnecessary
test-specific markup to the production template.

Visual representation of an issue:

<img width="1675" height="951" alt="image"
src="https://github.com/user-attachments/assets/9561a653-43cb-4895-9948-eccf6f4fc095"
/>


Fixes:

<img width="1670" height="698" alt="image"
src="https://github.com/user-attachments/assets/af5ae27c-7b79-4a5d-a986-c0e72835eaa9"
/>
2025-11-28 13:04:58 +01:00
Michał Pysiak
d0531ddd00
[Behat] Migrate admin @javascript tags to @mink:chromedriver (#18576)
| Q               | A
|-----------------|-----
| Branch?         | 2.1
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | ref #18396
| License         | MIT

Migrates admin feature scenarios from `@javascript` (Panther) to
`@mink:chromedriver` tags. This is part of gradual migration to unified
Chromedriver-based testing.

Changes 20 scenarios across 8 admin feature files:
- Impersonating customers
- Managing product options
- Managing taxons (browsing, editing slugs)
- Managing countries and provinces

Ref: #18396

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Tests**
* Updated test execution infrastructure across multiple test suites to
improve automation consistency and reliability.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-11-28 12:18:45 +01:00
Rafikooo
61249cafa4
[Shop] Remove test attribute from order summary table 2025-11-28 12:09:57 +01:00
Michał Pysiak
9954910498
Pin Symfony versions to tilde constraints in CI (#18595)
Switching from `^6.4` and `^7.3` to `~6.4.0` and `~7.3.0` for better
control over CI stability. After a Symfony minor release, our tests keep
running against the version we've verified. Version bumps are done
explicitly.
2025-11-28 11:58:06 +01:00
Rafikooo
28ae42dfad
[CI] Pin Symfony versions to tilde constraints 2025-11-28 11:54:31 +01:00
Grzegorz Sadowski
68a12b0ae7
Change application's version to v2.1.9-dev 2025-11-27 13:14:06 +01:00
Grzegorz Sadowski
5b039dff8e
Generate changelog for v2.1.8 2025-11-27 13:13:39 +01:00
Grzegorz Sadowski
7c7a599d8c
Change application's version to v2.1.8 2025-11-27 13:10:15 +01:00
Grzegorz Sadowski
d4de98ee31
Merge branch '1.14' into 2.1
* 1.14:
  Change application's version to v1.14.14-dev
  Generate changelog for v1.14.13
  Change application's version to v1.14.13
2025-11-27 13:07:41 +01:00
Grzegorz Sadowski
14d25f6256
Change application's version to v1.14.14-dev 2025-11-27 13:03:48 +01:00