-
Notifications
You must be signed in to change notification settings - Fork 45
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
Add Playwright end-to-end tests #928
base: main
Are you sure you want to change the base?
Conversation
- Added Playwright configuration and workflows for running tests on push and pull requests. - Created end-to-end tests for applications, channels, groups, instances, and packages. - Added global setup and teardown scripts for database initialization and cleanup. - Updated `.gitignore` to exclude Playwright test results and reports. - Installed necessary dependencies for Playwright and PostgreSQL client.
- Remove 'runs-on' duplication
- Update artifact path to `playwright-report` and remove unnecessary unzip step
columns with dates
- Added a new README.md file in the frontend/e2e directory with detailed instructions on installing dependencies, running tests, developing tests, debugging, and using GitHub Actions for Playwright. - Updated the GitHub Actions workflow (playwright.yml) to include a group of log lines that provide a summary of the Playwright test report and instructions for analyzing test failures.
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.
Copilot reviewed 19 out of 29 changed files in this pull request and generated 2 comments.
Files not reviewed (10)
- frontend/.gitignore: Language not supported
- frontend/e2e/mask-and-fix-dynamic-parts.css: Language not supported
- frontend/package-lock.json: Language not supported
- frontend/package.json: Language not supported
- frontend/e2e/README.md: Evaluated as low risk
- frontend/e2e/application.spec.ts: Evaluated as low risk
- frontend/e2e/global.setup.ts: Evaluated as low risk
- frontend/e2e/group.spec.ts: Evaluated as low risk
- frontend/e2e/package.spec.ts: Evaluated as low risk
- frontend/e2e/channel.spec.ts: Evaluated as low risk
Comments suppressed due to low confidence (2)
frontend/e2e/instance.spec.ts:10
- [nitpick] The variable name 'instances' is ambiguous. It should be renamed to 'instanceCount'.
await expect(page.getByRole('link', { name: 'instances' })).toContainText('1instances');
frontend/e2e/helpers.ts:23
- The appName parameter is typed as 'any', which is not ideal. It should be typed as 'string'.
export async function deleteApplication(page: Page, appName: any) {
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
@tormath1 It would be helpful to be able to access it easily in case of test failure. I tried something like this, but the runner got no permissions: deploy-report:
if: always()
runs-on: ubuntu-latest
needs: test
permissions:
contents: write
steps:
- name: Download Playwright Report Artifact
uses: actions/download-artifact@v4
with:
name: playwright-report
path: playwright-report
- name: Deploy Playwright Report to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: playwright-report
publish_branch: gh-pages
destination_dir: playwright-report |
Add Playwright end-to-end tests
.gitignore
to exclude Playwright test results and reports.How to use
npx playwright test --ui
Testing done
Testing will be done with the PR and the added github workflow.