Skip to content

[DON'T MERGE - POC] IBX-11740: Added playwright-browser-tests.yml#100

Draft
pawlakadrian wants to merge 22 commits into
mainfrom
ibx-11740-playwright
Draft

[DON'T MERGE - POC] IBX-11740: Added playwright-browser-tests.yml#100
pawlakadrian wants to merge 22 commits into
mainfrom
ibx-11740-playwright

Conversation

@pawlakadrian

@pawlakadrian pawlakadrian commented May 27, 2026

Copy link
Copy Markdown
🎫 Issue IBX-11740

Related PRs:

Description:

Adds playwright-browser-tests.yml — a reusable workflow for running Playwright tests across Ibexa packages.

  • Reuses the existing app setup from browser-tests.yml (prepare_project_edition.sh, Behat data seeding phases, caching, Slack notifications)
  • Installs cohesivo-playwright from vendor, builds it, then runs npm run test:all
  • APP_EDITION is set from project-edition input — only tests tagged for the given edition are executed
  • No hardcoded credentials — uses secrets.ADMIN_LOGIN/ADMIN_PASSWORD with standard test defaults as fallback
  • Artifacts collected per edition from all playwright-tests/ directories in vendor

For QA:

Documentation:

@pawlakadrian pawlakadrian changed the title IBX-11740: Added playwright-browser-tests.yml [DON'T MERGE - POC] IBX-11740: Added playwright-browser-tests.yml Jun 24, 2026
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
2 Security Hotspots
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

💡 Need a hand with PR review? Try Gitar by Sonar!

type: string
default: "main"
cohesivo-version:
description: "Composer version constraint for ibexa/cohesivo-playwright. Empty = same as the project version (branch alias), so 4.6/5.0/6.0 branches get the matching library version."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PW wont be available on 4.6

required: false

env:
APP_ENV: behat

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does env 'behat' do anything for playwright setup?

name: Run first phase of tests setup
run: |
cd ${HOME}/build/project
docker compose --env-file=.env exec -T --user www-data app sh -c "vendor/bin/ibexabehat ${{ inputs.test-setup-phase-1 }}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'vendor/bin/ibexabehat' is this step necessary for PW?

name: Run second phase of tests setup
run: |
cd ${HOME}/build/project
docker compose --env-file=.env exec -T --user www-data app sh -c "vendor/bin/ibexabehat ${{ inputs.test-setup-phase-2 }}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'vendor/bin/ibexabehat' is this step necessary for PW?

/home/runner/build/project/vendor/ibexa/**/playwright-tests/playwright-report/
/home/runner/build/project/vendor/ibexa/**/playwright-tests/test-results/
/home/runner/build/project/vendor/ibexa/cohesivo-playwright/playwright-report/
/home/runner/build/project/vendor/ibexa/cohesivo-playwright/test-results/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to upload report to that many paths?

required: false
type: string
default: "http://localhost:8080"
test-setup-phase-1:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do PW tests require behat setup to run first? Behat will be discontinued in future versions, so we cant rely on it.

if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-report-${{ inputs.project-edition }}-${{ matrix.offset }}

@tomaszszopinski tomaszszopinski Jul 21, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ive got a report with a name: 'playwright-report-commerce-0'. Report name should be somewhat distinguishable (otherwise it will be painful to use) - .ie with a date/time of creating the regression, or branch name 🤔 (it is up for discussion i think)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants