Skip to content

Commit 1f922d9

Browse files
author
Daniel Duong
committed
Merge branch 'main' of https://github.com/opendatahub-io/odh-dashboard into feat/autorag-create
2 parents 1246d70 + 49d39ee commit 1f922d9

99 files changed

Lines changed: 3446 additions & 822 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitleaks.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@
1010
[allowlist]
1111
description = "Exclude test fixtures, mock data, sample configs, and CI resources"
1212
paths = [
13+
# Go test files (commonly contain mock credentials)
14+
'''.*_test\.go$''',
15+
16+
# JS/TS test files (.spec.ts, .test.tsx, etc.)
17+
'''.*\.spec\.(ts|tsx|js|jsx)$''',
18+
'''.*\.test\.(ts|tsx|js|jsx)$''',
19+
20+
# JS/TS test directories
21+
'''__tests__/''',
22+
1323
# Go testdata directories
1424
'''testdata/''',
1525

packages/cypress/cypress/pages/modelTraining.ts

Lines changed: 76 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,16 @@ class TrainingJobTable {
110110
return this.findTable().find('[data-testid="no-result-found-title"]');
111111
}
112112

113+
filterByName(name: string) {
114+
this.findToolbar().findByLabelText('Filter by name').clear().type(name);
115+
return this;
116+
}
117+
118+
clearNameFilter() {
119+
this.findToolbar().findByLabelText('Filter by name').clear();
120+
return this;
121+
}
122+
113123
shouldHaveTrainingJobs(count: number) {
114124
this.findRows().should('have.length', count);
115125
return this;
@@ -174,9 +184,13 @@ class TrainingJobTableRow extends TableRow {
174184
}
175185

176186
findStatus() {
177-
// Find the status label by testid (the clickable Label component)
178-
// The entire Label is clickable, not just the icon
179-
return this.find().find('[data-label="Status"]').findByTestId('training-job-status');
187+
return this.find()
188+
.find('[data-label="Status"]')
189+
.find('[data-testid="training-job-status"],[data-testid="ray-job-status"]');
190+
}
191+
192+
findStatusLoading() {
193+
return this.find().find('[data-label="Status"]').findByTestId('ray-job-status-loading');
180194
}
181195

182196
findStatusProgressBar() {
@@ -766,6 +780,64 @@ class RayJobDetailsTab {
766780
}
767781
}
768782

783+
class RayJobResourcesTab {
784+
findNodeConfigurationsSection() {
785+
return cy.findByTestId('node-configurations-section');
786+
}
787+
788+
findNodesValue() {
789+
return cy.findByTestId('nodes-value');
790+
}
791+
792+
findProcessesPerNodeValue() {
793+
return cy.findByTestId('processes-per-node-value');
794+
}
795+
796+
findResourcesPerNodeSection() {
797+
return cy.findByTestId('resources-per-node-section');
798+
}
799+
800+
findWorkerGroupTitle(groupName: string) {
801+
return cy.findByTestId(`worker-group-${groupName}-title`);
802+
}
803+
804+
findWorkerGroupCpuRequests(groupName: string) {
805+
return cy.findByTestId(`worker-group-${groupName}-cpu-requests`);
806+
}
807+
808+
findWorkerGroupCpuLimits(groupName: string) {
809+
return cy.findByTestId(`worker-group-${groupName}-cpu-limits`);
810+
}
811+
812+
findWorkerGroupMemoryRequests(groupName: string) {
813+
return cy.findByTestId(`worker-group-${groupName}-memory-requests`);
814+
}
815+
816+
findWorkerGroupMemoryLimits(groupName: string) {
817+
return cy.findByTestId(`worker-group-${groupName}-memory-limits`);
818+
}
819+
820+
findClusterQueueSection() {
821+
return cy.findByTestId('cluster-queue-section');
822+
}
823+
824+
findQueueValue() {
825+
return cy.findByTestId('queue-value');
826+
}
827+
828+
findQuotasSection() {
829+
return cy.findByTestId('quotas-section');
830+
}
831+
832+
findQuotaSourceValue() {
833+
return cy.findByTestId('quota-source-value');
834+
}
835+
836+
findConsumedQuotaValue() {
837+
return cy.findByTestId('consumed-quota-value');
838+
}
839+
}
840+
769841
export const modelTrainingGlobal = new ModelTrainingGlobal();
770842
export const trainingJobTable = new TrainingJobTable();
771843
export const trainingJobDetailsDrawer = new TrainingJobDetailsDrawer();
@@ -778,3 +850,4 @@ export const scaleNodesModal = new ScaleNodesModal();
778850
export const pauseTrainingJobModal = new PauseTrainingJobModal();
779851
export const trainingJobDetailsTab = new TrainingJobDetailsTab();
780852
export const rayJobDetailsTab = new RayJobDetailsTab();
853+
export const rayJobResourcesTab = new RayJobResourcesTab();

packages/cypress/cypress/support/commands/odh.ts

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,12 @@ import type { NimServingResponse } from '@odh-dashboard/internal/__mocks__/mockN
9191
import type { BuildMockPipelinveVersionsType } from '@odh-dashboard/internal/__mocks__';
9292
import type { ArtifactStorage } from '@odh-dashboard/internal/concepts/pipelines/types';
9393
import type { ConnectionTypeConfigMap } from '@odh-dashboard/internal/concepts/connectionTypes/types';
94-
import type { APIKey, CreateAPIKeyResponse } from '@odh-dashboard/maas/types/api-key';
94+
import type {
95+
APIKey,
96+
APIKeyListResponse,
97+
BulkRevokeResponse,
98+
CreateAPIKeyResponse,
99+
} from '@odh-dashboard/maas/types/api-key';
95100

96101
type SuccessErrorResponse = {
97102
success: boolean;
@@ -1109,15 +1114,25 @@ declare global {
11091114
response: { data: OdhResponse<Tier> },
11101115
) => Cypress.Chainable<null>) &
11111116
((
1112-
type: 'GET /maas/api/v1/api-keys',
1113-
response: { data: OdhResponse<APIKey[]> },
1117+
type: 'POST /maas/api/v1/api-keys/search',
1118+
response: { data: OdhResponse<APIKeyListResponse> },
11141119
) => Cypress.Chainable<null>) &
11151120
((
1116-
type: 'DELETE /maas/api/v1/api-keys',
1117-
response: { data: null },
1121+
type: 'POST /maas/api/v1/api-keys/search',
1122+
options: { query?: { page?: string; limit?: string } },
1123+
response: { data: OdhResponse<APIKeyListResponse> },
1124+
) => Cypress.Chainable<null>) &
1125+
((
1126+
type: 'POST /maas/api/v1/api-keys/bulk-revoke',
1127+
response: { data: OdhResponse<BulkRevokeResponse> },
1128+
) => Cypress.Chainable<null>) &
1129+
((
1130+
type: 'DELETE /maas/api/v1/api-keys/:id',
1131+
options: { path: { id: string } },
1132+
response: { data: OdhResponse<APIKey> },
11181133
) => Cypress.Chainable<null>) &
11191134
((
1120-
type: 'POST /maas/api/v1/api-key',
1135+
type: 'POST /maas/api/v1/api-keys',
11211136
response: { data: OdhResponse<CreateAPIKeyResponse> },
11221137
) => Cypress.Chainable<null>);
11231138
}

0 commit comments

Comments
 (0)