Skip to content

Commit

Permalink
[RFR] Fixes for Jira connection to align with latest upstream (#695)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibragins authored Aug 30, 2023
1 parent ae8eab0 commit 11b4394
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 19 deletions.
2 changes: 1 addition & 1 deletion cypress/e2e/models/administration/jira-connection/jira.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ export class Jira {
static applyFilterByName(value: string) {
selectFromDropList(filteredBy, filterCategory);
inputText(filterNameInput, value);
click(filterSubmitButton);
click(searchButton);
}

public getAllProjects(): Cypress.Chainable<JiraProject[]> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
callWithin,
click,
clickByText,
clickWithFocus,
inputText,
selectItemsPerPage,
selectUserPerspective,
Expand Down Expand Up @@ -82,12 +83,7 @@ export class MigrationWave {
public create() {
MigrationWave.openNewForm();
this.fillForm(this);

cy.get(MigrationWaveView.submitButton, { timeout: 10 * SEC })
.should("be.enabled")
.focus()
.click();

clickWithFocus(MigrationWaveView.submitButton);
this.setApplications();
}

Expand Down
15 changes: 7 additions & 8 deletions cypress/e2e/tests/administration/jira-connection/filter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,13 @@ describe(["@tier2"], "Jira connection filter validations", () => {
notExists(firstName, jiraTable);
clearAllFilters();

// Commented code below cause it fails due to the bug https://issues.redhat.com/browse/MTA-895
// // Searching for invalid name:
// Jira.ApplyFilterByName(invalidSearchInput);
//
// // Assert that no search results are found
// cy.get("h2").contains("No data available");
//
// clearAllFilters();
// Searching for invalid name:
Jira.applyFilterByName(invalidSearchInput);

// Assert that no search results are found
cy.get("h2").contains("No jira configuration available");

clearAllFilters();
});

after("Clean up", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ describe(["@tier2"], "Jira connection negative tests", () => {
getJiraCredentialData(CredentialType.jiraToken, !useTestingAccount)
);

jiraBearerCredentialInvalid.create();

// Defining Jira Cloud connection data with incorrect credentials
jiraCloudConnectionDataIncorrect = getJiraConnectionData(
jiraBasicCredentialInvalid,
Expand Down Expand Up @@ -135,7 +137,7 @@ describe(["@tier2"], "Jira connection negative tests", () => {
});
});

it("Bug MTA-991 | Validating error when Jira Stage Instance is not connected", () => {
it("Validating error when Jira Stage Instance is not connected", () => {
/**
Implements MTA-362 - Add JIRA instance with invalid credentials
Automates https://issues.redhat.com/browse/MTA-991
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/views/common.view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ limitations under the License.
*/
export const itemsPerPageToggleButton = "#pagination-id-top-toggle";
export const submitButton = '[id*="form-submit"]';
export const cancelButton = "button[aria-label=cancel]";
export const cancelButton = '[id*="cancel"]';
export const closeButton = "button[aria-label=Close]";
export const confirmButton = "#confirm-dialog-button";
export const editButton = "button[aria-label=edit]";
Expand Down
4 changes: 2 additions & 2 deletions cypress/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,10 @@ export function submitForm(): void {
}

export function cancelForm(): void {
cy.get(commonView.cancelButton).click();
clickJs(commonView.cancelButton);
}

export function login(username?, password?: string, firstLogin = false): Chainable<null> {
export function login(username?: string, password?: string, firstLogin = false): Chainable<null> {
/**
* If the login method is explicitly called, it means that previous sessions are no longer required
*/
Expand Down

0 comments on commit 11b4394

Please sign in to comment.