From 1f4488215b988cdbcc818fde7575fd94f8e451e1 Mon Sep 17 00:00:00 2001 From: Gusted Date: Wed, 29 Oct 2025 16:43:22 +0100 Subject: [PATCH] fix: make edit label dialog work again (#9899) - The E2E code did not actually assert that the functionality worked (`expect` was missing). - Regression of forgejo/forgejo!9636 - Resolves forgejo/forgejo#9893 Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9899 Reviewed-by: Otto Co-authored-by: Gusted Co-committed-by: Gusted --- templates/repo/issue/labels/edit_delete_label.tmpl | 4 ++-- tests/e2e/repo-labels.test.e2e.ts | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/repo/issue/labels/edit_delete_label.tmpl b/templates/repo/issue/labels/edit_delete_label.tmpl index 31b8a03bc5..40424b8185 100644 --- a/templates/repo/issue/labels/edit_delete_label.tmpl +++ b/templates/repo/issue/labels/edit_delete_label.tmpl @@ -59,11 +59,11 @@
- - diff --git a/tests/e2e/repo-labels.test.e2e.ts b/tests/e2e/repo-labels.test.e2e.ts index e7d5ce32bf..ef33e91dda 100644 --- a/tests/e2e/repo-labels.test.e2e.ts +++ b/tests/e2e/repo-labels.test.e2e.ts @@ -21,10 +21,10 @@ test('New label', async ({page}) => { await screenshot(page, page.locator('#new-label-modal')); const labelName = dynamic_id(); - await page.keyboard.type(labelName); + await page.getByRole('textbox', {name: 'Label name'}).fill(labelName); await page.getByRole('button', {name: 'Create label'}).click(); - await page.locator('.label-title').filter({hasText: labelName}).isVisible(); + await expect(page.locator('.label-title').filter({hasText: labelName})).toBeVisible(); }); test('Edit label', async ({page}) => { @@ -36,8 +36,8 @@ test('Edit label', async ({page}) => { await screenshot(page, page.locator('#edit-label-modal')); const labelName = dynamic_id(); - await page.keyboard.type(labelName); + await page.getByRole('textbox', {name: 'Label name'}).fill(labelName); await page.getByRole('button', {name: 'Save'}).click(); - await page.locator('.label-title').filter({hasText: labelName}).isVisible(); + await expect(page.locator('.label-title').filter({hasText: labelName})).toBeVisible(); });