Skip to content
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
2 changes: 1 addition & 1 deletion .ibm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"prettier:fix": "npx prettier --write **/*.{sh,md,yaml,yml}"
},
"devDependencies": {
"prettier": "3.6.2",
"prettier": "3.7.4",
"prettier-plugin-sh": "0.18.0",
"shellcheck": "4.1.0"
},
Expand Down
10 changes: 5 additions & 5 deletions .ibm/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ __metadata:
version: 0.0.0-use.local
resolution: ".ibm@workspace:."
dependencies:
prettier: 3.6.2
prettier: 3.7.4
prettier-plugin-sh: 0.18.0
shellcheck: 4.1.0
languageName: unknown
Expand Down Expand Up @@ -769,12 +769,12 @@ __metadata:
languageName: node
linkType: hard

"prettier@npm:3.6.2":
version: 3.6.2
resolution: "prettier@npm:3.6.2"
"prettier@npm:3.7.4":
version: 3.7.4
resolution: "prettier@npm:3.7.4"
bin:
prettier: bin/prettier.cjs
checksum: 0206f5f437892e8858f298af8850bf9d0ef1c22e21107a213ba56bfb9c2387a2020bfda244a20161d8e3dad40c6b04101609a55d370dece53d0a31893b64f861
checksum: 955e37e87b1151ca3b3282463f5295f4c415821884791df152ff66e6eb1c5257115153cccba61b13962546100dd00ae45670ff27077dcab04c977d84036eaf80
languageName: node
linkType: hard

Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"eslint-plugin-playwright": "2.3.0",
"ioredis": "5.8.2",
"otplib": "12.0.1",
"prettier": "3.6.2",
"prettier": "3.7.4",
"typescript": "5.9.3",
"typescript-eslint": "8.47.0"
},
Expand Down
63 changes: 30 additions & 33 deletions e2e-tests/playwright/e2e/auth-providers/microsoft.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,44 +226,41 @@ test.describe("Configure Microsoft Provider", async () => {
});

//TODO: entiny name is "name": "zeus_rhdhtesting.onmicrosoft.com", email is "email": "[email protected]" not resolving?
test.fixme(
"Login with Microsoft emailLocalPartMatchingUserEntityName resolver",
async () => {
//A common sign-in resolver that looks up the user using the local part of their email address as the entity name.
await deployment.setMicrosoftResolver(
"emailLocalPartMatchingUserEntityName",
false,
);
await deployment.updateAllConfigs();
await deployment.restartLocalDeployment();
await page.waitForTimeout(3000);
await deployment.waitForDeploymentReady();
test.fixme("Login with Microsoft emailLocalPartMatchingUserEntityName resolver", async () => {
//A common sign-in resolver that looks up the user using the local part of their email address as the entity name.
await deployment.setMicrosoftResolver(
"emailLocalPartMatchingUserEntityName",
false,
);
await deployment.updateAllConfigs();
await deployment.restartLocalDeployment();
await page.waitForTimeout(3000);
await deployment.waitForDeploymentReady();

// wait for rhdh first sync and portal to be reachable
await deployment.waitForSynced();
// wait for rhdh first sync and portal to be reachable
await deployment.waitForSynced();

const login = await common.MicrosoftAzureLogin(
"[email protected]",
process.env.DEFAULT_USER_PASSWORD_2,
);
expect(login).toBe("Login successful");
const login = await common.MicrosoftAzureLogin(
"[email protected]",
process.env.DEFAULT_USER_PASSWORD_2,
);
expect(login).toBe("Login successful");

await uiHelper.goToPageUrl("/settings", "Settings");
await uiHelper.verifyHeading("TEST Zeus");
await common.signOut();
await context.clearCookies();
await uiHelper.goToPageUrl("/settings", "Settings");
await uiHelper.verifyHeading("TEST Zeus");
await common.signOut();
await context.clearCookies();

const login2 = await common.MicrosoftAzureLogin(
"[email protected]",
process.env.DEFAULT_USER_PASSWORD_2,
);
expect(login2).toBe("Login successful");
const login2 = await common.MicrosoftAzureLogin(
"[email protected]",
process.env.DEFAULT_USER_PASSWORD_2,
);
expect(login2).toBe("Login successful");

await uiHelper.verifyAlertErrorMessage(
NO_USER_FOUND_IN_CATALOG_ERROR_MESSAGE,
);
},
);
await uiHelper.verifyAlertErrorMessage(
NO_USER_FOUND_IN_CATALOG_ERROR_MESSAGE,
);
});

