/** * assertion-generation.skill.ts * * Generates an ordered list of compact flow steps with ready-to-use Playwright * assertion expressions for each element found on the page. * * This skill runs as part of the generate_test flow. It builds a CompactStep[] * array that covers the full user journey: * - Navigation and page load verification * - Popup/modal dismissal if needed * - Navigation link visibility checks * - Form field fill steps with value assertions * - Button click steps with enabled/visible assertions * - Table visibility checks * - Final heading/state verification * * The resulting steps are then compressed by ContextCompressor and embedded * into the spec-generation prompt for Claude. Each assertion is a complete * expect() expression Claude can copy verbatim into the test. * * Role in the overall flow: * SkillOrchestrator.autoExecute() → AssertionGenerationSkill.execute() * → CompactStep[] → buildSpecPrompt() → Claude writes spec */ import { SkillContext, SkillResult } from '../types'; import { BaseSkill } from './base.skill'; /** * Builds a complete ordered set of flow steps with ready-to-use Playwright * assertion expressions derived from the page's DOM structure. */ export declare class AssertionGenerationSkill extends BaseSkill { readonly name = "assertion-generation"; /** * Analyse the page and generate an ordered array of CompactSteps, each with * a description and one or more assertion expressions. * * @param ctx - The skill context containing the full page analysis. * @returns A SkillResult where metadata.steps holds the CompactStep[]. */ execute(ctx: SkillContext): Promise; /** * Escape special regex characters in a string so it can be embedded safely * inside a regex literal in a generated assertion expression. * * @param s - Raw string to escape. * @returns Escaped string safe for use in /.../ patterns. */ private esc; /** * Convert a label string into a camelCase key suitable for use as an elementKey. * * @param s - Human-readable label, e.g. "Email Address". * @returns A camelCase key, e.g. "emailAddress". */ private toKey; } //# sourceMappingURL=assertion-generation.skill.d.ts.map