Skip to content

feat(explorer): add integration tests for new example json files#1702

Open
josemontespg wants to merge 2 commits into
a2ui-project:mainfrom
josemontespg:add-example-json-integration-tests
Open

feat(explorer): add integration tests for new example json files#1702
josemontespg wants to merge 2 commits into
a2ui-project:mainfrom
josemontespg:add-example-json-integration-tests

Conversation

@josemontespg

Copy link
Copy Markdown
Collaborator

Adds explorer integration tests for the new example json files in angular, lit, and react. Relates to #1497.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces comprehensive test suites for the Angular, Lit, and React renderers covering various UI layout and interaction scenarios, updates an import path in the Angular custom slider component, and configures the TypeScript base URL. The review feedback focuses on improving the Angular test files by recommending explicit TypeScript type casting for queried DOM elements to ensure strict type safety, and suggesting the use of specific component class selectors (such as .a2ui-button) instead of generic HTML tags to prevent matching unintended elements.

Comment thread renderers/angular/a2ui_explorer/src/app/tests/v0_9/00_formatted-text.spec.ts Outdated
Comment thread renderers/angular/a2ui_explorer/src/app/tests/v0_9/00_incremental.spec.ts Outdated
Comment thread renderers/angular/a2ui_explorer/src/app/tests/v0_9/00_interactive-button.spec.ts Outdated
Comment thread renderers/angular/a2ui_explorer/src/app/tests/v0_9/00_simple-login-form.spec.ts Outdated
@josemontespg josemontespg requested a review from ditman June 18, 2026 19:57

@ditman ditman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM! If CI is happy, I'm happy!

let textContent: string;

beforeEach(async () => {
await loadExample('Complex Layout');

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oof, we need to load the example from the filename instead of the title, so it's easier to map between the two. This is not blocking.

import {Component, ChangeDetectionStrategy} from '@angular/core';
import {CommonModule} from '@angular/common';
import {CatalogComponent} from 'src/v0_9/core/catalog_component';
import {CatalogComponent} from '@a2ui/angular/v0_9';

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch

{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": ".",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change may be fixing this issue:

If you can start the angular a2ui_explorer after this locally, can you link #1646 to this PR so it gets resolved when this lands?

beforeEach(async () => {
container = await loadExample('00_formatted-text.json');
surface = getSurface(container);
textContent = surface.textContent || '';

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to || '', but ok!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants