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] Update Archetype.open() method #1226

Merged
merged 4 commits into from
Sep 24, 2024
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 @@ -30,6 +30,7 @@ export class AssessmentQuestionnaire {
const itemsPerPage = 100;
if (forceReload) {
cy.visit(AssessmentQuestionnaire.fullUrl, { timeout: 35 * SEC }).then((_) => {
cy.wait(10 * SEC);
selectItemsPerPage(itemsPerPage);
});
return;
Expand Down
9 changes: 6 additions & 3 deletions cypress/e2e/models/migration/archetypes/archetype.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,12 @@ export class Archetype {
public static open(forceReload = false) {
const itemsPerPage = 100;
if (forceReload) {
cy.visit(Archetype.fullUrl, { timeout: 15 * SEC }).then((_) =>
selectItemsPerPage(itemsPerPage)
);
cy.visit(Archetype.fullUrl, { timeout: 15 * SEC }).then((_) => {
// This explicit wait is required in some cases.
cy.wait(10 * SEC);
cy.get("h1", { timeout: 35 * SEC }).should("contain", "Archetypes");
selectItemsPerPage(itemsPerPage);
});
return;
}

Expand Down
1 change: 1 addition & 0 deletions cypress/e2e/models/migration/controls/stakeholders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export class Stakeholders {
public static openList(forceReload = false): void {
if (forceReload) {
cy.visit(Stakeholders.fullUrl, { timeout: 35 * SEC }).then((_) => {
cy.wait(10 * SEC);
cy.get("h1", { timeout: 60 * SEC }).should("contain", "Controls");
selectItemsPerPage(100);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ describe(["@tier3"], "Tests for archetype questionnaire features", () => {
after("Perform test data clean up", function () {
Archetype.open(true);
archetype.delete();
Stakeholders.openList(true);
deleteByList(stakeholderList);
AssessmentQuestionnaire.open(true);
AssessmentQuestionnaire.deleteAllQuestionnaires();
});
});
2 changes: 1 addition & 1 deletion cypress/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ export function clickKebabMenuOptionArchetype(rowItem: string, itemName: string)
.within(() => {
click(sideKebabMenu);
});
cy.get(commonView.actionMenuItem).contains(itemName).click();
cy.get(commonView.actionMenuItem).contains(itemName).click({ force: true });
}

export function createMultipleJiraConnections(
Expand Down
Loading