Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
class AppChrome {
visit() {
cy.visit('/');
this.wait();
this.waitForA11y();
}

private wait() {
waitForA11y() {
cy.findByTestId('app-page-title').should('exist');
cy.testA11y();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ class ModelCatalog {
cy.testA11y();
}

waitForPerformanceInsightsTab() {
this.findPerformanceInsightsTabContent().should('be.visible');
cy.testA11y();
}

findFilter(title: string) {
return new ModelCatalogFilter(title).find();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,22 +64,22 @@ class ModelRegistry {

visit() {
cy.visit(`/model-registry`);
this.wait();
this.waitForPageLoaded();
}

navigate() {
appChrome.findNavItem('Model Registry').click();
this.wait();
this.waitForPageLoaded();
}

private wait() {
cy.findByTestId('app-page-title').should('exist');
waitForPageLoaded() {
appChrome.waitForA11y();
cy.findByTestId('app-page-title').contains('Model Registry');
cy.testA11y();
}

private waitLanding() {
cy.findByTestId('home-page').should('be.visible');
cy.testA11y();
}

shouldBeEmpty() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class ModelTransferJobsPage {
private wait() {
cy.findByTestId('app-page-title').should('exist');
cy.findByTestId('app-page-title').contains('Model transfer jobs');
cy.testA11y();
}

findTable() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ class ModelVersionArchive {
cy.visit(
`/model-registry/${preferredModelRegistry}/registered-models/${rmId}/versions/archive/${mvId}`,
);
this.wait();
}

visitModelVersionList() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { appChrome } from '~/__tests__/cypress/cypress/pages/appChrome';
import { FormFieldSelector } from './registerModelPage';

class RegisterAndStoreFields {
visit(registryNamespace?: string) {
const preferredModelRegistry = 'modelregistry-sample';
const query = registryNamespace ? `?namespace=${encodeURIComponent(registryNamespace)}` : '';
cy.visit(`/model-registry/${preferredModelRegistry}/register/model${query}`);
appChrome.waitForA11y();
}

findNamespaceFormGroup() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class ModelArchive {
const rmId = '2';
const preferredModelRegistry = 'modelregistry-sample';
cy.visit(`/model-registry/${preferredModelRegistry}/registered-models/archive/${rmId}`);
this.wait();
}

visitArchiveModelVersionList() {
Expand All @@ -76,6 +77,8 @@ class ModelArchive {
cy.visit(
`/model-registry/${preferredModelRegistry}/registered-models/archive/${rmId}/versions`,
);
// TODO: testA11y skipped — CI reports color-contrast violation (#dca614 h4)
// that does not reproduce locally. Needs investigation in CI environment.
}

visitModelList() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { mockModArchResponse } from 'mod-arch-core';
import { mockMcpServer } from '~/__mocks__';
import { mcpCatalog, mcpServerDetails } from '~/__tests__/cypress/cypress/pages/mcpCatalog';
import { appChrome } from '~/__tests__/cypress/cypress/pages/appChrome';
import {
initMcpCatalogIntercepts,
initServerDetailIntercept,
Expand Down Expand Up @@ -173,6 +174,7 @@ describe('MCP Server Details Page', () => {
);
cy.visit('/mcp-catalog/invalid-id-that-does-not-exist');
mcpServerDetails.findMcpNotFound().should('be.visible');
appChrome.waitForA11y();
cy.contains('MCP server not found').should('be.visible');
});
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { modelCatalog } from '~/__tests__/cypress/cypress/pages/modelCatalog';
import { appChrome } from '~/__tests__/cypress/cypress/pages/appChrome';
import {
setupModelCatalogIntercepts,
interceptPerformanceArtifactsWithFilterCheck,
Expand Down Expand Up @@ -103,6 +104,7 @@ describe('ModelCatalogCard Component', () => {
modelCatalog.findValidatedModelBenchmarkLink().click();
});
cy.url().should('include', 'performance-insights');
appChrome.waitForA11y();
});
});

Expand Down Expand Up @@ -151,6 +153,7 @@ describe('ModelCatalogCard Component', () => {
modelCatalog.findValidatedModelBenchmarkLink().click();
});
cy.url().should('include', 'performance-insights');
appChrome.waitForA11y();
});

it('should navigate through benchmarks correctly', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* eslint-disable camelcase */
import { mockModArchResponse } from 'mod-arch-core';
import { modelCatalog } from '~/__tests__/cypress/cypress/pages/modelCatalog';
import { appChrome } from '~/__tests__/cypress/cypress/pages/appChrome';
import { mockModelRegistry } from '~/__mocks__/mockModelRegistry';
import {
setupModelCatalogIntercepts,
Expand Down Expand Up @@ -31,6 +32,7 @@ describe('Model Catalog Details Page', () => {
it('navigates to details and shows header, breadcrumb and description', () => {
modelCatalog.findLoadingState().should('not.exist');
modelCatalog.findModelCatalogDetailLink().first().click();
appChrome.waitForA11y();
modelCatalog.findBreadcrumb().should('exist');
modelCatalog.findDetailsProviderText().should('be.visible');
modelCatalog.findDetailsDescription().should('exist');
Expand All @@ -39,14 +41,15 @@ describe('Model Catalog Details Page', () => {
it('shows formatted model type in details', () => {
modelCatalog.findLoadingState().should('not.exist');
modelCatalog.findModelCatalogDetailLink().first().click();
appChrome.waitForA11y();
modelCatalog.findModelType().should('be.visible');
modelCatalog.findModelType().should('contain.text', 'Generative AI model (Example, LLM)');
});

it('does not show architecture field when no architectures are available', () => {
modelCatalog.findLoadingState().should('not.exist');
modelCatalog.findModelCatalogDetailLink().first().click();
// Architecture field should not exist when no valid architectures
appChrome.waitForA11y();
modelCatalog.findModelArchitecture().should('not.exist');
});
});
Expand Down Expand Up @@ -82,7 +85,7 @@ describe('Model Catalog Details Page - Architecture Field', () => {
modelCatalog.visit();
modelCatalog.findLoadingState().should('not.exist');
modelCatalog.findModelCatalogDetailLink().first().click();
modelCatalog.findBreadcrumb().should('exist');
appChrome.waitForA11y();

// Architecture field should exist and show correct values
modelCatalog.findModelArchitecture().should('be.visible');
Expand Down Expand Up @@ -110,6 +113,7 @@ describe('Model Catalog Details Page - Architecture Field', () => {
modelCatalog.visit();
modelCatalog.findLoadingState().should('not.exist');
modelCatalog.findModelCatalogDetailLink().first().click();
appChrome.waitForA11y();

// Architecture should be normalized to lowercase
modelCatalog.findModelArchitecture().should('be.visible');
Expand Down Expand Up @@ -137,6 +141,7 @@ describe('Model Catalog Details Page - Architecture Field', () => {
modelCatalog.visit();
modelCatalog.findLoadingState().should('not.exist');
modelCatalog.findModelCatalogDetailLink().first().click();
appChrome.waitForA11y();

// Architecture field should display all architecture values without validation
modelCatalog.findModelArchitecture().should('be.visible');
Expand Down Expand Up @@ -169,6 +174,7 @@ describe('Model Catalog Details Page - Filter State Management', () => {
modelCatalog.findLoadingState().should('not.exist');

modelCatalog.findModelCatalogDetailLink().first().click();
appChrome.waitForA11y();
modelCatalog.clickPerformanceInsightsTab();

// Change a filter
Expand All @@ -193,6 +199,7 @@ describe('Model Catalog Details Page - Filter State Management', () => {
modelCatalog.findLoadingState().should('not.exist');

modelCatalog.findModelCatalogDetailLink().first().click();
appChrome.waitForA11y();
modelCatalog.clickPerformanceInsightsTab();

// Change a filter on details page
Expand Down Expand Up @@ -226,6 +233,7 @@ describe('Model Catalog Details Page - Edge Cases', () => {
modelCatalog.visit();
modelCatalog.findLoadingState().should('not.exist');
modelCatalog.findModelCatalogDetailLink().first().click();
appChrome.waitForA11y();
modelCatalog.findBreadcrumb().should('exist');

modelCatalog.findDetailsDescription().should('contain.text', 'No description');
Expand All @@ -236,6 +244,7 @@ describe('Model Catalog Details Page - Edge Cases', () => {
modelCatalog.visit();
modelCatalog.findLoadingState().should('not.exist');
modelCatalog.findModelCatalogDetailLink().first().click();
appChrome.waitForA11y();
modelCatalog.findBreadcrumb().should('exist');

modelCatalog.findModelCardMarkdown().should('exist');
Expand All @@ -251,6 +260,8 @@ describe('Model Catalog Details Page - Edge Cases', () => {
modelCatalog.visit();
modelCatalog.findLoadingState().should('not.exist');
modelCatalog.findModelCatalogDetailLink().first().click();
// Skip appChrome.waitForA11y() - blocked by focus trap a11y violation
// on the disabled Register model button (Popover → Tooltip fix in #2817).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

we should enable this in #2817 else here if that goes in first to double check

modelCatalog.findBreadcrumb().should('exist');

cy.contains('No model card').should('be.visible');
Expand All @@ -266,6 +277,7 @@ describe('Model Catalog Details Page - Edge Cases', () => {
modelCatalog.visit();
modelCatalog.findLoadingState().should('not.exist');
modelCatalog.findModelCatalogDetailLink().first().click();
appChrome.waitForA11y();
modelCatalog.findBreadcrumb().should('exist');

cy.findAllByText('N/A').should('have.length.at.least', 1);
Expand All @@ -287,6 +299,7 @@ describe('Model Catalog Details Page - Edge Cases', () => {
modelCatalog.visit();
modelCatalog.findLoadingState().should('not.exist');
modelCatalog.findModelCatalogDetailLink().first().click();
appChrome.waitForA11y();
modelCatalog.findBreadcrumb().should('exist');

cy.wait('@getArtifactsError');
Expand All @@ -313,6 +326,7 @@ describe('Model Catalog Details Page - Edge Cases', () => {
modelCatalog.visit();
modelCatalog.findLoadingState().should('not.exist');
modelCatalog.findModelCatalogDetailLink().first().click();
appChrome.waitForA11y();
modelCatalog.findBreadcrumb().should('exist');

cy.findByRole('progressbar').should('exist');
Expand All @@ -333,7 +347,7 @@ describe('Model Catalog Details Page - Validated Configurations Card', () => {
modelCatalog.visit();
modelCatalog.findLoadingState().should('not.exist');
modelCatalog.findModelCatalogDetailLink().first().click();
modelCatalog.findBreadcrumb().should('exist');
appChrome.waitForA11y();
});

it('should display the validated configurations card with tool calling content', () => {
Expand Down Expand Up @@ -370,6 +384,7 @@ describe('Model Catalog Details Page - Validated Configurations Card', () => {
modelCatalog.visit();
modelCatalog.findLoadingState().should('not.exist');
modelCatalog.findModelCatalogDetailLink().first().click();
appChrome.waitForA11y();
modelCatalog.findBreadcrumb().should('exist');
modelCatalog.findValidatedConfigurationsCard().should('not.exist');
});
Expand Down Expand Up @@ -400,9 +415,11 @@ describe('Model Catalog Registration - Model Type Field', () => {
modelCatalog.visit();
modelCatalog.findLoadingState().should('not.exist');
modelCatalog.findModelCatalogDetailLink().first().click();
appChrome.waitForA11y();
modelCatalog.findBreadcrumb().should('exist');
modelCatalog.findRegisterModelButton().click();
cy.findByTestId('app-page-title').should('contain.text', 'Register');
appChrome.waitForA11y();
};

const interceptModelRegistries = () => {
Expand Down
Loading
Loading