Below is a small Angular scenario with a reactive form and synchronous validation. The test does not trigger browser DOM events: it directly calls component methods and prints the final log via console.log. In the current implementation, the form confirmation state behaves incorrectly after a field change.
ChangeDetectionStrategy.OnPush is used.email field is required and must pass validation for the @ symbol.submit() method must add to the log:
blocked — if the form is invalid;sent:<email> — if the form is valid.email value is changed afterward, this flag must be reset so that resubmission depends on the current state of the form.npm install
npx tsx src/main.ts
email;submit();email to another value;true.22.14.05.6.320.0.07.8.1npx tsx src/main.tsChangeDetectionStrategy.OnPushClick a line and write what it prints. Explanation is optional.