Skip to content

Commit e999b11

Browse files
committed
Add a11y tests for remaining files and use appChrome
Signed-off-by: manaswinidas <dasmanaswini10@gmail.com>
1 parent ada1fc5 commit e999b11

6 files changed

Lines changed: 51 additions & 1 deletion

File tree

clients/ui/frontend/src/__tests__/cypress/cypress/tests/mocked/mcpCatalog/mcpServerDetails.cy.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { mockModArchResponse } from 'mod-arch-core';
22
import { mockMcpServer } from '~/__mocks__';
33
import { mcpCatalog, mcpServerDetails } from '~/__tests__/cypress/cypress/pages/mcpCatalog';
4+
import { appChrome } from '~/__tests__/cypress/cypress/pages/appChrome';
45
import {
56
initMcpCatalogIntercepts,
67
initServerDetailIntercept,
@@ -173,6 +174,7 @@ describe('MCP Server Details Page', () => {
173174
);
174175
cy.visit('/mcp-catalog/invalid-id-that-does-not-exist');
175176
mcpServerDetails.findMcpNotFound().should('be.visible');
177+
appChrome.waitForA11y();
176178
cy.contains('MCP server not found').should('be.visible');
177179
});
178180
});

clients/ui/frontend/src/__tests__/cypress/cypress/tests/mocked/modelCatalog/modelCatalogCard.cy.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ describe('ModelCatalogCard Component', () => {
153153
modelCatalog.findValidatedModelBenchmarkLink().click();
154154
});
155155
cy.url().should('include', 'performance-insights');
156+
appChrome.waitForA11y();
156157
});
157158

