Skip to content

Commit

Permalink
test: 🚨 more fixes less skips
Browse files Browse the repository at this point in the history
  • Loading branch information
phoebus-84 committed Jan 29, 2025
1 parent 7d5ce4b commit 2f2d9a5
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 13 deletions.
4 changes: 2 additions & 2 deletions playwright.env
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ETHEREUMPRIVATEKEY=f487b47e6dbfbadd9ebc8f937fad42e08a146a32964cfe471c8b436a4458a
AUTHNAME=pippo
AUTHUSERNAME=pippo
BITCOINPRIVATEKEY=L249xHabxCz94hyHHU5LHrpye8KdyLFViU1sPpmCcvFxTefXPxqn
AUTHID=0634YMEGWHNGCVVBKETRXJQCWM
AUTHID=06AAV4KMFFXJ6E377EPY3DNCCG
ECDHPUBLICKEY=MaKdbCHrzwKEbLitevU6jqKpTXjv66wg6ytFJXzfURya4NFw7mHen5DKEac1daNg74MzXm7m5VapPob8rTAi2vP6
SEED=skin buyer sunset person run push elevator under debris soft surge man
AUTHEMAIL=pippo@dyne.org
Expand All @@ -25,7 +25,7 @@ NOT_FOUND_LIMIT=6

# other variables used for testing
OTHERUSERID=0634YN1WS21RMWRYTS8N2XGNAW
PROJECT_ID=063FZRMJ1X6W12MG5SGRYHZ2P0
PROJECT_ID=06AAVHFZX5CCF21G94PTH7P4HR
RESOURCE_ID=0634YV2F4N04RM3XRA7ED90YVM
INCLUDED_PROJECT_1=mamma
INCLUDED_PROJECT_2=papá
2 changes: 1 addition & 1 deletion tests/authentication.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@ test.describe("Authentication process", () => {
await page.getByRole("button", { name: "Register and login" }).click();
// Log out
// await page.goto("");
await page.locator("#user-menu").click();
// await page.locator("#user-menu").click();
});
});
2 changes: 1 addition & 1 deletion tests/create_project.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ test.describe("when user want to create a project", () => {
const tagText = await page.textContent(".Polaris-Tag__TagText");
expect(mainTitle).toBe("Zenroom");
expect(mainLink).toBe("https://github.com/dyne/Zenroom");
expect(tagText).toContain("arm");
expect(tagText).toContain("bdd");
});

test("should create a new random project", async ({ random }) => {
Expand Down
12 changes: 5 additions & 7 deletions tests/profile.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ test.describe("When user visit the profile page", () => {
await login(page);
});

test("The profile page should work", async ({ page }) => {
const authId = "0634YMEGWHNGCVVBKETRXJQCWM"; //process.env.auth_id
await page.goto(`/profile/${authId}`);
expect(page.getByText(authId)).toBeTruthy();
test("The profile page should work", async ({ page, authVariables }) => {
await page.goto(`/profile/${authVariables.authId}`);
expect(page.getByText(authVariables.authId!)).toBeTruthy();
expect(page.getByRole("heading", { name: "My projects" })).toBeTruthy();
expect(page.getByRole("button", { name: "DID Explorer" })).toBeTruthy();
});
Expand All @@ -26,9 +25,8 @@ test.describe("When user visit the profile page", () => {
await expect(page.locator("text=My List")).toBeHidden();
});

test("Click to DID Explorer button should redirect to the explorer", async ({ page }) => {
const authId = "0634YMEGWHNGCVVBKETRXJQCWM"; //process.env.auth_id
await page.goto(`/profile/${authId}`);
test("Click to DID Explorer button should redirect to the explorer", async ({ page, authVariables }) => {
await page.goto(`/profile/${authVariables.authId}`);
await page.getByRole("button", { name: "DID Explorer" }).click();
await expect(page.url()).toContain("https://explorer.did.dyne.org/");
});
Expand Down
2 changes: 1 addition & 1 deletion tests/render_nru.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ test.describe("When user is not logged in", () => {
await expect(page.getByText("Sign up")).toBeTruthy();
});

test.skip("Should see /project/:id", async ({ page, envVariables }) => {
test("Should see /project/:id", async ({ page, envVariables }) => {
await page.goto(`/project/${envVariables.PROJECT_ID}`);
await expect(page.getByText("Project")).toBeTruthy();
});
Expand Down
2 changes: 1 addition & 1 deletion tests/render_ru.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ test.describe("when user is logged in", () => {
expect(page.getByRole("heading", { name: "Resources" }));
});

test.skip("Should see /project/:id", async ({ page }) => {
test("Should see /project/:id", async ({ page }) => {
await page.goto(`/project/${process.env.PROJECT_ID}`);
await page.waitForLoadState("networkidle");
await expect(page.getByRole("heading", { name: "Project" })).toBeVisible();
Expand Down

0 comments on commit 2f2d9a5

Please sign in to comment.