Skip to content

Commit

Permalink
test(e2e): test for shorter label; upgrade playwright and CSS; keep e…
Browse files Browse the repository at this point in the history
…mpty containers in git
  • Loading branch information
angelo-v committed Nov 13, 2024
1 parent 3c7d98a commit 26d0f26
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 40 deletions.
56 changes: 28 additions & 28 deletions apps/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions apps/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"author": "",
"license": "MIT",
"devDependencies": {
"@playwright/test": "^1.40.1",
"@solid/community-server": "^7.0.3",
"@playwright/test": "^1.48.2",
"@solid/community-server": "^7.1.3",
"netlify-cli": "^16.9.3",
"serve": "^14.2.1"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"key":"setup/current-server-version","payload":"7.0.5"}
{"key":"setup/current-server-version","payload":"7.1.3"}
Empty file.
Empty file.
18 changes: 9 additions & 9 deletions apps/tests/ldp-container.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ test("show contents of an LDP container", async ({ page }) => {

// then page shows the full container URL as heading
const heading = await page.getByRole("heading", { level: 2 });
await expect(heading).toHaveText("http://localhost:4000/alice/container/");
await expect(heading).toHaveText("container/");

// and shows a list of all contents
const contents = page.locator("pos-container-contents").getByRole("listitem");
Expand All @@ -28,33 +28,33 @@ test("show contents of an LDP container", async ({ page }) => {

// and for each item in the list, the full URL is shown
await expect(item1.getByRole("paragraph")).toHaveText(
"http://localhost:4000/alice/container/another-sub-container/"
"http://localhost:4000/alice/container/another-sub-container/",
);
await expect(item2.getByRole("paragraph")).toHaveText(
"http://localhost:4000/alice/container/readme.md"
"http://localhost:4000/alice/container/readme.md",
);
await expect(item3.getByRole("paragraph")).toHaveText(
"http://localhost:4000/alice/container/resource"
"http://localhost:4000/alice/container/resource",
);
await expect(item4.getByRole("paragraph")).toHaveText(
"http://localhost:4000/alice/container/sub-container/"
"http://localhost:4000/alice/container/sub-container/",
);

// and for each item in the list a icon is shown, indicating whether it is a folder or document
await expect(item1.locator("ion-icon")).toHaveAttribute(
"name",
"folder-outline"
"folder-outline",
);
await expect(item2.locator("ion-icon")).toHaveAttribute(
"name",
"document-outline"
"document-outline",
);
await expect(item3.locator("ion-icon")).toHaveAttribute(
"name",
"document-outline"
"document-outline",
);
await expect(item4.locator("ion-icon")).toHaveAttribute(
"name",
"folder-outline"
"folder-outline",
);
});

0 comments on commit 26d0f26

Please sign in to comment.