test(`Set Micrisoft sessionDuration and confirm in auth cookie duration has been set`, async () => {
deployment.setAppConfigProperty(
Expand Down
44 changes: 21 additions & 23 deletions e2e-tests/playwright/e2e/github-discovery.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,28 +30,26 @@ test.describe("Github Discovery Catalog", () => {
});

//TODO: https://issues.redhat.com/browse/RHIDP-4992
test.fixme(
`Discover Organization's Catalog`,
async ({ catalogPage, githubApi, testOrganization }) => {
const organizationRepos =
await githubApi.getReposFromOrg(testOrganization);
const reposNames: string[] = organizationRepos.map(
(repo) => repo["name"],
);
const realComponents: string[] = reposNames.filter(
async (repo) =>
await githubApi.fileExistsOnRepo(
`${testOrganization}/${repo}`,
CATALOG_FILE,
),
);
test.fixme(`Discover Organization's Catalog`, async ({
catalogPage,
githubApi,
testOrganization,
}) => {
const organizationRepos = await githubApi.getReposFromOrg(testOrganization);
const reposNames: string[] = organizationRepos.map((repo) => repo["name"]);
const realComponents: string[] = reposNames.filter(
async (repo) =>
await githubApi.fileExistsOnRepo(
`${testOrganization}/${repo}`,
CATALOG_FILE,
),
);

for (let i = 0; i != realComponents.length; i++) {
const repo = realComponents[i];
await catalogPage.search(repo);
const row = await catalogPage.tableRow(repo);
assert(await row.isVisible());
}
},
);
for (let i = 0; i != realComponents.length; i++) {
const repo = realComponents[i];
await catalogPage.search(repo);
const row = await catalogPage.tableRow(repo);
assert(await row.isVisible());
}
});
});
55 changes: 23 additions & 32 deletions e2e-tests/playwright/e2e/github-happy-path.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,42 +189,33 @@ test.describe.serial("GitHub Happy path", async () => {
});

// TODO: https://issues.redhat.com/browse/RHDHBUGS-2099
test.fixme(
"Verify that the CI tab renders 5 most recent github actions and verify the table properly displays the actions when page sizes are changed and filters are applied",
async () => {
await page.locator("a").getByText("CI", { exact: true }).first().click();
await common.checkAndClickOnGHloginPopup();
test.fixme("Verify that the CI tab renders 5 most recent github actions and verify the table properly displays the actions when page sizes are changed and filters are applied", async () => {
await page.locator("a").getByText("CI", { exact: true }).first().click();
await common.checkAndClickOnGHloginPopup();

const workflowRuns = await backstageShowcase.getWorkflowRuns();
const workflowRuns = await backstageShowcase.getWorkflowRuns();

for (const workflowRun of workflowRuns.slice(0, 5)) {
await uiHelper.verifyText(workflowRun.id);
}
},
);
for (const workflowRun of workflowRuns.slice(0, 5)) {
await uiHelper.verifyText(workflowRun.id);
}
});

// TODO: https://issues.redhat.com/browse/RHDHBUGS-2099
test.fixme(
"Click on the Dependencies tab and verify that all the relations have been listed and displayed",
async () => {
await uiHelper.clickTab("Dependencies");
for (const resource of RESOURCES) {
const resourceElement = page.locator(
`#workspace:has-text("${resource}")`,
);
await resourceElement.scrollIntoViewIfNeeded();
await expect(resourceElement).toBeVisible();
}
},
);
test.fixme("Click on the Dependencies tab and verify that all the relations have been listed and displayed", async () => {
await uiHelper.clickTab("Dependencies");
for (const resource of RESOURCES) {
const resourceElement = page.locator(
`#workspace:has-text("${resource}")`,
);
await resourceElement.scrollIntoViewIfNeeded();
await expect(resourceElement).toBeVisible();
}
});

// TODO: https://issues.redhat.com/browse/RHDHBUGS-2099
test.fixme(
"Sign out and verify that you return back to the Sign in page",
async () => {
await uiHelper.goToPageUrl("/settings", "Settings");
await common.signOut();
await context.clearCookies();
},
);
test.fixme("Sign out and verify that you return back to the Sign in page", async () => {
await uiHelper.goToPageUrl("/settings", "Settings");
await common.signOut();
await context.clearCookies();
});
});
66 changes: 30 additions & 36 deletions e2e-tests/playwright/e2e/plugins/bulk-import.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,31 +82,28 @@ spec:

