Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 7, 2026

Resolves #4993 (FR-1885)

E2E test utilities had hardcoded endpoints and user credentials, preventing configuration for different testing environments. All values now use environment variables with fallback defaults.

Changes

e2e/utils/test-util.ts

  • Endpoints use E2E_WEBUI_ENDPOINT and E2E_WEBSERVER_ENDPOINT env vars
  • User credentials (admin, user, user2, monitor, domainAdmin) use E2E_*_EMAIL and E2E_*_PASSWORD env vars
  • All values fall back to original defaults when env vars unset

e2e/envs/.env.playwright.sample

  • Documents all 12 environment variables with defaults

README.md

  • Adds Environment Configuration section under Playwright test

Example

// Before
export const webuiEndpoint = 'http://127.0.0.1:9081';
export const userInfo = {
  admin: {
    email: '[email protected]',
    password: '-------',
  }
};

// After
export const webuiEndpoint = process.env.E2E_WEBUI_ENDPOINT || 'http://127.0.0.1:9081';
export const userInfo = {
  admin: {
    email: process.env.E2E_ADMIN_EMAIL || '[email protected]',
    password: process.env.E2E_ADMIN_PASSWORD || '-------',
  }
};

Usage

Local development continues to work without changes. For custom environments:

cp e2e/envs/.env.playwright.sample e2e/envs/.env.playwright
# Edit .env.playwright with custom values

CI/CD can inject via environment:

env:
  E2E_WEBUI_ENDPOINT: ${{ secrets.TEST_WEBUI_ENDPOINT }}
  E2E_ADMIN_EMAIL: ${{ secrets.TEST_ADMIN_EMAIL }}
Original prompt

e2e 테스트에서 사용하는 이 파일에 user에 대한 정보가 하드코딩되어 있다. 이를 환경변수가 지정되어 있는 경우 해당 값을 사용하고 없을 경우 기본 값을 사용하도록 개선해주세요. 뿐만아니라 webuiEndpoint 와 webServerEndpoint 도 e2e 실행하는 환경의 환경변수를 이용하도록 해주세요.

The user has attached the following file paths as relevant context:

  • .github/instructions/e2e.instructions.md
  • .github/instructions/i18n.instructions.md
  • .github/copilot-instructions.md
[Chronological Review: The conversation began with the user requesting modifications to the `test-util.ts` file to replace hardcoded user information with environment variables. The user specified that if environment variables are not set, default values should be used. The user also requested that `webuiEndpoint` and `webServerEndpoint` be configured to use environment variables for the e2e testing environment. The user then canceled a previous command to delegate the task to a cloud agent.]

[Intent Mapping:

  • User Request 1: "e2e 테스트에서 사용하는 이 파일에 user에 대한 정보가 하드코딩되어 있다. 이를 환경변수가 지정되어 있는 경우 해당 값을 사용하고 없을 경우 기본 값을 사용하도록 개선해주세요."
  • User Request 2: "뿐만아니라 webuiEndpoint 와 webServerEndpoint 도 e2e 실행하는 환경의 환경변수를 이용하도록 해주세요."
  • User Request 3: "Cancel: 'Delegate to cloud agent'"]

[Technical Inventory:

  • File: /Users/codejong/Workspace/lablup/webui/e2e/utils/test-util.ts
  • Concepts: Environment variables, hardcoding, e2e testing configuration.]

[Code Archaeology:

  • The user is focused on modifying the test-util.ts file, specifically lines 5 to 44, to implement the requested changes regarding user information and endpoints.]

[Progress Assessment:

  • Completed: User has specified the need for changes to the test-util.ts file.
  • Pending: Implementation of the changes to use environment variables instead of hardcoded values.]

[Context Validation: All critical information for continuation is captured, including user requests and the specific file being modified.]

