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 <otto@codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
This commit is contained in:
Gusted 2025-10-29 16:43:22 +01:00 committed by Gusted
parent 3e25980784
commit 1f4488215b
2 changed files with 6 additions and 6 deletions

View file

@ -59,11 +59,11 @@
</form>
</div>
<div class="actions">
<button class="ui small basic cancel button">
<button class="ui cancel button">
{{svg "octicon-x"}}
{{ctx.Locale.Tr "cancel"}}
</button>
<button class="ui primary small approve button">
<button class="ui primary ok button">
{{svg "fontawesome-save"}}
{{ctx.Locale.Tr "save"}}
</button>

View file

@ -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();
});