diff --git a/cypress/e2e/tests/administration/custom-migration-targets/field_validation.test.ts b/cypress/e2e/tests/administration/custom-migration-targets/field_validation.test.ts index 3d974ac90..5eb25e24c 100644 --- a/cypress/e2e/tests/administration/custom-migration-targets/field_validation.test.ts +++ b/cypress/e2e/tests/administration/custom-migration-targets/field_validation.test.ts @@ -49,7 +49,7 @@ describe(["@tier1"], "Custom Migration Target Validations", () => { validateTooLongInput(CustomMigrationTargetView.nameInput); CustomMigrationTarget.fillName("Containerization"); - cy.get(CustomMigrationTargetView.nameHelper).contains( + cy.get(CustomMigrationTargetView.helperText).contains( "A custom target with this name already exists. Use a different name" ); @@ -113,18 +113,12 @@ describe(["@tier1"], "Custom Migration Target Validations", () => { CustomMigrationTarget.selectRepositoryType(RepositoryType.git); CustomMigrationTarget.fillRepositoryUrl(" "); - cy.get(CustomMigrationTargetView.repositoryUrlHelper).should( - "contain", - "Must be a valid URL." - ); + cy.get(CustomMigrationTargetView.helperText).should("contain", "Must be a valid URL."); CustomMigrationTarget.fillRepositoryUrl("Invalid url"); - cy.get(CustomMigrationTargetView.repositoryUrlHelper).should( - "contain", - "Must be a valid URL." - ); + cy.get(CustomMigrationTargetView.helperText).should("contain", "Must be a valid URL."); CustomMigrationTarget.fillRepositoryUrl("https://github.com/konveyor/tackle-testapp"); - cy.get(CustomMigrationTargetView.repositoryUrlHelper).should("not.exist"); + cy.get(CustomMigrationTargetView.helperText).should("not.contain", "Must be a valid URL."); }); }); diff --git a/cypress/e2e/views/custom-migration-target.view.ts b/cypress/e2e/views/custom-migration-target.view.ts index b31139e02..e3cc039db 100644 --- a/cypress/e2e/views/custom-migration-target.view.ts +++ b/cypress/e2e/views/custom-migration-target.view.ts @@ -3,17 +3,16 @@ export enum CustomMigrationTargetView { editSubmitButton = "button[id='identity-form-submit']:contains('Save')", actionsButton = "button[aria-label=Actions]", nameInput = "#name", - nameHelper = "#name-helper", + helperText = "span[class*='helper-text']", descriptionInput = "#description", imageInput = "#custom-migration-target-upload-image-filename", imageHelper = "#custom-migration-target-upload-image-helper", - ruleInput = "input[accept='.xml']", - ruleHelper = "div[aria-label='Danger Alert']", + ruleInput = "input[accept*='.xml']", + ruleHelper = "h4[class*='alert__title']", ruleFilesToggle = "button[aria-expanded='true']", takeMeThereNotification = "Take me there", repositoryTypeDropdown = "#repo-type-select-toggle", repositoryUrl = "#sourceRepository", - repositoryUrlHelper = "#sourceRepository-helper", branch = "#branch", rootPath = "#rootPath", credentialsDropdown = "#associated-credentials-select-toggle",