diff --git a/clients/ui/frontend/src/__tests__/cypress/cypress/pages/appChrome.ts b/clients/ui/frontend/src/__tests__/cypress/cypress/pages/appChrome.ts index 8d30c9a48..5d6afc32d 100644 --- a/clients/ui/frontend/src/__tests__/cypress/cypress/pages/appChrome.ts +++ b/clients/ui/frontend/src/__tests__/cypress/cypress/pages/appChrome.ts @@ -9,7 +9,7 @@ class AppChrome { cy.testA11y(); } - // TODO: implement when authorization is enabled + // TODO: [Auth-enablement] Uncomment once auth is enabled // shouldBeUnauthorized() { // cy.findByTestId('unauthorized-error'); // return this; diff --git a/clients/ui/frontend/src/__tests__/cypress/cypress/support/commands/application.ts b/clients/ui/frontend/src/__tests__/cypress/cypress/support/commands/application.ts index 7b5de43ea..c6100d0cd 100644 --- a/clients/ui/frontend/src/__tests__/cypress/cypress/support/commands/application.ts +++ b/clients/ui/frontend/src/__tests__/cypress/cypress/support/commands/application.ts @@ -7,7 +7,7 @@ import type { Matcher, MatcherOptions as DTLMatcherOptions } from '@testing-libr declare global { namespace Cypress { interface Chainable { - // TODO: Uncomment when authorization is enabled + // TODO: [Auth-enablement] Uncomment once auth is enabled // /** // * Visits the URL and performs a login if necessary. // * Uses credentials supplied by environment variables if not provided. @@ -121,7 +121,7 @@ declare global { } } -// TODO: Uncomment when authorization is enabled +// TODO: [Auth-enablement] Uncomment once auth is enabled // Cypress.Commands.add('visitWithLogin', (url, user = TEST_USER) => { // if (Cypress.env('MOCK')) { // cy.visit(url); diff --git a/clients/ui/frontend/src/__tests__/cypress/cypress/tests/mocked/modelRegistry/modelRegistry.cy.ts b/clients/ui/frontend/src/__tests__/cypress/cypress/tests/mocked/modelRegistry/modelRegistry.cy.ts index dc9940b24..e6cb531c3 100644 --- a/clients/ui/frontend/src/__tests__/cypress/cypress/tests/mocked/modelRegistry/modelRegistry.cy.ts +++ b/clients/ui/frontend/src/__tests__/cypress/cypress/tests/mocked/modelRegistry/modelRegistry.cy.ts @@ -205,35 +205,22 @@ describe('Model Registry core', () => { }); }); -// TODO: Enable when model registration is there -// describe('Register Model button', () => { -// it('Navigates to register page from empty state', () => { -// initIntercepts({ disableModelRegistryFeature: false, registeredModels: [] }); -// modelRegistry.visit(); -// modelRegistry.findRegisterModelButton().click(); -// cy.findByTestId('app-page-title').should('exist'); -// cy.findByTestId('app-page-title').contains('Register model'); -// cy.findByText('Model registry - modelregistry-sample').should('exist'); -// }); - -// it('Navigates to register page from table toolbar', () => { -// initIntercepts({ disableModelRegistryFeature: false }); -// modelRegistry.visit(); -// modelRegistry.findRegisterModelButton().click(); -// cy.findByTestId('app-page-title').should('exist'); -// cy.findByTestId('app-page-title').contains('Register model'); -// cy.findByText('Model registry - modelregistry-sample').should('exist'); -// }); - -// it('should be accessible for non-admin users', () => { -// asProjectEditUser(); -// initIntercepts({ -// disableModelRegistryFeature: false, -// allowed: false, -// }); - -// modelRegistry.visit(); -// modelRegistry.navigate(); -// modelRegistry.shouldModelRegistrySelectorExist(); -// }); -// }); +describe('Register Model button', () => { + it('Navigates to register page from empty state', () => { + initIntercepts({ registeredModels: [] }); + modelRegistry.visit(); + modelRegistry.findRegisterModelButton().click(); + cy.findByTestId('app-page-title').should('exist'); + cy.findByTestId('app-page-title').contains('Register model'); + cy.findByText('Model registry - modelregistry-sample').should('exist'); + }); + + it('Navigates to register page from table toolbar', () => { + initIntercepts({ registeredModels: [] }); + modelRegistry.visit(); + modelRegistry.findRegisterModelButton().click(); + cy.findByTestId('app-page-title').should('exist'); + cy.findByTestId('app-page-title').contains('Register model'); + cy.findByText('Model registry - modelregistry-sample').should('exist'); + }); +}); diff --git a/clients/ui/frontend/src/__tests__/cypress/cypress/tests/mocked/modelVersions.cy.ts b/clients/ui/frontend/src/__tests__/cypress/cypress/tests/mocked/modelVersions.cy.ts index 3aa7f9c50..c3fd860e2 100644 --- a/clients/ui/frontend/src/__tests__/cypress/cypress/tests/mocked/modelVersions.cy.ts +++ b/clients/ui/frontend/src/__tests__/cypress/cypress/tests/mocked/modelVersions.cy.ts @@ -130,7 +130,7 @@ describe('Model Versions', () => { }); it('Model versions table', () => { - // TODO: Uncomment when we fix finding listbox items + // TODO: [Testing] Uncomment when we fix finding listbox items initIntercepts({ modelRegistries: [ diff --git a/clients/ui/frontend/src/app/App.tsx b/clients/ui/frontend/src/app/App.tsx index fa9eb38b7..488d2a747 100644 --- a/clients/ui/frontend/src/app/App.tsx +++ b/clients/ui/frontend/src/app/App.tsx @@ -62,7 +62,7 @@ const App: React.FC = () => {