[Recent Commands Analysis:

  • Last Agent Commands: The user requested modifications to the test-util.ts file and subsequently canceled a command to delegate the task to a cloud agent.
  • Tool Results Summary: No specific tool results were generated as the user canceled the delegation command.
  • Pre-Summary State: The agent was actively working on understanding and implementing the user's requests regarding the test-util.ts file when the token budget was exceeded.
  • Operation Context: The commands executed were directly related to the user's goal of improving the e2e testing setup by using environment variables.]
1. Conversation Overview: - Primary Objectives: - "e2e 테스트에서 사용하는 이 파일에 user에 대한 정보가 하드코딩되어 있다. 이를 환경변수가 지정되어 있는 경우 해당 값을 사용하고 없을 경우 기본 값을 사용하도록 개선해주세요." - "뿐만아니라 webuiEndpoint 와 webServerEndpoint 도 e2e 실행하는 환경의 환경변수를 이용하도록 해주세요." - Session Context: The user is focused on modifying the `test-util.ts` file to enhance its configuration for e2e testing by replacing hardcoded values with environment variables. - User Intent Evolution: The user initially requested specific changes to the file and later canceled a command to delegate the task to a cloud agent, indicating a desire to handle the modifications directly.
  1. Technical Foundation:
  • File: /Users/codejong/Workspace/lablup/webui/e2e/utils/test-util.ts
  • Purpose: This file is used for e2e testing and contains user information that needs to be configurable via environment variables.
  • Current State: The user has selected lines 5 to 44 for modification.
  1. Codebase Status:
  • File Name: test-util.ts
  • Purpose: To provide utility functions for e2e testing.
  • Current State: The user intends to modify the file to replace hardcoded user information and endpoints with environment variable configurations.
  • Key Code Segments: Specific lines (5 to 44) are targeted for changes.
  • Dependencies: The file's functionality is tied to the overall e2e testing framework.
  1. Problem Resolution:
  • Issues Encountered: Hardcoded values in the test-util.ts file.
  • Solutions Implemented: The user has proposed a solution to use environment variables instead.
  • Debugging Context: No ongoing troubleshooting efforts were mentioned.
  • Lessons Learned: The importance of configurability in testing environments.
  1. Progress Tracking:
  • Completed Tasks: User has articulated the need for changes to the test-util.ts file.
  • Partially Complete Work: The implementation of the requested changes is pending.
  1. Active Work State:
  • Current Focus: Modifying the test-util.ts file to implement user requests regarding environment variables.
  • Recent Context: The user has been focused on the specific lines of code that need modification.
  • Working Code: The user has not yet provided specific code snippets for modification.
  • Immediate Context: The user was preparing to implement changes to the file when the token budget was exceeded.
  1. Recent Operations:
  • Last Agent Commands: User requested modifications to the test-util.ts file and canceled a command to delegate the task.
  • Tool Results Summary: No spec...

Created from VS Code.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@cla-assistant
Copy link

cla-assistant bot commented Jan 7, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

1 similar comment
@cla-assistant
Copy link

cla-assistant bot commented Jan 7, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copilot AI changed the title [WIP] Improve user info handling in e2e tests using environment variables feat: Replace hardcoded e2e test credentials with environment variables Jan 7, 2026
Copilot AI requested a review from yomybaby January 7, 2026 09:53
@github-actions github-actions bot added the size:M 30~100 LoC label Jan 7, 2026
@yomybaby yomybaby changed the title feat: Replace hardcoded e2e test credentials with environment variables feat(FR-1885): Replace hardcoded e2e test credentials with environment variables Jan 8, 2026
@yomybaby yomybaby marked this pull request as ready for review January 8, 2026 06:03
Copilot AI review requested due to automatic review settings January 8, 2026 06:03
@yomybaby yomybaby requested a review from nowgnuesLee January 8, 2026 06:07
Copy link
Member

@yomybaby yomybaby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR replaces hardcoded E2E test credentials and endpoints with environment variables, enabling configuration for different testing environments while maintaining backward compatibility through fallback defaults.

Key Changes:

  • E2E test utilities now read from environment variables with fallback to original defaults
  • New sample environment file documents all 12 configurable variables
  • README documentation updated with environment configuration instructions

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
e2e/utils/test-util.ts Replaced hardcoded endpoints and user credentials with environment variable lookups (using process.env.E2E_*) with fallback defaults
e2e/envs/.env.playwright.sample Added comprehensive documentation for all 12 environment variables (2 endpoints + 10 user credentials)
README.md Added "Environment Configuration" section under Playwright test with setup instructions and variable descriptions
.claude/commands/create-jira-issue.md Removed "feat(FR-XXXX):" prefix from example description (appears unrelated to main PR purpose)

Copy link
Member

yomybaby commented Jan 8, 2026


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Contributor

@nowgnuesLee nowgnuesLee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@graphite-app
Copy link

graphite-app bot commented Jan 8, 2026

Merge activity

…t variables (#4987)

Resolves #4993 ([FR-1885](https://lablup.atlassian.net/browse/FR-1885))

E2E test utilities had hardcoded endpoints and user credentials, preventing configuration for different testing environments. All values now use environment variables with fallback defaults.

## Changes

**`e2e/utils/test-util.ts`**
- Endpoints use `E2E_WEBUI_ENDPOINT` and `E2E_WEBSERVER_ENDPOINT` env vars
- User credentials (admin, user, user2, monitor, domainAdmin) use `E2E_*_EMAIL` and `E2E_*_PASSWORD` env vars
- All values fall back to original defaults when env vars unset

**`e2e/envs/.env.playwright.sample`**
- Documents all 12 environment variables with defaults

**`README.md`**
- Adds Environment Configuration section under Playwright test

## Example

```typescript
// Before
export const webuiEndpoint = 'http://127.0.0.1:9081';
export const userInfo = {
  admin: {
    email: '[email protected]',
    password: '-------',
  }
};

// After
export const webuiEndpoint = process.env.E2E_WEBUI_ENDPOINT || 'http://127.0.0.1:9081';
export const userInfo = {
  admin: {
    email: process.env.E2E_ADMIN_EMAIL || '[email protected]',
    password: process.env.E2E_ADMIN_PASSWORD || '-------',
  }
};
```

## Usage

Local development continues to work without changes. For custom environments:

```bash
cp e2e/envs/.env.playwright.sample e2e/envs/.env.playwright
# Edit .env.playwright with custom values
```

CI/CD can inject via environment:
```yaml
env:
  E2E_WEBUI_ENDPOINT: ${{ secrets.TEST_WEBUI_ENDPOINT }}
  E2E_ADMIN_EMAIL: ${{ secrets.TEST_ADMIN_EMAIL }}
```

<!-- START COPILOT ORIGINAL PROMPT -->

<details>

<summary>Original prompt</summary>

e2e 테스트에서 사용하는 이 파일에 user에 대한 정보가 하드코딩되어 있다. 이를 환경변수가 지정되어 있는 경우 해당 값을 사용하고 없을 경우 기본 값을 사용하도록 개선해주세요. 뿐만아니라 webuiEndpoint 와 webServerEndpoint 도 e2e 실행하는 환경의 환경변수를 이용하도록 해주세요.

The user has attached the following file paths as relevant context:
 - .github/instructions/e2e.instructions.md
 - .github/instructions/i18n.instructions.md
 - .github/copilot-instructions.md

<analysis>
[Chronological Review: The conversation began with the user requesting modifications to the `test-util.ts` file to replace hardcoded user information with environment variables. The user specified that if environment variables are not set, default values should be used. The user also requested that `webuiEndpoint` and `webServerEndpoint` be configured to use environment variables for the e2e testing environment. The user then canceled a previous command to delegate the task to a cloud agent.]

[Intent Mapping:
- User Request 1: "e2e 테스트에서 사용하는 이 파일에 user에 대한 정보가 하드코딩되어 있다. 이를 환경변수가 지정되어 있는 경우 해당 값을 사용하고 없을 경우 기본 값을 사용하도록 개선해주세요."
- User Request 2: "뿐만아니라 webuiEndpoint 와 webServerEndpoint 도 e2e 실행하는 환경의 환경변수를 이용하도록 해주세요."
- User Request 3: "Cancel: 'Delegate to cloud agent'"]

[Technical Inventory:
- File: `/Users/codejong/Workspace/lablup/webui/e2e/utils/test-util.ts`
- Concepts: Environment variables, hardcoding, e2e testing configuration.]

[Code Archaeology:
- The user is focused on modifying the `test-util.ts` file, specifically lines 5 to 44, to implement the requested changes regarding user information and endpoints.]

[Progress Assessment:
- Completed: User has specified the need for changes to the `test-util.ts` file.
- Pending: Implementation of the changes to use environment variables instead of hardcoded values.]

[Context Validation: All critical information for continuation is captured, including user requests and the specific file being modified.]

[Recent Commands Analysis:
- Last Agent Commands: The user requested modifications to the `test-util.ts` file and subsequently canceled a command to delegate the task to a cloud agent.
- Tool Results Summary: No specific tool results were generated as the user canceled the delegation command.
- Pre-Summary State: The agent was actively working on understanding and implementing the user's requests regarding the `test-util.ts` file when the token budget was exceeded.
- Operation Context: The commands executed were directly related to the user's goal of improving the e2e testing setup by using environment variables.]

</analysis>

<summary>
1. Conversation Overview:
- Primary Objectives:
  - "e2e 테스트에서 사용하는 이 파일에 user에 대한 정보가 하드코딩되어 있다. 이를 환경변수가 지정되어 있는 경우 해당 값을 사용하고 없을 경우 기본 값을 사용하도록 개선해주세요."
  - "뿐만아니라 webuiEndpoint 와 webServerEndpoint 도 e2e 실행하는 환경의 환경변수를 이용하도록 해주세요."
- Session Context: The user is focused on modifying the `test-util.ts` file to enhance its configuration for e2e testing by replacing hardcoded values with environment variables.
- User Intent Evolution: The user initially requested specific changes to the file and later canceled a command to delegate the task to a cloud agent, indicating a desire to handle the modifications directly.

2. Technical Foundation:
- File: `/Users/codejong/Workspace/lablup/webui/e2e/utils/test-util.ts`
- Purpose: This file is used for e2e testing and contains user information that needs to be configurable via environment variables.
- Current State: The user has selected lines 5 to 44 for modification.

3. Codebase Status:
- File Name: `test-util.ts`
- Purpose: To provide utility functions for e2e testing.
- Current State: The user intends to modify the file to replace hardcoded user information and endpoints with environment variable configurations.
- Key Code Segments: Specific lines (5 to 44) are targeted for changes.
- Dependencies: The file's functionality is tied to the overall e2e testing framework.

4. Problem Resolution:
- Issues Encountered: Hardcoded values in the `test-util.ts` file.
- Solutions Implemented: The user has proposed a solution to use environment variables instead.
- Debugging Context: No ongoing troubleshooting efforts were mentioned.
- Lessons Learned: The importance of configurability in testing environments.

5. Progress Tracking:
- Completed Tasks: User has articulated the need for changes to the `test-util.ts` file.
- Partially Complete Work: The implementation of the requested changes is pending.

6. Active Work State:
- Current Focus: Modifying the `test-util.ts` file to implement user requests regarding environment variables.
- Recent Context: The user has been focused on the specific lines of code that need modification.
- Working Code: The user has not yet provided specific code snippets for modification.
- Immediate Context: The user was preparing to implement changes to the file when the token budget was exceeded.

7. Recent Operations:
- Last Agent Commands: User requested modifications to the `test-util.ts` file and canceled a command to delegate the task.
- Tool Results Summary: No spec...

</details>

<!-- START COPILOT CODING AGENT SUFFIX -->

Created from [VS Code](https://code.visualstudio.com/docs/copilot/copilot-coding-agent).

<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs.

[FR-1885]: https://lablup.atlassian.net/browse/FR-1885?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
@graphite-app graphite-app bot force-pushed the copilot/update-e2e-user-info-handling branch from 51e0a55 to 7957ac8 Compare January 8, 2026 07:24
@graphite-app graphite-app bot merged commit 7957ac8 into main Jan 8, 2026
7 of 8 checks passed
@graphite-app graphite-app bot deleted the copilot/update-e2e-user-info-handling branch January 8, 2026 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30~100 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace hardcoded E2E test endpoints and credentials with environment variables

3 participants