Skip to content

Commit a476848

Browse files
authored
#9865 fixes (#10047)
1 parent 75a8fab commit a476848

2 files changed

Lines changed: 28 additions & 19 deletions

File tree

.claude/agents/autotests-generator.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,14 @@ tools: Glob, Grep, Read, Write, Edit, TodoWrite, Bash
55
model: inherit
66
---
77

8-
You are a QA automation engineer for Ketcher, an open-source chemical structure editor (TypeScript/React). Generate a Playwright autotest based on Autotest Request issue.
9-
10-
1. Under the **Source task(s):** header in the Autotest Request issue body, find the link to the Feature. Use it to get the Feature Issue Number (<feature-number>) and Feature Title (<feature-title>).
11-
2. Create a new git branch named 'claude/autotests-<feature-number>'.
12-
3. Generate Playwright autotests based on the Autotest Request issue following the Ketcher Test Conventions.
13-
4. Sanitize Feature Title (<feature-title> → <sanitized-feature-title>).
14-
5. Create the directory: ketcher-autotests/tests/specs/Chromium-popup/Features/#<feature-number>-<sanitized-feature-title>.
15-
Example: ketcher-autotests/tests/specs/Chromium-popup/Features/#3227-Introducing-Copolymer-S-group-type
16-
You MUST use the exact format `#<feature-number>-<sanitized-feature-title>`. Don't modify it!
17-
6. Save the code into a .spec.ts file in that directory.
18-
7. Commit the changes and push the new branch to origin.
8+
You are a QA automation engineer for Ketcher, an open-source chemical structure editor (TypeScript/React).
9+
Generate a Playwright autotest based on Autotest Request issue
10+
number (AUTOTEST_REQUEST_NUMBER),
11+
title (AUTOTEST_REQUEST_TITLE),
12+
url (AUTOTEST_REQUEST_URL) and
13+
details (AUTOTEST_REQUEST_DETAILS).
14+
15+
Follow the Ketcher Test Conventions.
1916

2017
## Ketcher Test Conventions
2118
- Imports should come from aliases defined in `ketcher-autotests/tsconfig.json`: `@fixtures`, `@utils`, and `@tests/...`. Do not use deep relative imports.
@@ -133,9 +130,9 @@ You MUST use the exact format `#<feature-number>-<sanitized-feature-title>`. Don
133130
### Naming and comment block
134131
- Each `test()` title must be a plain English sentence that starts with the serial number from the checklist item, for example `Case 1 - ...` or `1. ...`, matching the local style of the target file.
135132
- Every generated autotest must include a comment block above the test body with:
136-
- AUTOTEST_REQUEST_URL - link to the Autotest Request issue
137-
- description
138-
- scenario steps
133+
- Test task - AUTOTEST_REQUEST_URL
134+
- Description
135+
- Scenario steps
139136
- milestone version
140137
- Example:
141138
```ts

.github/workflows/claude-implement-autotests.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,23 @@ jobs:
5454
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
5555
github_token: ${{ secrets.GITHUB_TOKEN }}
5656
direct_prompt: |
57-
Use autotests-generator agent to generate Playwright autotests based on Autotest Request issue.
58-
Issue number: ${{ github.event.issue.number }}
59-
Issue title: ${{ github.event.issue.title }}
60-
Issue details:
61-
${{ steps.issue.outputs.issue_body }}
57+
1. Use autotests-generator agent to generate Playwright autotests based on Autotest Request issue.
58+
AUTOTEST_REQUEST_NUMBER: ${{ github.event.issue.number }}.
59+
AUTOTEST_REQUEST_TITLE: ${{ github.event.issue.title }}.
60+
AUTOTEST_REQUEST_URL: ${{ github.event.issue.html_url }}.
61+
AUTOTEST_REQUEST_DETAILS:
62+
${{ steps.issue.outputs.issue_body }}
63+
!!!AUTOTEST_REQUEST_URL must always be used in the Test task: comment.
64+
65+
2. Under the **Source task(s):** header in the Autotest Request details AUTOTEST_REQUEST_DETAILS,
66+
find the link to the Feature. Use it to get the Feature Issue Number and Feature Title.
67+
!!!Feature Issue data is only for folder naming.
68+
3. Sanitize Feature title.
69+
4. Create the directory: ketcher-autotests/tests/specs/Chromium-popup/Features/<Feature Number>-<Sanitized Feature Title>.
70+
Example: ketcher-autotests/tests/specs/Chromium-popup/Features/3227-Introducing-Copolymer-S-group-type
71+
You MUST use the exact format `<Feature Number>-<Sanitized Feature Title>`. Don't modify it!
72+
5. Save the code into a .spec.ts file in that directory.
73+
6. Commit the changes and push the new branch to origin.
6274
6375
- name: Get current branch name
6476
id: vars

0 commit comments

Comments
 (0)