Skip to content

Commit

Permalink
fix(tests): set default timeout high + specific timeout's on expected…
Browse files Browse the repository at this point in the history
… expect's
  • Loading branch information
NuttyShrimp committed Sep 6, 2024
1 parent 2110d79 commit 20fa9fa
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
3 changes: 3 additions & 0 deletions loama/tests/permission-table.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import authSetup from "./auth.setup";
test.beforeEach(authSetup);

test.describe("Permission table", () => {
test.beforeEach(async ({ context }) => {
context.setDefaultTimeout(30000);
});
test("Can add & remove webId subject", async ({ page }) => {
await page.getByText("README").click();

Expand Down
16 changes: 12 additions & 4 deletions loama/tests/resource-explorer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,20 @@ import authSetup from './auth.setup';
test.beforeEach(authSetup);

test.describe("Resource Explorer", () => {
test.beforeEach(async ({ context }) => {
context.setDefaultTimeout(30000);
});

test("Can enter container", async ({ page }) => {
await page.getByRole("button", { name: "View resources" }).click();
const breadcrumsElement = page.locator("#explorer-breadcrumbs");
expect(breadcrumsElement).toContainText("/home/profile/");
await page.getByText('profileView resources').getByRole("button", { name: "View resources" }).click();
await expect(page.locator(".left-panel").getByText("card")).toBeVisible({
timeout: 30000,
});

expect(page.getByText("card")).toBeVisible();
const breadcrumsElement = page.locator("#explorer-breadcrumbs");
await expect(breadcrumsElement).toContainText("/home/profile/", {
timeout: 30000,
});
})
test("Can go up a level", async ({ page }) => {
await page.getByRole("button", { name: "View resources" }).click();
Expand Down

0 comments on commit 20fa9fa

Please sign in to comment.