-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels editing and validation #3426
Changes from 7 commits
11aa082
62c8032
14ff57d
3dfe1d3
f6a8462
d10592a
be6cb6d
eed547a
ea6f439
23c1ead
1b1001f
efbb326
7e7dd5e
92b54b9
0009b62
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -238,19 +238,6 @@ describe('Model version details', () => { | |
it('Model version details tab', () => { | ||
modelVersionDetails.findVersionId().contains('1'); | ||
modelVersionDetails.findDescription().should('have.text', 'Description of model version'); | ||
modelVersionDetails.findMoreLabelsButton().contains('6 more'); | ||
modelVersionDetails.findMoreLabelsButton().click(); | ||
modelVersionDetails.shouldContainsModalLabels([ | ||
'Testing label', | ||
'Financial', | ||
'Financial data', | ||
'Fraud detection', | ||
'Machine learning', | ||
'Next data to be overflow', | ||
'Label x', | ||
'Label y', | ||
'Label z', | ||
]); | ||
modelVersionDetails.findStorageEndpoint().contains('test-endpoint'); | ||
modelVersionDetails.findStorageRegion().contains('test-region'); | ||
modelVersionDetails.findStorageBucket().contains('test-bucket'); | ||
|
@@ -346,6 +333,43 @@ describe('Model version details', () => { | |
modelVersionDetails.findModelVersionDropdownItem('Version 2').click(); | ||
modelVersionDetails.findVersionId().contains('2'); | ||
}); | ||
|
||
it('should handle label editing', () => { | ||
modelVersionDetails.findEditLabelsButton().click(); | ||
modelVersionDetails.findAddLabelButton().click(); | ||
|
||
// Check label exists and is visible | ||
cy.findByTestId('editable-label-New Label').should('exist'); | ||
cy.findByTestId('editable-label-New Label').should('be.visible'); | ||
|
||
// Click the label | ||
cy.findByTestId('editable-label-New Label').click(); | ||
|
||
// Type the new label | ||
cy.get('input[data-testid="edit-label-input-New Label"]').should('exist'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same applies here: |
||
cy.get('input[data-testid="edit-label-input-New Label"]').should('be.visible'); | ||
cy.get('input[data-testid="edit-label-input-New Label"]').clear(); | ||
cy.get('input[data-testid="edit-label-input-New Label"]').type('UniqueLabel123{enter}'); | ||
|
||
// Save changes | ||
modelVersionDetails.findSaveLabelsButton().click(); | ||
cy.wait('@UpdatePropertyRow'); | ||
}); | ||
|
||
it('should handle label validation', () => { | ||
modelVersionDetails.findEditLabelsButton().click(); | ||
|
||
cy.findByTestId('editable-label-Testing label').click(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. use |
||
|
||
cy.get('input[data-testid="edit-label-input-Testing label"]') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here |
||
.should('exist') | ||
.should('be.visible'); | ||
|
||
const longLabel = 'a'.repeat(64); | ||
modelVersionDetails.findLabelInput('Testing label').clear().type(`${longLabel}{enter}`); | ||
modelVersionDetails.findLabelErrorAlert().should('contain', "can't exceed 63 characters"); | ||
modelVersionDetails.findLabel('New Label').should('not.exist'); | ||
}); | ||
}); | ||
|
||
describe('Registered deployments tab', () => { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can
findLabel('New label')
be used instead ofeditable-label-New label
? I believefindLabel
was added for this?