angular-e2e-mocking

Mock Keycloak/OAuth2 authentication and REST APIs for deterministic Angular end-to-end tests.

11|1|Updated Feb 9, 2026
One-click install
npx skills add https://github.com/mindcockpit-ai/cognitive-core --skill angular-e2e-mocking
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: angular-e2e-mocking
Source: https://github.com/mindcockpit-ai/cognitive-core/tree/main/language-packs/angular/skills/angular-e2e-mocking
Command: npx skills add https://github.com/mindcockpit-ai/cognitive-core --skill angular-e2e-mocking

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Angular applications using Keycloak/OAuth2 often require complex end-to-end testing with backend dependencies. This Skill provides a deterministic testing pattern by bypassing authentication and mocking REST APIs, enabling tests to run without a live backend.

Core Features & Use Cases

  • Two-layer Keycloak bypass for pre-bootstrap, ensuring tests start reliably.
  • REST API mocking with fixtures across Angular HttpClient calls for consistent responses.
  • Playwright-based end-to-end patterns that simulate real user flows with deterministic data and Angular Material components.
  • Use Case: Validate user management and UI behavior in a protected Angular app without backend access.

Quick Start

Start by configuring your Playwright tests to bypass Keycloak and mock API endpoints for deterministic Angular end-to-end testing.

Frequently Asked Questions about angular-e2e-mocking

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I bypass Keycloak authentication in Angular Playwright E2E tests?

Mock REST API responses in Angular E2E tests by intercepting HttpClient calls and returning JSON fixtures, providing deterministic data that ensures consistent test execution without depending on a live backend service.

Can I use Playwright to test Angular Material components with mocked API responses?

Yes, you can use Playwright to test Angular Material components with mocked API responses by simulating real user flows against deterministic fixture data, validating UI behavior accurately without backend access.

What's the best way to set up deterministic E2E testing for Angular OAuth2 applications?

The best way to set up deterministic E2E testing for Angular OAuth2 applications is to bypass login flows with a mock token and fake redirects, while using JSON fixtures to mock REST API responses for reliable test execution.

Why does my Angular E2E test fail when relying on a live Keycloak backend?

Angular E2E tests fail when relying on a live Keycloak backend due to complex authentication dependencies and unstable API states. Bypassing these flows with mock tokens and fixture-based responses ensures deterministic test execution.