Skip to content
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

feat: E2E test using Playwright #2115

Closed
wants to merge 59 commits into from
Closed

Conversation

gee05053
Copy link
Contributor

@gee05053 gee05053 commented Dec 21, 2023

This PR resolves #2081

Implement e2e test using playwright
Loop Doc

You must make .env file at playwright directory(webui/playwright/.env) and copy and paste below config

SUPER_ADMIN_EMAIL=admin@lablup.com
SUPER_ADMIN_PASSWORD=wJalrXUt
ADMIN_EMAIL=domain-admin@lablup.com
ADMIN_PASSWORD=cWbsM_vB
USER_EMAIL=user@lablup.com
USER_PASSWORD=C8qnIo29
USER2_EMAIL=user2@lablup.com
USER2_PASSWORD=P7oxTDdz
INCORRECT_EMAIL=test7@lablup.com
INCORRECT_PASSWORD=dasdnsajdnk
PAGE_URL=http://localhost:9081
ENDPOINT=http://localhost:8090
CREATE_VFOLDER_GROUP=test_peoject
NOT_CREATE_VFOLDER_GROUP=default
DELETE_VFOLDER=vMyFkaomKN9vkTORaywaleDayTjYGXwDyB4LPxUiLFvVAWCW2iFjEtJzzXZ8gNK3
NEW_SESSION_VERSION=Ubuntu 20.04 aarch64
NEW_SESSION_MOUNTED_VFOLDER=test
DELETE_SESSION=vNkj
CREATE_USER_NAME=test9
CREATE_USER_EMAIL=test9@lablup.com
CREATE_USER_PASSWORD=test123!
DELETE_USER_EMAIL=test9@lablup.com

How to run

  1. Follow extension guide to install extension
  2. Pull this branch
  3. Open test explorer at left side bar as in the picture below
스크린샷 2023-12-26 오후 6 03 33 4. Click to play button at test explorer or beside of code lines to run test 스크린샷 2023-12-26 오후 6 06 55 5. You can check the testing process through browser and test result on terminal 스크린샷 2023-12-26 오후 6 13 36 스크린샷 2023-12-26 오후 6 13 55

Checklist: (if applicable)

  • Mention to the original issue
  • Documentation
  • Minium required manager version
  • Specific setting for review (eg., KB link, endpoint or how to setup)
  • Minimum requirements to check during review
  • Test case(s) to demonstrate the difference of before/after

playwright/pages/CredentialPage.spec.ts Outdated Show resolved Hide resolved
playwright/pages/LoginPage.spec.ts Outdated Show resolved Hide resolved
Copy link

github-actions bot commented Feb 13, 2024

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements 3.02% 102/3378
🔴 Branches 3.19% 69/2165
🔴 Functions 1.5% 17/1133
🔴 Lines 3.08% 102/3315

Test suite run success

20 tests passing in 4 suites.

Report generated by 🧪jest coverage report action from 278c09f

@yomybaby
Copy link
Member

There have been many changes in the UI after this PR was created. Therefore, I will close this PR without merging and continue working from #2647 . @gee05053 Thank you for your contribution.

@yomybaby yomybaby closed this Aug 21, 2024
yomybaby added a commit that referenced this pull request Aug 22, 2024
…2647)

> [!NOTE]
> This PR is newly written referring to #2115

### TL;DR

Added end-to-end testing setup using Playwright

### What changed?

- Installed Playwright as a dev dependency
- Added Playwright configuration file (playwright.config.ts)
- Created initial end-to-end tests for login functionality and virtual folder operations
- Updated .gitignore to exclude Playwright-related files and directories
- Added a data-testid attribute to the user dropdown button for easier test selection

### How to test?

1. Install dependencies: `pnpm install`
2. Run the application locally
3. Execute the tests: `npx playwright test`
4. View the test results in the console or generated HTML report

### Why make this change?

Implementing end-to-end tests helps ensure the application's critical paths function correctly from a user's perspective. This addition will improve the overall quality and reliability of the project by catching potential issues early in the development process and providing confidence during future changes or refactoring.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort:normal Need to understand a few modules / some extent of contextual or historical information. size:XL 500~ LoC type:enhance Add new features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Let's implement E2E test using playwright
2 participants