-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
API integration for Register Model form (#3065)
* Implement registerModel form submission (WIP) Signed-off-by: Mike Turley <[email protected]> * Construct URI for object storage mode Signed-off-by: Mike Turley <[email protected]> * Fix page layout and microcopy, and add sourceModelFormatVersion field Signed-off-by: Mike Turley <[email protected]> * Move uri utils and add unit tests for them Signed-off-by: Mike Turley <[email protected]> * Cypress test for register button Signed-off-by: Mike Turley <[email protected]> * Stub for register model page cypress tests Signed-off-by: Mike Turley <[email protected]> * Add full cypress tests for submitting register form Signed-off-by: Mike Turley <[email protected]> * Fix TODO Signed-off-by: Mike Turley <[email protected]> * Fix imports Signed-off-by: Mike Turley <[email protected]> * Fix tests Signed-off-by: Mike Turley <[email protected]> * Sanitize inputs in uri utils, fix breadcrumb bar Signed-off-by: Mike Turley <[email protected]> * Fix tests Signed-off-by: Mike Turley <[email protected]> * Fix another test Signed-off-by: Mike Turley <[email protected]> --------- Signed-off-by: Mike Turley <[email protected]>
- Loading branch information
Showing
14 changed files
with
1,030 additions
and
294 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
frontend/src/__tests__/cypress/cypress/pages/modelRegistry/registerModelPage.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
export enum FormFieldSelector { | ||
MODEL_NAME = '#model-name', | ||
MODEL_DESCRIPTION = '#model-description', | ||
VERSION_NAME = '#version-name', | ||
VERSION_DESCRIPTION = '#version-description', | ||
SOURCE_MODEL_FORMAT = '#source-model-format', | ||
SOURCE_MODEL_FORMAT_VERSION = '#source-model-format-version', | ||
LOCATION_TYPE_OBJECT_STORAGE = '#location-type-object-storage', | ||
LOCATION_ENDPOINT = '#location-endpoint', | ||
LOCATION_BUCKET = '#location-bucket', | ||
LOCATION_REGION = '#location-region', | ||
LOCATION_PATH = '#location-path', | ||
LOCATION_TYPE_URI = '#location-type-uri', | ||
LOCATION_URI = '#location-uri', | ||
} | ||
|
||
class RegisterModelPage { | ||
visit() { | ||
const preferredModelRegistry = 'modelregistry-sample'; | ||
cy.visitWithLogin(`/modelRegistry/${preferredModelRegistry}/registerModel`); | ||
this.wait(); | ||
} | ||
|
||
private wait() { | ||
const preferredModelRegistry = 'modelregistry-sample'; | ||
cy.findByTestId('app-page-title').should('exist'); | ||
cy.findByTestId('app-page-title').contains('Register model'); | ||
cy.findByText(`Model registry - ${preferredModelRegistry}`).should('exist'); | ||
cy.testA11y(); | ||
} | ||
|
||
findFormField(selector: FormFieldSelector) { | ||
return cy.get(selector); | ||
} | ||
|
||
findSubmitButton() { | ||
return cy.findByTestId('create-button'); | ||
} | ||
} | ||
|
||
export const registerModelPage = new RegisterModelPage(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.