diff --git a/libs/cypress/e2e/devices/approveEnrollmentRequest.cy.ts b/libs/cypress/e2e/devices/approveEnrollmentRequest.cy.ts index 8ade7527b..5068144b6 100644 --- a/libs/cypress/e2e/devices/approveEnrollmentRequest.cy.ts +++ b/libs/cypress/e2e/devices/approveEnrollmentRequest.cy.ts @@ -25,9 +25,12 @@ describe('Enrollment requests approval', () => { approveERModalPage.modalTitle.should('contain.text', 'Approve pending device'); approveERModalPage.deviceName.should('contain.text', FIRST_PENDING_ENROLLMENT_REQUEST_NAME); - // Define a new label. The field for adding the new label is focused and can be changed + // Define a new label. Format guidance is a placeholder, not an input value. approveERModalPage.addNewLabelButton.click(); - cy.focused().should('have.value', 'key=value').clear().type('this-is-a-test=yes'); + approveERModalPage.newLabelField + .should('have.value', '') + .and('have.attr', 'placeholder', 'key=value') + .type('this-is-a-test=yes'); // Fill in the rest of the form approveERModalPage.deviceAliasField.type('new-device'); diff --git a/libs/cypress/pages/ApproveEnrollmentRequestModalPage.ts b/libs/cypress/pages/ApproveEnrollmentRequestModalPage.ts index 3a08b842b..88a18648e 100644 --- a/libs/cypress/pages/ApproveEnrollmentRequestModalPage.ts +++ b/libs/cypress/pages/ApproveEnrollmentRequestModalPage.ts @@ -19,12 +19,8 @@ export class ApproveEnrollmentRequestModalPage { return cy.get('button').contains('Add label'); } - get newlyAddedLabelButton() { - return cy.get('button').contains('key=value'); - } - get newLabelField() { - return cy.get('#editable-input').should('contain.value', 'key=value'); + return this.body.get('input[aria-label="New label"]'); } get deviceName() { diff --git a/libs/ui-components/src/components/Device/EditDeviceWizard/steps/SystemdUnitsForm.tsx b/libs/ui-components/src/components/Device/EditDeviceWizard/steps/SystemdUnitsForm.tsx index 5e3995cbc..0b8b5d456 100644 --- a/libs/ui-components/src/components/Device/EditDeviceWizard/steps/SystemdUnitsForm.tsx +++ b/libs/ui-components/src/components/Device/EditDeviceWizard/steps/SystemdUnitsForm.tsx @@ -52,7 +52,7 @@ const SystemdUnitsForm = () => { isEditable addLabelControl={ } + addLabelControl={} > {value?.map((tag, idx) => (