feat(test-plans): add design-fix-test-plan skill and related tests#36124
feat(test-plans): add design-fix-test-plan skill and related tests#36124nicobytes wants to merge 2 commits into
Conversation
### Proposed Changes Introduces a new skill, **design-fix-test-plan**, that generates structured test plans for bug fixes and features in dotCMS. The skill operates in three modes: TDD, QA post-fix, and QA pre-fix, allowing users to create test cases with detailed reproduction steps and expected results. - Added README.md and SKILL.md documentation for the new skill. - Implemented E2E tests for binary, file, and image fields, ensuring functionality for uploading, importing, and validation of required fields. - Created helper classes for binary and file fields to streamline test interactions. ### Checklist - [x] Documentation added - [x] E2E tests implemented Closes #XXXX (replace with relevant issue number if applicable)
|
Claude finished @nicobytes's task in 1m 39s —— View job Code Review
E2E Tests1. Assertion is too weak — allows 4xx/5xx to pass
expect(response.status()).not.toBe(400);A 500, 503, or 404 passes this check. Use 2.
async expectPreviewShowsFileName(fileName: string) {
const codePreview = this.preview.getByTestId('code-preview');
if (await codePreview.isVisible()) {
await expect(codePreview).toBeVisible({ timeout: 15000 });
return; // ← exits without checking fileName
}
// ...
}When 3. Cross-field helper dependency
import { E2E_IMPORT_URL, REQUIRED_FIELD_ERROR, createTestTextFile }
from '../../file-field/helpers/file-field';
export { E2E_IMPORT_URL, createTestTextFile };
4. CSS selector used outside Dojo iframe context
const closeButton = dialog
.locator('.p-dialog-header-close, .p-dialog-close-button, button[aria-label="Close"]')
.first();Per 5.
this.requiredError = page
.locator(`dot-binary-field-wrapper[data-testid="field-${fieldVariable}"]`)
.locator('.error-message small');
6. Lines 18–20 of 7.
8. Reload test bypasses the helper abstraction
await expect(field.preview.getByTestId('code-preview')).toContainText(
'dotCMS E2E test file content'
);
Skill Files (
|
… matching ### Changes Made - Consolidated import statements in `binary-field.spec.ts` and `image-field.spec.ts` for improved readability. - Reformatted the URL matching logic to enhance clarity and maintainability in both test files. ### Checklist - [x] Code readability improved - [x] No functional changes introduced This refactor aims to enhance the maintainability of the E2E tests for binary and image fields without altering their functionality.
Proposed Changes
Introduces a new skill, design-fix-test-plan, that generates structured test plans for bug fixes and features in dotCMS. The skill operates in three modes: TDD, QA post-fix, and QA pre-fix, allowing users to create test cases with detailed reproduction steps and expected results.
Checklist
Closes #XXXX (replace with relevant issue number if applicable)
Proposed Changes
Checklist
Additional Info
** any additional useful context or info **
Screenshots
This PR fixes: #36123