// TODO: https://issues.redhat.com/browse/RHDHBUGS-2230
// Select two repos: one with an existing catalog.yaml file and another without it
test.fixme(
"Add a Repository from the Repository Tab and Confirm its Preview",
async () => {
await uiHelper.openSidebar("Bulk import");
await uiHelper.clickButton("Import");
await uiHelper.searchInputPlaceholder(catalogRepoDetails.name);

await uiHelper.verifyRowInTableByUniqueText(catalogRepoDetails.name, [
"Not Generated",
]);
await bulkimport.selectRepoInTable(catalogRepoDetails.name);
await uiHelper.verifyRowInTableByUniqueText(catalogRepoDetails.name, [
catalogRepoDetails.url,
"Ready to import Preview file",
]);

await uiHelper.clickOnLinkInTableByUniqueText(
catalogRepoDetails.name,
"Preview file",
);
await expect(await uiHelper.clickButton("Save")).not.toBeVisible({
timeout: 10000,
});
},
);
test.fixme("Add a Repository from the Repository Tab and Confirm its Preview", async () => {
await uiHelper.openSidebar("Bulk import");
await uiHelper.clickButton("Import");
await uiHelper.searchInputPlaceholder(catalogRepoDetails.name);

await uiHelper.verifyRowInTableByUniqueText(catalogRepoDetails.name, [
"Not Generated",
]);
await bulkimport.selectRepoInTable(catalogRepoDetails.name);
await uiHelper.verifyRowInTableByUniqueText(catalogRepoDetails.name, [
catalogRepoDetails.url,
"Ready to import Preview file",
]);

await uiHelper.clickOnLinkInTableByUniqueText(
catalogRepoDetails.name,
"Preview file",
);
await expect(await uiHelper.clickButton("Save")).not.toBeVisible({
timeout: 10000,
});
});

test("Add a Repository from the Organization Tab and Confirm its Preview", async () => {
await uiHelper.clickByDataTestId("organization-view");
Expand Down Expand Up @@ -316,17 +313,14 @@ test.describe
});

// TODO: https://issues.redhat.com/browse/RHDHBUGS-2230
test.fixme(
"Verify existing repo from app-config is displayed in bulk import Added repositories",
async () => {
await uiHelper.openSidebar("Bulk import");
await common.waitForLoad();
await bulkimport.filterAddedRepo(existingRepoFromAppConfig);
await uiHelper.verifyRowInTableByUniqueText(existingRepoFromAppConfig, [
"Already imported",
]);
},
);
test.fixme("Verify existing repo from app-config is displayed in bulk import Added repositories", async () => {
await uiHelper.openSidebar("Bulk import");
await common.waitForLoad();
await bulkimport.filterAddedRepo(existingRepoFromAppConfig);
await uiHelper.verifyRowInTableByUniqueText(existingRepoFromAppConfig, [
"Already imported",
]);
});

test('Verify repo from "import an existing git repository" are displayed in bulk import Added repositories', async () => {
// Import an existing Git repository
Expand Down
53 changes: 25 additions & 28 deletions e2e-tests/playwright/e2e/plugins/rbac/rbac.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -501,39 +501,36 @@ test.describe.serial("Test RBAC", () => {
});

// TODO: https://issues.redhat.com/browse/RHDHBUGS-2100
test.fixme(
"Test that roles and policies from GET request are what expected",
async () => {
const rbacApi = await RhdhRbacApi.build(apiToken);

const rolesResponse = await rbacApi.getRoles();
test.fixme("Test that roles and policies from GET request are what expected", async () => {
const rbacApi = await RhdhRbacApi.build(apiToken);

const policiesResponse = await rbacApi.getPolicies();
const rolesResponse = await rbacApi.getRoles();

// eslint-disable-next-line playwright/no-conditional-in-test
if (!rolesResponse.ok()) {
throw Error(
`RBAC rolesResponse API call failed with status code ${rolesResponse.status()}`,
);
}
const policiesResponse = await rbacApi.getPolicies();

// eslint-disable-next-line playwright/no-conditional-in-test
if (!policiesResponse.ok()) {
throw Error(
`RBAC policiesResponse API call failed with status code ${policiesResponse.status()}`,
);
}

await Response.checkResponse(
rolesResponse,
RbacConstants.getExpectedRoles(),
// eslint-disable-next-line playwright/no-conditional-in-test
if (!rolesResponse.ok()) {
throw Error(
`RBAC rolesResponse API call failed with status code ${rolesResponse.status()}`,
);
await Response.checkResponse(
policiesResponse,
RbacConstants.getExpectedPolicies(),
}

// eslint-disable-next-line playwright/no-conditional-in-test
if (!policiesResponse.ok()) {
throw Error(
`RBAC policiesResponse API call failed with status code ${policiesResponse.status()}`,
);
},
);
}

await Response.checkResponse(
rolesResponse,
RbacConstants.getExpectedRoles(),
);
await Response.checkResponse(
policiesResponse,
RbacConstants.getExpectedPolicies(),
);
});

test("Create new role for rhdh-qe, change its name, and deny it from reading catalog entities", async () => {
const rbacApi = await RhdhRbacApi.build(apiToken);
Expand Down
Loading
Loading