Skip to content

fix: implement admin permissions #1431

fix: implement admin permissions

fix: implement admin permissions #1431

Triggered via pull request September 15, 2024 18:06
Status Failure
Total duration 11m 0s
Artifacts 4

ci.yml

on: pull_request
Matrix: E2E Tests
Fit to window
Zoom out
Zoom in

Annotations

21 errors, 3 warnings, and 2 notices
[chromium] › admin/BooksList.spec.ts:10:7 › Admin books list @admin › I can navigate through the list using the pagination @read: pwa/tests/admin/BooksList.spec.ts#L12
1) [chromium] › admin/BooksList.spec.ts:10:7 › Admin books list @admin › I can navigate through the list using the pagination @READ Error: Timed out 10000ms waiting for expect(locator).toContainText(expected) Locator: locator('.MuiTablePagination-displayedRows') Expected string: "1-10 of" Received: <element(s) not found> Call log: - expect.toContainText with timeout 10000ms - waiting for locator('.MuiTablePagination-displayedRows') 10 | test("I can navigate through the list using the pagination @READ", async ({ bookPage, page }) => { 11 | // test list display > 12 | await expect(page.locator(".MuiTablePagination-displayedRows")).toContainText(`1-${nbItemsPerPage} of`); | ^ 13 | await expect(page.locator(".datagrid-body tr")).toHaveCount(nbItemsPerPage); 14 | 15 | // test pagination display at /home/runner/work/demo/demo/pwa/tests/admin/BooksList.spec.ts:12:69
[chromium] › admin/BooksList.spec.ts:10:7 › Admin books list @admin › I can navigate through the list using the pagination @read: pwa/tests/admin/BooksList.spec.ts#L12
1) [chromium] › admin/BooksList.spec.ts:10:7 › Admin books list @admin › I can navigate through the list using the pagination @READ Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: Timed out 10000ms waiting for expect(locator).toContainText(expected) Locator: locator('.MuiTablePagination-displayedRows') Expected string: "1-10 of" Received: <element(s) not found> Call log: - expect.toContainText with timeout 10000ms - waiting for locator('.MuiTablePagination-displayedRows') 10 | test("I can navigate through the list using the pagination @READ", async ({ bookPage, page }) => { 11 | // test list display > 12 | await expect(page.locator(".MuiTablePagination-displayedRows")).toContainText(`1-${nbItemsPerPage} of`); | ^ 13 | await expect(page.locator(".datagrid-body tr")).toHaveCount(nbItemsPerPage); 14 | 15 | // test pagination display at /home/runner/work/demo/demo/pwa/tests/admin/BooksList.spec.ts:12:69
[chromium] › admin/BooksList.spec.ts:53:7 › Admin books list @admin › I can filter the list @read: pwa/tests/admin/BooksList.spec.ts#L1
2) [chromium] › admin/BooksList.spec.ts:53:7 › Admin books list @admin › I can filter the list @READ Test timeout of 45000ms exceeded.
[chromium] › admin/BooksList.spec.ts:53:7 › Admin books list @admin › I can filter the list @read: pwa/tests/admin/pages/BookPage.ts#L27
2) [chromium] › admin/BooksList.spec.ts:53:7 › Admin books list @admin › I can filter the list @READ Error: locator.click: Test timeout of 45000ms exceeded. Call log: - waiting for getByLabel('Add filter') at admin/pages/BookPage.ts:27 25 | public async filter(filters: FiltersProps) { 26 | if (filters.author) { > 27 | await this.page.getByLabel("Add filter").click(); | ^ 28 | await this.page.getByRole("menu").getByText("Author").waitFor({ state: "visible" }); 29 | await this.page.getByRole("menu").getByText("Author").click(); 30 | await this.page.getByRole("textbox", { name: "Author" }).fill(filters.author); at BookPage.filter (/home/runner/work/demo/demo/pwa/tests/admin/pages/BookPage.ts:27:48) at /home/runner/work/demo/demo/pwa/tests/admin/BooksList.spec.ts:55:20
[chromium] › admin/BooksList.spec.ts:53:7 › Admin books list @admin › I can filter the list @read: pwa/tests/admin/BooksList.spec.ts#L1
2) [chromium] › admin/BooksList.spec.ts:53:7 › Admin books list @admin › I can filter the list @READ Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Test timeout of 45000ms exceeded.
[chromium] › admin/BooksList.spec.ts:53:7 › Admin books list @admin › I can filter the list @read: pwa/tests/admin/pages/BookPage.ts#L27
2) [chromium] › admin/BooksList.spec.ts:53:7 › Admin books list @admin › I can filter the list @READ Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: locator.click: Test timeout of 45000ms exceeded. Call log: - waiting for getByLabel('Add filter') at admin/pages/BookPage.ts:27 25 | public async filter(filters: FiltersProps) { 26 | if (filters.author) { > 27 | await this.page.getByLabel("Add filter").click(); | ^ 28 | await this.page.getByRole("menu").getByText("Author").waitFor({ state: "visible" }); 29 | await this.page.getByRole("menu").getByText("Author").click(); 30 | await this.page.getByRole("textbox", { name: "Author" }).fill(filters.author); at BookPage.filter (/home/runner/work/demo/demo/pwa/tests/admin/pages/BookPage.ts:27:48) at /home/runner/work/demo/demo/pwa/tests/admin/BooksList.spec.ts:55:20
[chromium] › admin/BooksList.spec.ts:78:7 › Admin books list @admin › I can sort the list by title @read: pwa/tests/admin/BooksList.spec.ts#L1
3) [chromium] › admin/BooksList.spec.ts:78:7 › Admin books list @admin › I can sort the list by title @READ Test timeout of 45000ms exceeded.
[chromium] › admin/BooksList.spec.ts:78:7 › Admin books list @admin › I can sort the list by title @read: pwa/tests/admin/BooksList.spec.ts#L79
3) [chromium] › admin/BooksList.spec.ts:78:7 › Admin books list @admin › I can sort the list by title @READ Error: locator.click: Test timeout of 45000ms exceeded. Call log: - waiting for getByText('Title') 77 | 78 | test("I can sort the list by title @READ", async ({ bookPage, page }) => { > 79 | await page.getByText("Title").click(); | ^ 80 | await expect(await bookPage.getDefaultBook()).not.toBeVisible(); 81 | }); 82 | at /home/runner/work/demo/demo/pwa/tests/admin/BooksList.spec.ts:79:35
[chromium] › admin/BooksList.spec.ts:78:7 › Admin books list @admin › I can sort the list by title @read: pwa/tests/admin/BooksList.spec.ts#L1
3) [chromium] › admin/BooksList.spec.ts:78:7 › Admin books list @admin › I can sort the list by title @READ Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Test timeout of 45000ms exceeded.
[chromium] › admin/BooksList.spec.ts:78:7 › Admin books list @admin › I can sort the list by title @read: pwa/tests/admin/BooksList.spec.ts#L79
3) [chromium] › admin/BooksList.spec.ts:78:7 › Admin books list @admin › I can sort the list by title @READ Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: locator.click: Test timeout of 45000ms exceeded. Call log: - waiting for getByText('Title') 77 | 78 | test("I can sort the list by title @READ", async ({ bookPage, page }) => { > 79 | await page.getByText("Title").click(); | ^ 80 | await expect(await bookPage.getDefaultBook()).not.toBeVisible(); 81 | }); 82 | at /home/runner/work/demo/demo/pwa/tests/admin/BooksList.spec.ts:79:35
[chromium] › admin/BookCreate.spec.ts:9:7 › Create a book @admin › I can create a book @write: pwa/tests/admin/BookCreate.spec.ts#L4
1) [chromium] › admin/BookCreate.spec.ts:9:7 › Create a book @admin › I can create a book @Write ─ Test timeout of 45000ms exceeded while running "beforeEach" hook. 2 | 3 | test.describe("Create a book @admin", () => { > 4 | test.beforeEach(async ({ bookPage, page }) => { | ^ 5 | await bookPage.gotoList(); 6 | await page.getByRole("link", { name: "Create", exact: true }).click(); 7 | }); at /home/runner/work/demo/demo/pwa/tests/admin/BookCreate.spec.ts:4:8
[chromium] › admin/BookCreate.spec.ts:9:7 › Create a book @admin › I can create a book @write: pwa/tests/admin/BookCreate.spec.ts#L6
1) [chromium] › admin/BookCreate.spec.ts:9:7 › Create a book @admin › I can create a book @Write ─ Error: locator.click: Test timeout of 45000ms exceeded. Call log: - waiting for getByRole('link', { name: 'Create', exact: true }) 4 | test.beforeEach(async ({ bookPage, page }) => { 5 | await bookPage.gotoList(); > 6 | await page.getByRole("link", { name: "Create", exact: true }).click(); | ^ 7 | }); 8 | 9 | test("I can create a book @Write", async ({ bookPage, page }) => { at /home/runner/work/demo/demo/pwa/tests/admin/BookCreate.spec.ts:6:67
[chromium] › admin/BookCreate.spec.ts:9:7 › Create a book @admin › I can create a book @write: pwa/tests/admin/BookCreate.spec.ts#L4
1) [chromium] › admin/BookCreate.spec.ts:9:7 › Create a book @admin › I can create a book @Write ─ Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Test timeout of 45000ms exceeded while running "beforeEach" hook. 2 | 3 | test.describe("Create a book @admin", () => { > 4 | test.beforeEach(async ({ bookPage, page }) => { | ^ 5 | await bookPage.gotoList(); 6 | await page.getByRole("link", { name: "Create", exact: true }).click(); 7 | }); at /home/runner/work/demo/demo/pwa/tests/admin/BookCreate.spec.ts:4:8
[chromium] › admin/BookCreate.spec.ts:9:7 › Create a book @admin › I can create a book @write: pwa/tests/admin/BookCreate.spec.ts#L6
1) [chromium] › admin/BookCreate.spec.ts:9:7 › Create a book @admin › I can create a book @Write ─ Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: locator.click: Test timeout of 45000ms exceeded. Call log: - waiting for getByRole('link', { name: 'Create', exact: true }) 4 | test.beforeEach(async ({ bookPage, page }) => { 5 | await bookPage.gotoList(); > 6 | await page.getByRole("link", { name: "Create", exact: true }).click(); | ^ 7 | }); 8 | 9 | test("I can create a book @Write", async ({ bookPage, page }) => { at /home/runner/work/demo/demo/pwa/tests/admin/BookCreate.spec.ts:6:67
[chromium] › admin/BookEdit.spec.ts:9:7 › Edit a book @admin › I can edit a book @write: pwa/tests/admin/BookEdit.spec.ts#L4
2) [chromium] › admin/BookEdit.spec.ts:9:7 › Edit a book @admin › I can edit a book @Write ─────── Test timeout of 45000ms exceeded while running "beforeEach" hook. 2 | 3 | test.describe("Edit a book @admin", () => { > 4 | test.beforeEach(async ({ bookPage, page }) => { | ^ 5 | await bookPage.gotoList(); 6 | await page.locator(".datagrid-body tr").last().getByRole("link", { name: "Edit", exact: true }).click(); 7 | }); at /home/runner/work/demo/demo/pwa/tests/admin/BookEdit.spec.ts:4:8
[chromium] › admin/BookEdit.spec.ts:9:7 › Edit a book @admin › I can edit a book @write: pwa/tests/admin/BookEdit.spec.ts#L6
2) [chromium] › admin/BookEdit.spec.ts:9:7 › Edit a book @admin › I can edit a book @Write ─────── Error: locator.click: Test timeout of 45000ms exceeded. Call log: - waiting for locator('.datagrid-body tr').last().getByRole('link', { name: 'Edit', exact: true }) 4 | test.beforeEach(async ({ bookPage, page }) => { 5 | await bookPage.gotoList(); > 6 | await page.locator(".datagrid-body tr").last().getByRole("link", { name: "Edit", exact: true }).click(); | ^ 7 | }); 8 | 9 | test("I can edit a book @Write", async ({ page }) => { at /home/runner/work/demo/demo/pwa/tests/admin/BookEdit.spec.ts:6:101
[chromium] › admin/BookEdit.spec.ts:9:7 › Edit a book @admin › I can edit a book @write: pwa/tests/admin/BookEdit.spec.ts#L4
2) [chromium] › admin/BookEdit.spec.ts:9:7 › Edit a book @admin › I can edit a book @Write ─────── Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Test timeout of 45000ms exceeded while running "beforeEach" hook. 2 | 3 | test.describe("Edit a book @admin", () => { > 4 | test.beforeEach(async ({ bookPage, page }) => { | ^ 5 | await bookPage.gotoList(); 6 | await page.locator(".datagrid-body tr").last().getByRole("link", { name: "Edit", exact: true }).click(); 7 | }); at /home/runner/work/demo/demo/pwa/tests/admin/BookEdit.spec.ts:4:8
[chromium] › admin/BookEdit.spec.ts:9:7 › Edit a book @admin › I can edit a book @write: pwa/tests/admin/BookEdit.spec.ts#L6
2) [chromium] › admin/BookEdit.spec.ts:9:7 › Edit a book @admin › I can edit a book @Write ─────── Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: locator.click: Test timeout of 45000ms exceeded. Call log: - waiting for locator('.datagrid-body tr').last().getByRole('link', { name: 'Edit', exact: true }) 4 | test.beforeEach(async ({ bookPage, page }) => { 5 | await bookPage.gotoList(); > 6 | await page.locator(".datagrid-body tr").last().getByRole("link", { name: "Edit", exact: true }).click(); | ^ 7 | }); 8 | 9 | test("I can edit a book @Write", async ({ page }) => { at /home/runner/work/demo/demo/pwa/tests/admin/BookEdit.spec.ts:6:101
[chromium] › admin/BookEdit.spec.ts:30:7 › Edit a book @admin › I can delete a book @write: pwa/tests/admin/BookEdit.spec.ts#L4
3) [chromium] › admin/BookEdit.spec.ts:30:7 › Edit a book @admin › I can delete a book @Write ──── Test timeout of 45000ms exceeded while running "beforeEach" hook. 2 | 3 | test.describe("Edit a book @admin", () => { > 4 | test.beforeEach(async ({ bookPage, page }) => { | ^ 5 | await bookPage.gotoList(); 6 | await page.locator(".datagrid-body tr").last().getByRole("link", { name: "Edit", exact: true }).click(); 7 | }); at /home/runner/work/demo/demo/pwa/tests/admin/BookEdit.spec.ts:4:8
[chromium] › admin/BookEdit.spec.ts:30:7 › Edit a book @admin › I can delete a book @write: pwa/tests/admin/BookEdit.spec.ts#L6
3) [chromium] › admin/BookEdit.spec.ts:30:7 › Edit a book @admin › I can delete a book @Write ──── Error: locator.click: Test timeout of 45000ms exceeded. Call log: - waiting for locator('.datagrid-body tr').last().getByRole('link', { name: 'Edit', exact: true }) 4 | test.beforeEach(async ({ bookPage, page }) => { 5 | await bookPage.gotoList(); > 6 | await page.locator(".datagrid-body tr").last().getByRole("link", { name: "Edit", exact: true }).click(); | ^ 7 | }); 8 | 9 | test("I can edit a book @Write", async ({ page }) => { at /home/runner/work/demo/demo/pwa/tests/admin/BookEdit.spec.ts:6:101
E2E Tests (@write)
Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run
Lint
Failed to restore: Cache service responded with 429
Lint
Failed to restore: Cache service responded with 429
Slow Test: pwa/[chromium] › BooksList.spec.ts#L1
pwa/[chromium] › BooksList.spec.ts took 16.3s
🎭 Playwright Run Summary
4 failed [chromium] › admin/BooksList.spec.ts:10:7 › Admin books list @admin › I can navigate through the list using the pagination @READ [chromium] › admin/BooksList.spec.ts:53:7 › Admin books list @admin › I can filter the list @READ [chromium] › admin/BooksList.spec.ts:78:7 › Admin books list @admin › I can sort the list by title @READ [chromium] › admin/BooksList.spec.ts:83:7 › Admin books list @admin › I can get to a book page from the list @READ 21 passed (5.8m)
🎭 Playwright Run Summary
4 failed [chromium] › admin/BookCreate.spec.ts:9:7 › Create a book @admin › I can create a book @Write ── [chromium] › admin/BookEdit.spec.ts:9:7 › Edit a book @admin › I can edit a book @Write ──────── [chromium] › admin/BookEdit.spec.ts:30:7 › Edit a book @admin › I can delete a book @Write ───── [chromium] › admin/BooksList.spec.ts:91:7 › Admin books list @admin › I can remove a book from the list @Write 7 passed (6.4m)

Artifacts

Produced during runtime
Name Size
api-platform~demo~RM0E82+2.dockerbuild Expired
286 KB
api-platform~demo~RZ9XCG+2.dockerbuild Expired
212 KB
api-platform~demo~SDWGMB+2.dockerbuild Expired
296 KB
playwright-screenshots Expired
2.98 MB