Skip to content

ci: Playwright project organization #17905

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 4, 2025
Merged

Conversation

shortstacked
Copy link
Contributor

Summary

Cleans up and provides a better structure for the Playwright test project.
Allows clearer commands for running the different test types available e.g
UI: pnpm test:ui
Perf: pnpm test:perf

Better organization of test folder structure to make it easier to find/add tests.

Related Linear tickets, Github issues, and Community forum posts

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

@shortstacked shortstacked requested a review from Copilot August 1, 2025 13:39
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR reorganizes the Playwright test project structure to provide clearer organization and better command interfaces for running different test types. The changes standardize test commands using a hierarchical naming scheme (test:ui, test:performance, test:workflows) and consolidate project configuration into dedicated modules.

  • Refactors project configuration from inline definitions to an external playwright-projects.ts module
  • Reorganizes test directory structure and fixes import paths for better organization
  • Updates npm scripts and CI workflows to use new standardized command names

Reviewed Changes

Copilot reviewed 9 out of 364 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
playwright.config.ts Simplifies configuration by moving project definitions to external module
playwright-projects.ts New module containing all project configurations with improved organization
package.json Updates npm scripts to use new hierarchical naming scheme
workflow-tests.spec.ts Fixes paths and adds utility import for better path resolution
setup-workflow-tests.ts Updates asset paths and adds utility import for path resolution
multimain.spec.ts Fixes import path to match new directory structure
README.md Updates documentation to reflect new command structure
root package.json Updates references to use new command names
CI workflow Updates test commands to match new naming scheme
Comments suppressed due to low confidence (2)

packages/testing/playwright/package.json:24

  • Playwright version 1.54.2 may not exist. The latest known version as of January 2025 was around 1.48.x. Please verify this version exists before merging.
    "@playwright/test": "1.54.2",

packages/testing/playwright/package.json:26

  • eslint-plugin-playwright version 2.2.2 may not exist. The latest known version as of January 2025 was around 1.6.x. Please verify this version exists before merging.
    "eslint-plugin-playwright": "2.2.2",

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

cubic analysis

4 issues found across 17 files • Review in cubic

Note: This PR contains a large number of files. cubic only reviews up to 150 files per PR, so some files may not have been reviewed.

React with 👍 or 👎 to teach cubic. You can also tag @cubic-dev-ai to give feedback, ask questions, or re-run the review.

@n8n-assistant n8n-assistant bot added the n8n team Authored by the n8n team label Aug 1, 2025
@shortstacked shortstacked force-pushed the playwright-project-cleanup branch from 72789e7 to c4267ec Compare August 1, 2025 14:08
@shortstacked shortstacked requested a review from tomi August 1, 2025 14:08
@shortstacked shortstacked force-pushed the playwright-project-cleanup branch 2 times, most recently from 8cfd0a0 to 23fabda Compare August 1, 2025 14:42
@n8n-io n8n-io deleted a comment from currents-bot bot Aug 1, 2025
@shortstacked shortstacked force-pushed the playwright-project-cleanup branch from 23fabda to 7f55fc0 Compare August 1, 2025 17:40
Copy link
Collaborator

@tomi tomi left a comment

Choose a reason for hiding this comment

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

Much clearer structure this way 👍 Couple comments

@shortstacked shortstacked requested a review from tomi August 2, 2025 22:53
@n8n-io n8n-io deleted a comment from currents-bot bot Aug 2, 2025
@n8n-io n8n-io deleted a comment from cypress bot Aug 4, 2025
@n8n-io n8n-io deleted a comment from codecov bot Aug 4, 2025
@shortstacked shortstacked force-pushed the playwright-project-cleanup branch from 263a851 to 6348a43 Compare August 4, 2025 09:27
tomi
tomi previously approved these changes Aug 4, 2025
Copy link
Collaborator

@tomi tomi left a comment

Choose a reason for hiding this comment

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

Couple small comments, but LGTM 👍

@@ -20,6 +20,22 @@ function findProjectRoot(marker: string): string {
return dir;
}

/**
* Finds a folder root by searching upwards for a marker folder named 'packages'.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think the marker is not passed as an argument?

fix: more tests

test: Migrating 1-workflows to Playwright
fix: PR feedback

fix: Updating based on PR feedback

Added extra documentation for setup/running tests.

fix: testing migration auto

fix: Run tag tests sequential to avoid DB issues

feat: Add Playwright project improvements
Copy link
Collaborator

@tomi tomi left a comment

Choose a reason for hiding this comment

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

🚀

Copy link

currents-bot bot commented Aug 4, 2025

E2E Tests: n8n tests passed after 3m 56.3s

🟢 520 · 🔴 0 · ⚪️ 1

View Run Details

Run Details

  • Project: n8n

  • Groups: 3

  • Framework: Playwright

  • Run Status: Passed

  • Commit: 581a018

  • Spec files: 111

  • Overall tests: 521

  • Duration: 3m 56.3s

  • Parallelization: 3

Groups

GroupId Results Spec Files Progress
ui 🟢 14 · 🔴 0 · ⚪️ 1 4 / 4
ui:isolated 🟢 6 · 🔴 0 · ⚪️ 0 2 / 2
No name 🟢 500 · 🔴 0 · ⚪️ 0 105 / 105


This message was posted automatically by currents.dev | Integration Settings

Copy link

currents-bot bot commented Aug 4, 2025

E2E Tests: n8n tests passed after 3m 6s

🟢 274 · 🔴 0 · ⚪️ 0

View Run Details

Run Details

  • Project: n8n

  • Groups: 1

  • Framework: Currents

  • Run Status: Passed

  • Commit: 581a018

  • Spec files: 36

  • Overall tests: 274

  • Duration: 3m 6s

  • Parallelization: 1


This message was posted automatically by currents.dev | Integration Settings

@shortstacked shortstacked merged commit d0443dc into master Aug 4, 2025
54 of 73 checks passed
@shortstacked shortstacked deleted the playwright-project-cleanup branch August 4, 2025 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
n8n team Authored by the n8n team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants