Creates automated tests using Playwright and Page Objects, integrating assertions and test plans from previous phases of aqa-flow. Determines file location, sets up structure, and writes test code.
Ships in core. Installing the plugin adds it to Claude Code.
Create automated test following project standards, integrating all Page Objects and assertions defined in previous phases.
Actions:
### Test Implementation Outline
**Test Location**: tests/dashboard/user-profile.test.ts
**Test Name**: should display correct welcome message after login
**Setup Requirements**: Login as test user
**Dependencies**: DashboardPage, LoginPage, test-helpers
**Test Structure**:
1. Setup: Login with test user
2. Action: Navigate to dashboard
3. Assertions:
- Welcome message visible
- Welcome message contains username
- Dashboard title correct
4. Cleanup: None required (handled by test framework)
Expected Output: Clear outline of test to implement.
Actions:
Expected Output: Decision made and target file identified.
Actions:
// Example structure for new test file
import { test, expect } from '@playwright/test';
import { DashboardPage } from '../pages/DashboardPage';
import { LoginPage } from '../pages/LoginPage';
import { loginAsUser } from '../utils/test-helpers';
test.describe('Dashboard - User Profile', () => {
// Tests will go here
});
Expected Output: Test file ready for test implementation.
Actions:
test('should display correct welcome message after login', async ({ page }) => {
// Setup: Login as test user
const loginPage = new LoginPage(page);
const dashboardPage = new DashboardPage(page);
await page.goto('/login');
await loginPage.login('[email protected]', 'password123');
// OR use utility if available:
await loginAsUser(page, 'testuser');
Expected Output: Test setup implemented.
Actions:
// Step 1: Navigate to dashboard
await page.goto('/dashboard');
await page.waitForLoadState('networkidle');
// Step 2: Verify page loaded
await dashboardPage.waitForPageLoad(); // If method exists
Expected Output: All test actions implemented.
Actions:
// Assertion 1: Welcome message is visible
const welcomeMessage = await dashboardPage.getWelcomeMessage();
expect(welcomeMessage).toBeVisible();
// Assertion 2: Welcome message contains username
expect(welcomeMessage).toContain('Welcome, Test User');
// Assertion 3: Dashboard title is correct
const title = await dashboardPage.getDashboardTitle();
expect(title).toBe('My Dashboard');
// Assertion 4: User profile icon is visible
expect(await dashboardPage.isUserProfileIconVisible()).toBe(true);
Expected Output: All assertions implemented explicitly.
Actions:
test('should display correct welcome message after login', async ({ page }) => {
// TestRail: TC-1234
// Tests that the dashboard shows personalized welcome message
// after successful user login
// Wait for dynamic content to load
await page.waitForSelector('[data-testid="welcome-message"]');
// Verify message format matches expected pattern
expect(welcomeMessage).toMatch(/^Welcome, [A-Za-z\s]+$/);
Expected Output: Test properly documented.
Actions:
// Option 1: In test
try {
// Test code
} finally {
// Cleanup code
}
// Option 2: In afterEach hook
test.afterEach(async ({ page }) => {
// Cleanup code
});
Expected Output: Cleanup implemented if required.
Actions:
Use: ReadLints tool on test file
Expected Output: Validated, lint-free test implementation.
Actions:
Add Phase 6 section to test plan:
## Phase 6: Test Implementation
### Test File
- Location: tests/dashboard/user-profile.test.ts
- Type: [New file / Added to existing]
- Test Name: should display correct welcome message after login
### Implementation Details
**Imports**:
- Playwright test framework
- DashboardPage, LoginPage
- test-helpers utility
**Test Structure**:
1. Setup: Login with test user credentials
2. Navigate: Go to dashboard page
3. Assertions:
- Welcome message visibility
- Welcome message contains "Welcome, Test User"
- Dashboard title equals "My Dashboard"
- User profile icon visible
**Page Objects Used**:
- LoginPage: login() method
- DashboardPage: getWelcomeMessage(), getDashboardTitle(), isUserProfileIconVisible()
**Utilities Used**:
- loginAsUser() from test-helpers
**Assertions**: 4 explicit assertions
### Test Code
```typescript
[Include the complete test code or reference file path]
Expected Output: Complete test plan with implementation details.
agents/aqa-state.md updated with Phase 6 completionAfter completing Phase 6, update agents/aqa-state.md:
### Phase 6: Test Implementation
- Completed: [DateTime]
- Test File: [Path]
- Test Name: [Name]
- Test Type: [New file / Added to existing]
- Assertions Implemented: [Count]
- Page Objects Used: [List]
- Utilities Used: [List]
- Lines of Code: [Approximate]
- Status: Ready for execution
## Final Status
✅ AQA Flow Complete - Test automation ready
Mark Phase 6 as completed. DO NOT mark overall AQA state as COMPLETE yet.
CRITICAL: Agent must STOP and WAIT for user to execute the test before proceeding.
Actions:
# Example command (adjust for your project)
npm test tests/dashboard/user-profile.test.ts
User Interaction Format:
Test implementation is complete! The test file has been created at: [test file path]
## Next Steps
1. **Execute the test**:
[Provide test execution command]
2. **Review test results**:
- Check if test passes or fails
- Note any errors or failures
- Save test report if generated
3. **When ready for analysis**:
- If test passed: You can proceed to Phase 7 for report analysis (optional)
- If test failed: Proceed to Phase 7 to analyze failures and then Phase 8 to correct issues
Please execute the test and let me know when you're ready to proceed to Phase 7 (Test Report Analysis).
Expected Output: User confirms test execution is complete and indicates readiness for Phase 7.
After user executes test and confirms readiness, proceed to Phase 7: Test Report Analysis by executing:
ACQUIRE aqa-flow-test-report-analysis.md FROM KB
agents/user-instructions/) throughout test implementationFiles this command reads when invoked
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
/griddynamics-core-instructions-r2-core:aqa-flow-test-implementationfrom core
Generated from the plugin's indexed repository (griddynamics/rosetta) — no native marketplace selected
npx claudepluginhub p/griddynamics-core-instructions-r2-core43 commands in this plugin
/aqa-flow-data-collectionPhase 1 Data Collection of aqa-flowOther plugins' commands for the same job