Skip to content

Commit 3406ee9

Browse files
committed
fixuptest
1 parent 88ffd24 commit 3406ee9

File tree

1 file changed

+7
-16
lines changed

1 file changed

+7
-16
lines changed

tests/Integration/twouserRBACTest.spec.ts

+7-16
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,18 @@ const getRepoName = (): string => {
2222
return repoName;
2323
};
2424

25-
// Clean up the repo name file
26-
test.beforeAll(async () => {
27-
if (fs.existsSync(repoNameFile)) {
28-
fs.unlinkSync(repoNameFile);
29-
console.log("Cleaned up repoName.txt");
30-
}
31-
});
25+
3226

3327
const url = randomUrl();
3428

3529
test.describe("Combined user tests", () => {
3630
test("Login as user 1 (admin)", async ({ page }) => {
3731
await test.step("Navigate to the repository page", async () => {
32+
// Clean up the repo name file
33+
if (fs.existsSync(repoNameFile)) {
34+
fs.unlinkSync(repoNameFile);
35+
};
36+
console.log("Cleaned up repoName.txt");
3837
console.log("\n Try to delete old repos\n");
3938
await deleteAllRepos(page, `&search=${repoNamePrefix}`);
4039
await navigateToRepositories(page);
@@ -99,15 +98,7 @@ test.describe("Combined user tests", () => {
9998
const row = await getRowByNameOrUrl(page, `${repoName}-Edited`);
10099
await expect(row.getByText("Valid")).toBeVisible({ timeout: 60000 });
101100
await row.getByLabel("Kebab toggle").click();
102-
await row.getByRole("menuitem", { name: "Edit" }).click();
103-
await expect(
104-
page.getByText(
105-
"You do not have the required permissions to perform this action"
106-
)
107-
).toBeVisible();
108-
await expect(
109-
page.getByRole("dialog", { name: "Edit custom repository" })
110-
).not.toBeVisible();
101+
await expect(row.getByRole("menuitem", { name: "Edit" })).not.toBeVisible();
111102
});
112103
}
113104
);

0 commit comments

Comments
 (0)