diff --git a/.claude/commands/create-jira-issue.md b/.claude/commands/create-jira-issue.md index ef47c66d75..ba7a5be230 100644 --- a/.claude/commands/create-jira-issue.md +++ b/.claude/commands/create-jira-issue.md @@ -86,7 +86,7 @@ Current Claude Code commands use inconsistent text-based prompts ("Proceed? [y/n options: [ { label: "Yes, Create Issue (Recommended)", - description: "Type: Task\nTitle: feat(FR-XXXX): Your title here\nDescription: Your description here..." + description: "Type: Task\nTitle: Your title here\nDescription: Your description here..." }, { label: "Edit Details", @@ -100,6 +100,7 @@ Current Claude Code commands use inconsistent text-based prompts ("Proceed? [y/n }] }) ``` +- **IMPORTANT**: Jira issue titles should only contain the actual description without prefixes like `feat`, `fix`, or `(FR-XXXX)`. These prefixes belong in PR titles, not Jira issue titles. - **Do NOT create the issue without user confirmation through AskUserQuestion** - Only proceed with creation after user selects the confirmation option diff --git a/README.md b/README.md index 52851cd633..8a62bb4f11 100644 --- a/README.md +++ b/README.md @@ -212,6 +212,24 @@ The project uses `Playwright` as E2E testing framework and `Jest` as JavaScript #### Playwright test To perform E2E tests, you must run complete Backend.AI cluster before starting test. + +##### Environment Configuration + +E2E tests can be configured using environment variables. Copy the sample environment file and customize it: + +```console +$ cp e2e/envs/.env.playwright.sample e2e/envs/.env.playwright +``` + +Available environment variables: +- `E2E_WEBUI_ENDPOINT` - WebUI endpoint URL (default: `http://127.0.0.1:9081`) +- `E2E_WEBSERVER_ENDPOINT` - Backend.AI server endpoint URL (default: `http://127.0.0.1:8090`) +- User credentials: `E2E_ADMIN_EMAIL`, `E2E_ADMIN_PASSWORD`, `E2E_USER_EMAIL`, `E2E_USER_PASSWORD`, etc. + +If environment variables are not set, default values will be used. + +##### Running Tests + On a terminal: ```console diff --git a/e2e/envs/.env.playwright.sample b/e2e/envs/.env.playwright.sample index 88f062dce0..75cb8cba2d 100644 --- a/e2e/envs/.env.playwright.sample +++ b/e2e/envs/.env.playwright.sample @@ -1 +1,27 @@ -SCREENSHOT_PATH=./screenshots \ No newline at end of file +SCREENSHOT_PATH=./screenshots + +# E2E Test Configuration +# Endpoints +E2E_WEBUI_ENDPOINT=http://127.0.0.1:9081 +E2E_WEBSERVER_ENDPOINT=http://127.0.0.1:8090 + +# User Credentials +# Admin user +E2E_ADMIN_EMAIL=admin@lablup.com +E2E_ADMIN_PASSWORD=wJalrXUt + +# Regular user +E2E_USER_EMAIL=user@lablup.com +E2E_USER_PASSWORD=C8qnIo29 + +# Second regular user +E2E_USER2_EMAIL=user2@lablup.com +E2E_USER2_PASSWORD=P7oxTDdz + +# Monitor user +E2E_MONITOR_EMAIL=monitor@lablup.com +E2E_MONITOR_PASSWORD=7tuEwF1J + +# Domain admin user +E2E_DOMAIN_ADMIN_EMAIL=domain-admin@lablup.com +E2E_DOMAIN_ADMIN_PASSWORD=cWbsM_vB \ No newline at end of file diff --git a/e2e/utils/test-util.ts b/e2e/utils/test-util.ts index 721c2f7a9d..daa2b17200 100644 --- a/e2e/utils/test-util.ts +++ b/e2e/utils/test-util.ts @@ -2,8 +2,8 @@ import { FolderCreationModal } from './classes/FolderCreationModal'; import TOML from '@iarna/toml'; import { APIRequestContext, Locator, Page, expect } from '@playwright/test'; -export const webuiEndpoint = 'http://127.0.0.1:9081'; -export const webServerEndpoint = 'http://127.0.0.1:8090'; +export const webuiEndpoint = process.env.E2E_WEBUI_ENDPOINT || 'http://127.0.0.1:9081'; +export const webServerEndpoint = process.env.E2E_WEBSERVER_ENDPOINT || 'http://127.0.0.1:8090'; export const visualRegressionWebserverEndpoint = 'http://10.122.10.216:8090'; export async function login( @@ -22,24 +22,24 @@ export async function login( export const userInfo = { admin: { - email: 'admin@lablup.com', - password: 'wJalrXUt', + email: process.env.E2E_ADMIN_EMAIL || 'admin@lablup.com', + password: process.env.E2E_ADMIN_PASSWORD || 'wJalrXUt', }, user: { - email: 'user@lablup.com', - password: 'C8qnIo29', + email: process.env.E2E_USER_EMAIL || 'user@lablup.com', + password: process.env.E2E_USER_PASSWORD || 'C8qnIo29', }, user2: { - email: 'user2@lablup.com', - password: 'P7oxTDdz', + email: process.env.E2E_USER2_EMAIL || 'user2@lablup.com', + password: process.env.E2E_USER2_PASSWORD || 'P7oxTDdz', }, monitor: { - email: 'monitor@lablup.com', - password: '7tuEwF1J', + email: process.env.E2E_MONITOR_EMAIL || 'monitor@lablup.com', + password: process.env.E2E_MONITOR_PASSWORD || '7tuEwF1J', }, domainAdmin: { - email: 'domain-admin@lablup.com', - password: 'cWbsM_vB', + email: process.env.E2E_DOMAIN_ADMIN_EMAIL || 'domain-admin@lablup.com', + password: process.env.E2E_DOMAIN_ADMIN_PASSWORD || 'cWbsM_vB', }, }; @@ -56,7 +56,7 @@ export async function loginAsDomainAdmin(page: Page) { page, userInfo.domainAdmin.email, userInfo.domainAdmin.password, - 'http://127.0.0.1:8090', + webServerEndpoint, ); } export async function loginAsUser(page: Page) {