-
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.
Model Registry: Register New Version form
Signed-off-by: Mike Turley <[email protected]>
- Loading branch information
Showing
33 changed files
with
1,642 additions
and
464 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
51 changes: 51 additions & 0 deletions
51
frontend/src/__tests__/cypress/cypress/pages/modelRegistry/registerVersionPage.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,51 @@ | ||
export enum FormFieldSelector { | ||
REGISTERED_MODEL = '#registered-model-container .pf-m-typeahead', | ||
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 RegisterVersionPage { | ||
visit(registeredModelId?: string) { | ||
const preferredModelRegistry = 'modelregistry-sample'; | ||
cy.visitWithLogin( | ||
registeredModelId | ||
? `/modelRegistry/${preferredModelRegistry}/registeredModels/${registeredModelId}/registerVersion` | ||
: `/modelRegistry/${preferredModelRegistry}/registerVersion`, | ||
); | ||
this.wait(); | ||
} | ||
|
||
private wait() { | ||
const preferredModelRegistry = 'modelregistry-sample'; | ||
cy.findByTestId('app-page-title').should('exist'); | ||
cy.findByTestId('app-page-title').contains('Register new version'); | ||
cy.findByText(`Model registry - ${preferredModelRegistry}`).should('exist'); | ||
cy.testA11y(); | ||
} | ||
|
||
findFormField(selector: FormFieldSelector) { | ||
return cy.get(selector); | ||
} | ||
|
||
selectRegisteredModel(name: string) { | ||
this.findFormField(FormFieldSelector.REGISTERED_MODEL) | ||
.findByRole('button', { name: 'Typeahead menu toggle' }) | ||
.findSelectOption(name) | ||
.click(); | ||
} | ||
|
||
findSubmitButton() { | ||
return cy.findByTestId('create-button'); | ||
} | ||
} | ||
|
||
export const registerVersionPage = new RegisterVersionPage(); |
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.