Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .claude/commands/create-jira-issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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

Expand Down
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
28 changes: 27 additions & 1 deletion e2e/envs/.env.playwright.sample
Original file line number Diff line number Diff line change
@@ -1 +1,27 @@
SCREENSHOT_PATH=./screenshots
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
[email protected]
E2E_ADMIN_PASSWORD=wJalrXUt

# Regular user
[email protected]
E2E_USER_PASSWORD=C8qnIo29

# Second regular user
[email protected]
E2E_USER2_PASSWORD=P7oxTDdz

# Monitor user
[email protected]
E2E_MONITOR_PASSWORD=7tuEwF1J

# Domain admin user
[email protected]
E2E_DOMAIN_ADMIN_PASSWORD=cWbsM_vB
26 changes: 13 additions & 13 deletions e2e/utils/test-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -22,24 +22,24 @@ export async function login(

export const userInfo = {
admin: {
email: '[email protected]',
password: 'wJalrXUt',
email: process.env.E2E_ADMIN_EMAIL || '[email protected]',
password: process.env.E2E_ADMIN_PASSWORD || 'wJalrXUt',
},
user: {
email: '[email protected]',
password: 'C8qnIo29',
email: process.env.E2E_USER_EMAIL || '[email protected]',
password: process.env.E2E_USER_PASSWORD || 'C8qnIo29',
},
user2: {
email: '[email protected]',
password: 'P7oxTDdz',
email: process.env.E2E_USER2_EMAIL || '[email protected]',
password: process.env.E2E_USER2_PASSWORD || 'P7oxTDdz',
},
monitor: {
email: '[email protected]',
password: '7tuEwF1J',
email: process.env.E2E_MONITOR_EMAIL || '[email protected]',
password: process.env.E2E_MONITOR_PASSWORD || '7tuEwF1J',
},
domainAdmin: {
email: '[email protected]',
password: 'cWbsM_vB',
email: process.env.E2E_DOMAIN_ADMIN_EMAIL || '[email protected]',
password: process.env.E2E_DOMAIN_ADMIN_PASSWORD || 'cWbsM_vB',
},
};

Expand All @@ -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) {
Expand Down
Loading