-
Notifications
You must be signed in to change notification settings - Fork 21
feat: add Playwright E2E testing infrastructure with tree listing #1674
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
base: main
Are you sure you want to change the base?
Conversation
d8e9951 to
425912a
Compare
676fb72 to
af73aa6
Compare
f93ddf6 to
39e3bf0
Compare
- Add Playwright configuration and test framework - Create e2e tests for tree listing page with proper selectors - Set up strict TypeScript configuration for e2e tests - Add e2e commands to package.json and update scripts - Update .env.example with staging environment as default - Add comprehensive e2e documentation to README - Add Playwright artifacts to .gitignore - Update ESLint and TypeScript configs to support e2e tests - Add vitest config to exclude the e2e folder This establishes a complete E2E testing infrastructure using Playwright with staging as the default test environment, strict TypeScript settings, and proper documentation for developers.
39e3bf0 to
78202a5
Compare
| .first(); | ||
| await expect(intervalInput).toBeVisible(); | ||
|
|
||
| await intervalInput.fill('7'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since 7 days is the default already, shouldn't we test with a different value?
| const url = page.url(); | ||
| expect(url).toMatch(/\/tree\/[^/]+\/[^/]+\/[^/]+$/); | ||
|
|
||
| await page.goBack(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in this case you're not really using the breadcrumb, just going back like the back arrow in a browser, isn't it?
| const NAVIGATION_TIMEOUT = 5000; | ||
| const GO_BACK_TIMEOUT = 3000; | ||
|
|
||
| test.describe('Tree Listing Page Tests', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there should be a test for origin change too, can you add it here?
| pnpm test | ||
| ``` | ||
|
|
||
| ## Running end-to-end (e2e) tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
after updating the packages (pnpm install) I also had to run pnpm exec playwright install, do you think it's worth it to mention that command here?
Summary
This PR adds comprehensive Playwright E2E testing infrastructure to the dashboard project. The implementation includes:
Changes
🔧 Framework Setup
playwright.config.tswith environment supporttsconfig.e2e.json🧪 Test Implementation
basic.spec.tstotree-listing.spec.tse2e-selectors.ts) with robust element selectors📋 Configuration & Environment
package.jsonwith singlee2ecommand ande2e-uicommand.env.example🗂️ Git Management
test-results/,playwright-report/) to.gitignoreBenefits
Usage