158159
it('should navigate through benchmarks correctly', () => {

clients/ui/frontend/src/__tests__/cypress/cypress/tests/mocked/modelCatalog/modelCatalogDetails.cy.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,15 @@ describe('Model Catalog Details Page', () => {
4141
it('shows formatted model type in details', () => {
4242
modelCatalog.findLoadingState().should('not.exist');
4343
modelCatalog.findModelCatalogDetailLink().first().click();
44+
appChrome.waitForA11y();
4445
modelCatalog.findModelType().should('be.visible');
4546
modelCatalog.findModelType().should('contain.text', 'Generative AI model (Example, LLM)');
4647
});
4748

4849
it('does not show architecture field when no architectures are available', () => {
4950
modelCatalog.findLoadingState().should('not.exist');
5051
modelCatalog.findModelCatalogDetailLink().first().click();
51-
// Architecture field should not exist when no valid architectures
52+
appChrome.waitForA11y();
5253
modelCatalog.findModelArchitecture().should('not.exist');
5354
});
5455
});
@@ -112,6 +113,7 @@ describe('Model Catalog Details Page - Architecture Field', () => {
112113
modelCatalog.visit();
113114
modelCatalog.findLoadingState().should('not.exist');
114115
modelCatalog.findModelCatalogDetailLink().first().click();
116+
appChrome.waitForA11y();
115117

116118
// Architecture should be normalized to lowercase
117119
modelCatalog.findModelArchitecture().should('be.visible');
@@ -139,6 +141,7 @@ describe('Model Catalog Details Page - Architecture Field', () => {
139141
modelCatalog.visit();
140142
modelCatalog.findLoadingState().should('not.exist');
141143
modelCatalog.findModelCatalogDetailLink().first().click();
144+
appChrome.waitForA11y();
142145

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

173176
modelCatalog.findModelCatalogDetailLink().first().click();
177+
appChrome.waitForA11y();
174178
modelCatalog.clickPerformanceInsightsTab();
175179

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

197201
modelCatalog.findModelCatalogDetailLink().first().click();
202+
appChrome.waitForA11y();
198203
modelCatalog.clickPerformanceInsightsTab();
199204

200205
// Change a filter on details page
@@ -228,6 +233,7 @@ describe('Model Catalog Details Page - Edge Cases', () => {
228233
modelCatalog.visit();
229234
modelCatalog.findLoadingState().should('not.exist');
230235
modelCatalog.findModelCatalogDetailLink().first().click();
236+
appChrome.waitForA11y();
231237
modelCatalog.findBreadcrumb().should('exist');
232238

233239
modelCatalog.findDetailsDescription().should('contain.text', 'No description');
@@ -238,6 +244,7 @@ describe('Model Catalog Details Page - Edge Cases', () => {
238244
modelCatalog.visit();
239245
modelCatalog.findLoadingState().should('not.exist');
240246
modelCatalog.findModelCatalogDetailLink().first().click();
247+
appChrome.waitForA11y();
241248
modelCatalog.findBreadcrumb().should('exist');
242249

243250
modelCatalog.findModelCardMarkdown().should('exist');
@@ -253,6 +260,7 @@ describe('Model Catalog Details Page - Edge Cases', () => {
253260
modelCatalog.visit();
254261
modelCatalog.findLoadingState().should('not.exist');
255262
modelCatalog.findModelCatalogDetailLink().first().click();
263+
appChrome.waitForA11y();
256264
modelCatalog.findBreadcrumb().should('exist');
257265

258266
cy.contains('No model card').should('be.visible');
@@ -268,6 +276,7 @@ describe('Model Catalog Details Page - Edge Cases', () => {
268276
modelCatalog.visit();
269277
modelCatalog.findLoadingState().should('not.exist');
270278
modelCatalog.findModelCatalogDetailLink().first().click();
279+
appChrome.waitForA11y();
271280
modelCatalog.findBreadcrumb().should('exist');
272281

273282
cy.findAllByText('N/A').should('have.length.at.least', 1);
@@ -289,6 +298,7 @@ describe('Model Catalog Details Page - Edge Cases', () => {
289298
modelCatalog.visit();
290299
modelCatalog.findLoadingState().should('not.exist');
291300
modelCatalog.findModelCatalogDetailLink().first().click();
301+
appChrome.waitForA11y();
292302
modelCatalog.findBreadcrumb().should('exist');
293303

294304
cy.wait('@getArtifactsError');
@@ -315,6 +325,7 @@ describe('Model Catalog Details Page - Edge Cases', () => {
315325
modelCatalog.visit();
316326
modelCatalog.findLoadingState().should('not.exist');
317327
modelCatalog.findModelCatalogDetailLink().first().click();
328+
appChrome.waitForA11y();
318329
modelCatalog.findBreadcrumb().should('exist');
319330

320331
cy.findByRole('progressbar').should('exist');
@@ -372,6 +383,7 @@ describe('Model Catalog Details Page - Validated Configurations Card', () => {
372383
modelCatalog.visit();
373384
modelCatalog.findLoadingState().should('not.exist');
374385
modelCatalog.findModelCatalogDetailLink().first().click();
386+
appChrome.waitForA11y();
375387
modelCatalog.findBreadcrumb().should('exist');
376388
modelCatalog.findValidatedConfigurationsCard().should('not.exist');
377389
});
@@ -402,9 +414,11 @@ describe('Model Catalog Registration - Model Type Field', () => {
402414
modelCatalog.visit();
403415
modelCatalog.findLoadingState().should('not.exist');
404416
modelCatalog.findModelCatalogDetailLink().first().click();
417+
appChrome.waitForA11y();
405418
modelCatalog.findBreadcrumb().should('exist');
406419
modelCatalog.findRegisterModelButton().click();
407420
cy.findByTestId('app-page-title').should('contain.text', 'Register');
421+
appChrome.waitForA11y();
408422
};
409423

410424
const interceptModelRegistries = () => {

clients/ui/frontend/src/__tests__/cypress/cypress/tests/mocked/modelCatalog/modelCatalogTabs.cy.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ describe('Model Catalog Details Tabs', () => {
7676

7777
it('should show Overview tab as active by default', () => {
7878
modelCatalog.findModelCatalogDetailLink().first().click();
79+
appChrome.waitForA11y();
7980

8081
// Overview tab should be active and content should be visible
8182
modelCatalog.findOverviewTab().should('have.attr', 'aria-selected', 'true');
@@ -86,6 +87,7 @@ describe('Model Catalog Details Tabs', () => {
8687

8788
it('should switch to Performance Insights tab when clicked', () => {
8889
modelCatalog.findModelCatalogDetailLink().first().click();
90+
appChrome.waitForA11y();
8991

9092
cy.url().should('include', '/model-catalog/source-2/validated-model/overview');
9193

@@ -101,6 +103,7 @@ describe('Model Catalog Details Tabs', () => {
101103

102104
it('should switch back to Overview tab when clicked', () => {
103105
modelCatalog.findModelCatalogDetailLink().first().click();
106+
appChrome.waitForA11y();
104107

105108
cy.url().should('include', '/model-catalog/source-2/validated-model/overview');
106109

@@ -120,6 +123,7 @@ describe('Model Catalog Details Tabs', () => {
120123
describe('Tab Content', () => {
121124
it('should display Hardware Configuration content in Performance Insights tab', () => {
122125
modelCatalog.findModelCatalogDetailLink().first().click();
126+
appChrome.waitForA11y();
123127

124128
// Switch to Performance Insights tab
125129
modelCatalog.clickPerformanceInsightsTab();
@@ -133,6 +137,7 @@ describe('Model Catalog Details Tabs', () => {
133137

134138
it('should display Workload type column as the second column in hardware configuration table', () => {
135139
modelCatalog.findModelCatalogDetailLink().first().click();
140+
appChrome.waitForA11y();
136141
modelCatalog.clickPerformanceInsightsTab();
137142

138143
modelCatalog
@@ -151,6 +156,7 @@ describe('Model Catalog Details Tabs', () => {
151156
describe('Workload Type Filter', () => {
152157
it('should display workload type filter in the toolbar', () => {
153158
modelCatalog.findModelCatalogDetailLink().first().click();
159+
appChrome.waitForA11y();
154160
modelCatalog.clickPerformanceInsightsTab();
155161

156162
modelCatalog
@@ -161,6 +167,7 @@ describe('Model Catalog Details Tabs', () => {
161167

162168
it('should show workload type options when clicked', () => {
163169
modelCatalog.findModelCatalogDetailLink().first().click();
170+
appChrome.waitForA11y();
164171
modelCatalog.clickPerformanceInsightsTab();
165172
modelCatalog.findWorkloadTypeFilter().click();
166173
modelCatalog.findWorkloadTypeOption('chatbot').should('be.visible');
@@ -173,6 +180,7 @@ describe('Model Catalog Details Tabs', () => {
173180
// Note: This test verifies UI behavior after server-side filter is applied.
174181
// Server-side filtering is verified by the 'Server-Side Filtering' tests below.
175182
modelCatalog.findModelCatalogDetailLink().first().click();
183+
appChrome.waitForA11y();
176184
modelCatalog.clickPerformanceInsightsTab();
177185
modelCatalog.findHardwareConfigurationTableRows().should('have.length.at.least', 1);
178186
modelCatalog.findWorkloadTypeFilter().click();
@@ -188,6 +196,7 @@ describe('Model Catalog Details Tabs', () => {
188196

189197
it('should change workload type selection when clicking a different option', () => {
190198
modelCatalog.findModelCatalogDetailLink().first().click();
199+
appChrome.waitForA11y();
191200
modelCatalog.clickPerformanceInsightsTab();
192201
modelCatalog.findWorkloadTypeFilter().click();
193202
modelCatalog.selectWorkloadType('code_fixing');
@@ -209,6 +218,7 @@ describe('Model Catalog Details Tabs', () => {
209218
describe('Accessibility', () => {
210219
it('should have proper ARIA attributes for tabs', () => {
211220
modelCatalog.findModelCatalogDetailLink().first().click();
221+
appChrome.waitForA11y();
212222

213223
// Check tab container has proper role
214224
modelCatalog.findModelDetailsTabs().should('have.attr', 'role', 'region');
@@ -227,6 +237,7 @@ describe('Model Catalog Details Tabs', () => {
227237
describe('Tab State Management', () => {
228238
it('should maintain tab state when switching between tabs', () => {
229239
modelCatalog.findModelCatalogDetailLink().first().click();
240+
appChrome.waitForA11y();
230241

231242
cy.url().should('include', '/model-catalog/source-2/validated-model/overview');
232243

@@ -313,6 +324,7 @@ describe('Model Catalog Details Tabs', () => {
313324
// toggle is ON and user navigates to Performance Insights tab
314325

315326
modelCatalog.findModelCatalogDetailLink().first().click();
327+
appChrome.waitForA11y();
316328
modelCatalog.clickPerformanceInsightsTab();
317329

318330
// TTFT P90 column should be visible (from default filter)
@@ -330,6 +342,7 @@ describe('Model Catalog Details Tabs', () => {
330342
describe('With Latency Filter Applied', () => {
331343
it('should show only the selected latency column and matching TPS column when TTFT P90 filter is applied', () => {
332344
modelCatalog.findModelCatalogDetailLink().first().click();
345+
appChrome.waitForA11y();
333346
modelCatalog.clickPerformanceInsightsTab();
334347

335348
// Open latency filter dropdown
@@ -355,6 +368,7 @@ describe('Model Catalog Details Tabs', () => {
355368

356369
it('should show only E2E mean column and TPS mean column when E2E mean filter is applied', () => {
357370
modelCatalog.findModelCatalogDetailLink().first().click();
371+
appChrome.waitForA11y();
358372
modelCatalog.clickPerformanceInsightsTab();
359373

360374
// Open latency filter dropdown
@@ -386,6 +400,7 @@ describe('Model Catalog Details Tabs', () => {
386400

387401
it('should reset to applied values when changes were made in the dropdown', () => {
388402
modelCatalog.findModelCatalogDetailLink().first().click();
403+
appChrome.waitForA11y();
389404
modelCatalog.clickPerformanceInsightsTab();
390405

391406
// Apply a non-default filter first (E2E Mean)
@@ -416,6 +431,7 @@ describe('Model Catalog Details Tabs', () => {
416431

417432
it('should keep non-latency columns visible when latency filter is applied', () => {
418433
modelCatalog.findModelCatalogDetailLink().first().click();
434+
appChrome.waitForA11y();
419435
modelCatalog.clickPerformanceInsightsTab();
420436

421437
// Apply a latency filter
@@ -466,6 +482,7 @@ describe('Server-Side Filtering', () => {
466482
// Enable performance toggle to apply filters to API requests
467483
modelCatalog.togglePerformanceView();
468484
modelCatalog.findModelCatalogDetailLink().first().click();
485+
appChrome.waitForA11y();
469486
modelCatalog.clickPerformanceInsightsTab();
470487

471488
cy.wait('@getDefaultFilteredArtifacts');
@@ -523,6 +540,7 @@ describe('Server-Side Filtering', () => {
523540
modelCatalog.findWorkloadTypeFilter().click();
524541
modelCatalog.selectWorkloadType('code_fixing');
525542
modelCatalog.findModelCatalogDetailLink().first().click();
543+
appChrome.waitForA11y();
526544
modelCatalog.clickPerformanceInsightsTab();
527545

528546
cy.wait('@getCodeFixingArtifacts');
@@ -571,6 +589,7 @@ describe('Server-Side Filtering', () => {
571589
// Enable performance toggle
572590
modelCatalog.togglePerformanceView();
573591
modelCatalog.findModelCatalogDetailLink().first().click();
592+
appChrome.waitForA11y();
574593
modelCatalog.clickPerformanceInsightsTab();
575594

576595
cy.wait('@getDefaultFilteredArtifacts');
@@ -693,6 +712,7 @@ describe('Performance Insights Pagination', () => {
693712
modelCatalog.findLoadingState().should('not.exist');
694713
modelCatalog.togglePerformanceView();
695714
modelCatalog.findModelCatalogDetailLink().first().click();
715+
appChrome.waitForA11y();
696716
modelCatalog.clickPerformanceInsightsTab();
697717

698718
cy.wait('@getPaginatedPerformanceArtifacts');

clients/ui/frontend/src/__tests__/cypress/cypress/tests/mocked/modelRegistry/modelDetailsCard.cy.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ describe('Model Details Card', () => {
123123

124124
it('displays labels section correctly', () => {
125125
cy.visit('/model-registry/modelregistry-sample/registered-models/1/overview');
126+
appChrome.waitForA11y();
126127

127128
cy.contains('Labels').should('be.visible');
128129
cy.contains('label1').should('be.visible');
@@ -133,6 +134,7 @@ describe('Model Details Card', () => {
133134

134135
it('displays properties in expandable section', () => {
135136
cy.visit('/model-registry/modelregistry-sample/registered-models/1/overview');
137+
appChrome.waitForA11y();
136138

137139
cy.contains('Properties').should('be.visible');
138140
cy.contains('Properties').parent().find('.pf-v6-c-badge').should('contain', '3'); // property1, property2, url-property
@@ -152,6 +154,7 @@ describe('Model Details Card', () => {
152154

153155
it('shows add property button and validates input', () => {
154156
cy.visit('/model-registry/modelregistry-sample/registered-models/1/overview');
157+
appChrome.waitForA11y();
155158

156159
cy.contains('Properties').click();
157160

@@ -171,6 +174,7 @@ describe('Model Details Card', () => {
171174

172175
it('validates property key length correctly', () => {
173176
cy.visit('/model-registry/modelregistry-sample/registered-models/1/overview');
177+
appChrome.waitForA11y();
174178

175179
cy.contains('Properties').click();
176180

@@ -211,6 +215,7 @@ describe('Model Details Card', () => {
211215
);
212216

213217
cy.visit('/model-registry/modelregistry-sample/registered-models/1/overview');
218+
appChrome.waitForA11y();
214219

215220
cy.contains('Properties').click();
216221

@@ -251,6 +256,7 @@ describe('Model Details Card', () => {
251256
);
252257

253258
cy.visit('/model-registry/modelregistry-sample/registered-models/1/overview');
259+
appChrome.waitForA11y();
254260

255261
cy.contains('Properties').click();
256262

@@ -259,6 +265,7 @@ describe('Model Details Card', () => {
259265

260266
it('shows the correct tab structure and navigation', () => {
261267
cy.visit('/model-registry/modelregistry-sample/registered-models/1/overview');
268+
appChrome.waitForA11y();
262269

263270
cy.findByTestId('model-versions-page-tabs').should('exist');
264271
cy.findByTestId('model-overview-tab').should('exist');
@@ -273,6 +280,7 @@ describe('Model Details Card', () => {
273280

274281
it('allows editing model description', () => {
275282
cy.visit('/model-registry/modelregistry-sample/registered-models/1/overview');
283+
appChrome.waitForA11y();
276284

277285
cy.findByText('Test model description').should('be.visible');
278286

0 commit comments

Comments
 (0)