Skip to content
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

[RFR] Add custom migration target regression test #775

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,15 @@ export class CustomMigrationTarget {
clickJs(submitButton);
}

public edit(updateValues: Partial<CustomMigrationTarget>) {
public openEditDialog() {
CustomMigrationTarget.open();
this.expandActionsMenu();
cy.contains(button, editAction).click();
}

public edit(updateValues: Partial<CustomMigrationTarget>) {
this.openEditDialog();
CustomMigrationTarget.fillForm(updateValues);

clickJs(submitButton);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ limitations under the License.
/// <reference types="cypress" />

import {
click,
clickByText,
getRandomAnalysisData,
getRandomApplicationData,
Expand All @@ -35,6 +36,7 @@ import { CustomMigrationTargetView } from "../../../views/custom-migration-targe
import { CredentialsSourceControlUsername } from "../../../models/administration/credentials/credentialsSourceControlUsername";
import { getRulesData } from "../../../../utils/data_utils";
import { Analysis } from "../../../models/migration/applicationinventory/analysis";
import { cancelButton } from "../../../views/common.view";

describe(["@tier1", "@dc", "@interop"], "Custom Migration Targets CRUD operations", () => {
// Automates Polarion TC 300 & 305
Expand Down Expand Up @@ -96,7 +98,7 @@ describe(["@tier1", "@dc", "@interop"], "Custom Migration Targets CRUD operation
);
});

it("Create Custom Migration Target with rules from repository with credentials", function () {
it("Bug MTA-1542: Create Custom Migration Target with rules from repository with credentials", function () {
const sourceCredential = new CredentialsSourceControlUsername(
data.getRandomCredentialsData(
CredentialType.sourceControl,
Expand Down Expand Up @@ -126,6 +128,14 @@ describe(["@tier1", "@dc", "@interop"], "Custom Migration Targets CRUD operation
target.name
);

// TC MTA-403
target.openEditDialog();
cy.get(CustomMigrationTargetView.credentialsInput).should(
"have.value",
sourceCredential.name
);
click(cancelButton);

target.delete();
cy.wait("@deleteRule");
cy.get(CustomMigrationTargetView.card, { timeout: 12 * SEC }).should(
Expand Down
1 change: 1 addition & 0 deletions cypress/e2e/views/custom-migration-target.view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export enum CustomMigrationTargetView {
branch = "#branch",
rootPath = "#rootPath",
credentialsDropdown = "#associated-credentials-select-toggle",
credentialsInput = "#associated-credentials-select-toggle-select-typeahead",
retrieveFromARepositoryRadio = "#repository",
dragButton = "#drag-button",
card = ".pf-v5-c-card",
Expand Down