test: add migration modify http proxy test case

This commit is contained in:
Minh141120 2025-09-03 14:53:17 +07:00
parent af5afc00f6
commit f45d283e88
3 changed files with 146 additions and 1 deletions

View File

@ -0,0 +1,73 @@
prompt = """
You are a GUI agent. You are given a task and your action history, with screenshots. You need to perform the next action to complete the task.
## Output Format
```
Thought: ...
Action: ...
```
## Action Space
click(start_box='<|box_start|>(x1,y1)<|box_end|>')
left_double(start_box='<|box_start|>(x1,y1)<|box_end|>')
right_single(start_box='<|box_start|>(x1,y1)<|box_end|>')
drag(start_box='<|box_start|>(x1,y1)<|box_end|>', end_box='<|box_start|>(x3,y3)<|box_end|>')
hotkey(key='')
type(content='') #If you want to submit your input, use "\
" at the end of `content`.
scroll(start_box='<|box_start|>(x1,y1)<|box_end|>', direction='down or up or right or left')
wait() #Sleep for 5s and take a screenshot to check for any changes.
finished()
call_user() # Submit the task and call the user when the task is unsolvable, or when you need the user's help.
## Note
- Use Chinese in `Thought` part.
- Summarize your next action (with its target element) in one sentence in `Thought` part.
## User Instruction
You are configuring HTTPS Proxy settings in the OLD version of the Jan application.
PHASE: SETUP HTTPS PROXY (OLD VERSION)
Step-by-step instructions:
1. Open the Jan application (OLD version).
- If a dialog appears in the bottom-right corner titled **"Help Us Improve Jan"**, click **Deny** to dismiss it before continuing.
- If **New Version Available** popup appears on app launch (older versions), click **Remind Me Later** to dismiss it before continuing.
2. Navigate to HTTPS Proxy settings:
- In the bottom-left menu, click **Settings**.
- In the left sidebar, click **HTTPS Proxy**.
3. Configure HTTPS Proxy:
- Proxy URL: In the field with placeholder `http://proxy.example.com:8080`, enter `http://test-proxy.com:8081` (only change it if it's different).
- Authentication:
- Username: enter `test123` (only if different or empty).
- Password: enter `123` (only if different or empty; field may be masked).
- Ignore SSL Certificates:
- Click the middle of the toggle/chip to enable Ignore SSL Certificates (only if not already enabled).
4. Return result:
- If the Proxy URL is set to `http://test-proxy.com:8081` AND Username is set to `test123` AND Password is provided AND Ignore SSL Certificates is enabled, return:
{"result": True, "phase": "setup_complete"}
- If there are any issues with configuration, return:
{"result": False, "phase": "setup_failed"}
CRITICAL INSTRUCTIONS FOR FINAL RESPONSE:
- You MUST respond in English only, not any other language
- You MUST return ONLY the JSON format below, nothing else
- Do NOT add any explanations, thoughts, or additional text
- If the configuration is successful, return:
{"result": True, "phase": "setup_complete"}
- If there are any issues, return:
{"result": False, "phase": "setup_failed"}
IMPORTANT:
- Your response must be ONLY the JSON above
- Do NOT add any other text before or after the JSON
"""

View File

@ -0,0 +1,72 @@
prompt = """
You are a GUI agent. You are given a task and your action history, with screenshots. You need to perform the next action to complete the task.
## Output Format
```
Thought: ...
Action: ...
```
## Action Space
click(start_box='<|box_start|>(x1,y1)<|box_end|>')
left_double(start_box='<|box_start|>(x1,y1)<|box_end|>')
right_single(start_box='<|box_start|>(x1,y1)<|box_end|>')
drag(start_box='<|box_start|>(x1,y1)<|box_end|>', end_box='<|box_start|>(x3,y3)<|box_end|>')
hotkey(key='')
type(content='') #If you want to submit your input, use "\
" at the end of `content`.
scroll(start_box='<|box_start|>(x1,y1)<|box_end|>', direction='down or up or right or left')
wait() #Sleep for 5s and take a screenshot to check for any changes.
finished()
call_user() # Submit the task and call the user when the task is unsolvable, or when you need the user's help.
## Note
- Use Chinese in `Thought` part.
- Summarize your next action (with its target element) in one sentence in `Thought` part.
## User Instruction
You are verifying that HTTPS Proxy settings persist after upgrading to the NEW version of the Jan application.
PHASE: VERIFY HTTPS PROXY PERSISTENCE (NEW VERSION)
Step-by-step instructions:
1. Open the Jan application (NEW version).
- If a dialog appears in the bottom-right corner titled **"Help Us Improve Jan"**, click **Deny** to dismiss it before continuing.
- If **New Version Available** popup appears on app launch (older versions), click **Remind Me Later** to dismiss it before continuing.
2. Navigate to HTTPS Proxy settings:
- In the bottom-left menu, click **Settings**.
- In the left sidebar, click **HTTPS Proxy**.
3. Verify HTTPS Proxy settings:
- Proxy URL: Verify it contains `http://test-proxy.com:8081`.
- Authentication:
- Username: Verify it contains `test123`.
- Password: If the Password field is masked/hidden, skip explicit value verification.
- Ignore SSL Certificates: Verify that the toggle/chip is enabled.
4. Return result:
- If the Proxy URL is `http://test-proxy.com:8081` AND Username is `test123` AND Ignore SSL Certificates is enabled, return:
{"result": True, "phase": "verification_complete"}
- If any of the settings have reverted or are missing, return:
{"result": False, "phase": "verification_failed"}
CRITICAL INSTRUCTIONS FOR FINAL RESPONSE:
- You MUST respond in English only, not any other language
- You MUST return ONLY the JSON format below, nothing else
- Do NOT add any explanations, thoughts, or additional text
- If the settings persist and are correct, return:
{"result": True, "phase": "verification_complete"}
- If there are any issues, return:
{"result": False, "phase": "verification_failed"}
IMPORTANT:
- Your response must be ONLY the JSON above
- Do NOT add any other text before or after the JSON
"""

View File

@ -10,7 +10,7 @@ Before testing, set-up the following in the old version to make sure that we can
- [x] Ensure there are 2 import on local provider (llama.cpp) - [x] Ensure there are 2 import on local provider (llama.cpp)
- [x] Modify MCP servers list and add some ENV value to MCP servers - [x] Modify MCP servers list and add some ENV value to MCP servers
- [x] Modify Local API Server ✅ - [x] Modify Local API Server ✅
- [x] HTTPS proxy config value 🔥 - [x] HTTPS proxy config value
- [x] Add 2 custom assistants to Jan 🔥🔥 - [x] Add 2 custom assistants to Jan 🔥🔥
- [x] Create a new chat with the custom assistant 🔥🔥🔥 - [x] Create a new chat with the custom assistant 🔥🔥🔥
- [x] Change the `App Data` to some other folder - [x] Change the `App Data` to some other folder